{"action":"created","comment":{"url":"https://api.github.com/repos/fastlane/spaceship/pulls/comments/47564547","id":47564547,"diff_hunk":"@@ -102,24 +108,27 @@ def all_for_profile_type(profile_type)\n           end\n         end\n \n+        # @param mac [Bool] Searches for Macs if true\n         # @return (Device) Find a device based on the ID of the device. *Attention*:\n         #  This is *not* the UDID. nil if no device was found.\n-        def find(device_id)\n-          all.find do |device|\n+        def find(device_id, mac: false)\n+          all(mac: mac).find do |device|\n             device.id == device_id\n           end\n         end\n \n+        # @param mac [Bool] Searches for Macs if true\n         # @return (Device) Find a device based on the UDID of the device. nil if no device was found.\n-        def find_by_udid(device_udid)\n-          all.find do |device|\n+        def find_by_udid(device_udid, mac: false)\n+          all(mac: mac).find do |device|\n             device.udid == device_udid\n           end\n         end\n \n+        # @param mac [Bool] Searches for Macs if true\n         # @return (Device) Find a device based on its name. nil if no device was found.\n-        def find_by_name(device_name)\n-          all.find do |device|\n+        def find_by_name(device_name, mac: false)\n+          all(mac: mac).find do |device|","path":"lib/spaceship/portal/device.rb","position":55,"original_position":55,"commit_id":"262115841ca5af1e3fcb96d96b9807faee1d5a30","original_commit_id":"262115841ca5af1e3fcb96d96b9807faee1d5a30","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Prefer `detect` over `find`.","created_at":"2015-12-14T21:57:20Z","updated_at":"2015-12-14T21:57:20Z","html_url":"https://github.com/fastlane/spaceship/pull/190#discussion_r47564547","pull_request_url":"https://api.github.com/repos/fastlane/spaceship/pulls/190","_links":{"self":{"href":"https://api.github.com/repos/fastlane/spaceship/pulls/comments/47564547"},"html":{"href":"https://github.com/fastlane/spaceship/pull/190#discussion_r47564547"},"pull_request":{"href":"https://api.github.com/repos/fastlane/spaceship/pulls/190"}}},"pull_request":{"url":"https://api.github.com/repos/fastlane/spaceship/pulls/190","id":52891367,"html_url":"https://github.com/fastlane/spaceship/pull/190","diff_url":"https://github.com/fastlane/spaceship/pull/190.diff","patch_url":"https://github.com/fastlane/spaceship/pull/190.patch","issue_url":"https://api.github.com/repos/fastlane/spaceship/issues/190","number":190,"state":"open","locked":false,"title":"Add basic app analytics functions","user":{"login":"pieisgood","id":4284240,"avatar_url":"https://avatars.githubusercontent.com/u/4284240?v=3","gravatar_id":"","url":"https://api.github.com/users/pieisgood","html_url":"https://github.com/pieisgood","followers_url":"https://api.github.com/users/pieisgood/followers","following_url":"https://api.github.com/users/pieisgood/following{/other_user}","gists_url":"https://api.github.com/users/pieisgood/gists{/gist_id}","starred_url":"https://api.github.com/users/pieisgood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pieisgood/subscriptions","organizations_url":"https://api.github.com/users/pieisgood/orgs","repos_url":"https://api.github.com/users/pieisgood/repos","events_url":"https://api.github.com/users/pieisgood/events{/privacy}","received_events_url":"https://api.github.com/users/pieisgood/received_events","type":"User","site_admin":false},"body":"Add time series app analytics functions. Only one app is allowed in the app Ids list, allows user to grab data on a per app basis for a specified time interval, measure type and frequency.\r\n\r\nFixes https://github.com/fastlane/spaceship/issues/195 (Added by @KrauseFx)","created_at":"2015-12-07T19:48:28Z","updated_at":"2015-12-14T21:57:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f9fe543b37a23d77801971b27e37250a690871df","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fastlane/spaceship/pulls/190/commits","review_comments_url":"https://api.github.com/repos/fastlane/spaceship/pulls/190/comments","review_comment_url":"https://api.github.com/repos/fastlane/spaceship/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fastlane/spaceship/issues/190/comments","statuses_url":"https://api.github.com/repos/fastlane/spaceship/statuses/262115841ca5af1e3fcb96d96b9807faee1d5a30","head":{"label":"pieisgood:master","ref":"master","sha":"262115841ca5af1e3fcb96d96b9807faee1d5a30","user":{"login":"pieisgood","id":4284240,"avatar_url":"https://avatars.githubusercontent.com/u/4284240?v=3","gravatar_id":"","url":"https://api.github.com/users/pieisgood","html_url":"https://github.com/pieisgood","followers_url":"https://api.github.com/users/pieisgood/followers","following_url":"https://api.github.com/users/pieisgood/following{/other_user}","gists_url":"https://api.github.com/users/pieisgood/gists{/gist_id}","starred_url":"https://api.github.com/users/pieisgood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pieisgood/subscriptions","organizations_url":"https://api.github.com/users/pieisgood/orgs","repos_url":"https://api.github.com/users/pieisgood/repos","events_url":"https://api.github.com/users/pieisgood/events{/privacy}","received_events_url":"https://api.github.com/users/pieisgood/received_events","type":"User","site_admin":false},"repo":{"id":46085873,"name":"spaceship","full_name":"pieisgood/spaceship","owner":{"login":"pieisgood","id":4284240,"avatar_url":"https://avatars.githubusercontent.com/u/4284240?v=3","gravatar_id":"","url":"https://api.github.com/users/pieisgood","html_url":"https://github.com/pieisgood","followers_url":"https://api.github.com/users/pieisgood/followers","following_url":"https://api.github.com/users/pieisgood/following{/other_user}","gists_url":"https://api.github.com/users/pieisgood/gists{/gist_id}","starred_url":"https://api.github.com/users/pieisgood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pieisgood/subscriptions","organizations_url":"https://api.github.com/users/pieisgood/orgs","repos_url":"https://api.github.com/users/pieisgood/repos","events_url":"https://api.github.com/users/pieisgood/events{/privacy}","received_events_url":"https://api.github.com/users/pieisgood/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pieisgood/spaceship","description":"Ruby library to access the Apple Dev Center and iTunes Connect","fork":true,"url":"https://api.github.com/repos/pieisgood/spaceship","forks_url":"https://api.github.com/repos/pieisgood/spaceship/forks","keys_url":"https://api.github.com/repos/pieisgood/spaceship/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pieisgood/spaceship/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pieisgood/spaceship/teams","hooks_url":"https://api.github.com/repos/pieisgood/spaceship/hooks","issue_events_url":"https://api.github.com/repos/pieisgood/spaceship/issues/events{/number}","events_url":"https://api.github.com/repos/pieisgood/spaceship/events","assignees_url":"https://api.github.com/repos/pieisgood/spaceship/assignees{/user}","branches_url":"https://api.github.com/repos/pieisgood/spaceship/branches{/branch}","tags_url":"https://api.github.com/repos/pieisgood/spaceship/tags","blobs_url":"https://api.github.com/repos/pieisgood/spaceship/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pieisgood/spaceship/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pieisgood/spaceship/git/refs{/sha}","trees_url":"https://api.github.com/repos/pieisgood/spaceship/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pieisgood/spaceship/statuses/{sha}","languages_url":"https://api.github.com/repos/pieisgood/spaceship/languages","stargazers_url":"https://api.github.com/repos/pieisgood/spaceship/stargazers","contributors_url":"https://api.github.com/repos/pieisgood/spaceship/contributors","subscribers_url":"https://api.github.com/repos/pieisgood/spaceship/subscribers","subscription_url":"https://api.github.com/repos/pieisgood/spaceship/subscription","commits_url":"https://api.github.com/repos/pieisgood/spaceship/commits{/sha}","git_commits_url":"https://api.github.com/repos/pieisgood/spaceship/git/commits{/sha}","comments_url":"https://api.github.com/repos/pieisgood/spaceship/comments{/number}","issue_comment_url":"https://api.github.com/repos/pieisgood/spaceship/issues/comments{/number}","contents_url":"https://api.github.com/repos/pieisgood/spaceship/contents/{+path}","compare_url":"https://api.github.com/repos/pieisgood/spaceship/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pieisgood/spaceship/merges","archive_url":"https://api.github.com/repos/pieisgood/spaceship/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pieisgood/spaceship/downloads","issues_url":"https://api.github.com/repos/pieisgood/spaceship/issues{/number}","pulls_url":"https://api.github.com/repos/pieisgood/spaceship/pulls{/number}","milestones_url":"https://api.github.com/repos/pieisgood/spaceship/milestones{/number}","notifications_url":"https://api.github.com/repos/pieisgood/spaceship/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pieisgood/spaceship/labels{/name}","releases_url":"https://api.github.com/repos/pieisgood/spaceship/releases{/id}","created_at":"2015-11-12T22:52:03Z","updated_at":"2015-11-12T22:52:05Z","pushed_at":"2015-12-14T21:57:05Z","git_url":"git://github.com/pieisgood/spaceship.git","ssh_url":"git@github.com:pieisgood/spaceship.git","clone_url":"https://github.com/pieisgood/spaceship.git","svn_url":"https://github.com/pieisgood/spaceship","homepage":"https://spaceship.airforce","size":1557,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fastlane:master","ref":"master","sha":"5be1413978e9b91e93b141b2662aa0ada63a4893","user":{"login":"fastlane","id":11098337,"avatar_url":"https://avatars.githubusercontent.com/u/11098337?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane","html_url":"https://github.com/fastlane","followers_url":"https://api.github.com/users/fastlane/followers","following_url":"https://api.github.com/users/fastlane/following{/other_user}","gists_url":"https://api.github.com/users/fastlane/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane/subscriptions","organizations_url":"https://api.github.com/users/fastlane/orgs","repos_url":"https://api.github.com/users/fastlane/repos","events_url":"https://api.github.com/users/fastlane/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane/received_events","type":"Organization","site_admin":false},"repo":{"id":33789738,"name":"spaceship","full_name":"fastlane/spaceship","owner":{"login":"fastlane","id":11098337,"avatar_url":"https://avatars.githubusercontent.com/u/11098337?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane","html_url":"https://github.com/fastlane","followers_url":"https://api.github.com/users/fastlane/followers","following_url":"https://api.github.com/users/fastlane/following{/other_user}","gists_url":"https://api.github.com/users/fastlane/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane/subscriptions","organizations_url":"https://api.github.com/users/fastlane/orgs","repos_url":"https://api.github.com/users/fastlane/repos","events_url":"https://api.github.com/users/fastlane/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fastlane/spaceship","description":"Ruby library to access the Apple Dev Center and iTunes Connect","fork":false,"url":"https://api.github.com/repos/fastlane/spaceship","forks_url":"https://api.github.com/repos/fastlane/spaceship/forks","keys_url":"https://api.github.com/repos/fastlane/spaceship/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fastlane/spaceship/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fastlane/spaceship/teams","hooks_url":"https://api.github.com/repos/fastlane/spaceship/hooks","issue_events_url":"https://api.github.com/repos/fastlane/spaceship/issues/events{/number}","events_url":"https://api.github.com/repos/fastlane/spaceship/events","assignees_url":"https://api.github.com/repos/fastlane/spaceship/assignees{/user}","branches_url":"https://api.github.com/repos/fastlane/spaceship/branches{/branch}","tags_url":"https://api.github.com/repos/fastlane/spaceship/tags","blobs_url":"https://api.github.com/repos/fastlane/spaceship/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fastlane/spaceship/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fastlane/spaceship/git/refs{/sha}","trees_url":"https://api.github.com/repos/fastlane/spaceship/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fastlane/spaceship/statuses/{sha}","languages_url":"https://api.github.com/repos/fastlane/spaceship/languages","stargazers_url":"https://api.github.com/repos/fastlane/spaceship/stargazers","contributors_url":"https://api.github.com/repos/fastlane/spaceship/contributors","subscribers_url":"https://api.github.com/repos/fastlane/spaceship/subscribers","subscription_url":"https://api.github.com/repos/fastlane/spaceship/subscription","commits_url":"https://api.github.com/repos/fastlane/spaceship/commits{/sha}","git_commits_url":"https://api.github.com/repos/fastlane/spaceship/git/commits{/sha}","comments_url":"https://api.github.com/repos/fastlane/spaceship/comments{/number}","issue_comment_url":"https://api.github.com/repos/fastlane/spaceship/issues/comments{/number}","contents_url":"https://api.github.com/repos/fastlane/spaceship/contents/{+path}","compare_url":"https://api.github.com/repos/fastlane/spaceship/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fastlane/spaceship/merges","archive_url":"https://api.github.com/repos/fastlane/spaceship/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fastlane/spaceship/downloads","issues_url":"https://api.github.com/repos/fastlane/spaceship/issues{/number}","pulls_url":"https://api.github.com/repos/fastlane/spaceship/pulls{/number}","milestones_url":"https://api.github.com/repos/fastlane/spaceship/milestones{/number}","notifications_url":"https://api.github.com/repos/fastlane/spaceship/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fastlane/spaceship/labels{/name}","releases_url":"https://api.github.com/repos/fastlane/spaceship/releases{/id}","created_at":"2015-04-11T19:44:23Z","updated_at":"2015-12-12T19:32:17Z","pushed_at":"2015-12-14T21:57:05Z","git_url":"git://github.com/fastlane/spaceship.git","ssh_url":"git@github.com:fastlane/spaceship.git","clone_url":"https://github.com/fastlane/spaceship.git","svn_url":"https://github.com/fastlane/spaceship","homepage":"https://spaceship.airforce","size":1634,"stargazers_count":625,"watchers_count":625,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":81,"mirror_url":null,"open_issues_count":54,"forks":81,"open_issues":54,"watchers":625,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fastlane/spaceship/pulls/190"},"html":{"href":"https://github.com/fastlane/spaceship/pull/190"},"issue":{"href":"https://api.github.com/repos/fastlane/spaceship/issues/190"},"comments":{"href":"https://api.github.com/repos/fastlane/spaceship/issues/190/comments"},"review_comments":{"href":"https://api.github.com/repos/fastlane/spaceship/pulls/190/comments"},"review_comment":{"href":"https://api.github.com/repos/fastlane/spaceship/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fastlane/spaceship/pulls/190/commits"},"statuses":{"href":"https://api.github.com/repos/fastlane/spaceship/statuses/262115841ca5af1e3fcb96d96b9807faee1d5a30"}}}}