{"action":"created","comment":{"url":"https://api.github.com/repos/calabash/calabash-ios/pulls/comments/46839459","id":46839459,"diff_hunk":"@@ -47,3 +43,22 @@ extend Calabash::Cucumber::Operations\n def embed(x,y=nil,z=nil)\n   puts \"Screenshot at #{x}\"\n end\n+\n+require \"calabash-cucumber\"\n+\n+def preferences\n+  @preferences ||= Calabash::Cucumber::Preferences.new\n+end\n+\n+def disable_usage_tracking\n+  preferences.usage_tracking = \"none\"\n+  puts \"Calabash will not collect usage information.\"\n+  \"none\"\n+end\n+\n+def enable_usage_tracking(level=\"system_info\")\n+  preferences.usage_tracking = level","path":"calabash-cucumber/scripts/.irbrc","position":37,"original_position":37,"commit_id":"ffa2502d4a097aff9c3a2c38aed5db849949f0f0","original_commit_id":"ffa2502d4a097aff9c3a2c38aed5db849949f0f0","user":{"login":"jmoody","id":466104,"avatar_url":"https://avatars.githubusercontent.com/u/466104?v=3","gravatar_id":"","url":"https://api.github.com/users/jmoody","html_url":"https://github.com/jmoody","followers_url":"https://api.github.com/users/jmoody/followers","following_url":"https://api.github.com/users/jmoody/following{/other_user}","gists_url":"https://api.github.com/users/jmoody/gists{/gist_id}","starred_url":"https://api.github.com/users/jmoody/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmoody/subscriptions","organizations_url":"https://api.github.com/users/jmoody/orgs","repos_url":"https://api.github.com/users/jmoody/repos","events_url":"https://api.github.com/users/jmoody/events{/privacy}","received_events_url":"https://api.github.com/users/jmoody/received_events","type":"User","site_admin":false},"body":"I don't believe there is a threading problem.  If something is amiss we _want fail or block_.","created_at":"2015-12-07T16:13:37Z","updated_at":"2015-12-07T16:13:37Z","html_url":"https://github.com/calabash/calabash-ios/pull/943#discussion_r46839459","pull_request_url":"https://api.github.com/repos/calabash/calabash-ios/pulls/943","_links":{"self":{"href":"https://api.github.com/repos/calabash/calabash-ios/pulls/comments/46839459"},"html":{"href":"https://github.com/calabash/calabash-ios/pull/943#discussion_r46839459"},"pull_request":{"href":"https://api.github.com/repos/calabash/calabash-ios/pulls/943"}}},"pull_request":{"url":"https://api.github.com/repos/calabash/calabash-ios/pulls/943","id":52682868,"html_url":"https://github.com/calabash/calabash-ios/pull/943","diff_url":"https://github.com/calabash/calabash-ios/pull/943.diff","patch_url":"https://github.com/calabash/calabash-ios/pull/943.patch","issue_url":"https://api.github.com/repos/calabash/calabash-ios/issues/943","number":943,"state":"open","locked":false,"title":"irb interface for disabling/enabling usage tracking","user":{"login":"jmoody","id":466104,"avatar_url":"https://avatars.githubusercontent.com/u/466104?v=3","gravatar_id":"","url":"https://api.github.com/users/jmoody","html_url":"https://github.com/jmoody","followers_url":"https://api.github.com/users/jmoody/followers","following_url":"https://api.github.com/users/jmoody/following{/other_user}","gists_url":"https://api.github.com/users/jmoody/gists{/gist_id}","starred_url":"https://api.github.com/users/jmoody/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmoody/subscriptions","organizations_url":"https://api.github.com/users/jmoody/orgs","repos_url":"https://api.github.com/users/jmoody/repos","events_url":"https://api.github.com/users/jmoody/events{/privacy}","received_events_url":"https://api.github.com/users/jmoody/received_events","type":"User","site_admin":false},"body":"### Motivation\r\n\r\nProgress on **Collect information about Calabash sessions** #908\r\n\r\n```ruby\r\n$ IRBRC=scripts/.irbrc be irb\r\n> disable_usage_tracking\r\nCalabash will not collect usage information.\r\n\"none\"\r\n\r\n> enable_usage_tracking\r\nCalabash will collect statistics based on system_info\r\n\"system_info\"\r\n\r\n> enable_usage_tracking(\"events\")\r\nCalabash will collect statistics based on events\r\n\"events\"\r\n\r\n> enable_usage_tracking(\"invalid\")\r\nArgumentError: Expected 'invalid' to be one of none, events, system_info\r\n        from /Users/moody/git/calabash/calabash-ios/calabash-cucumber/lib/calabash-cucumber/store/preferences.rb:42:in `usage_tracking='\r\n        from scripts/.irbrc:60:in `enable_usage_tracking'\r\n        from (irb):3\r\n\r\n> preferences\r\nPreferences:\r\n{\r\n           :version => \"1.0\",\r\n    :usage_tracking => \"system_info\",\r\n           :user_id => \"1320096c-b3f7-496e-995c-091e639f5d28\"\r\n}\r\n```","created_at":"2015-12-04T15:32:31Z","updated_at":"2015-12-07T16:13:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dfecd3f11e2f0a0469b73dabb83d3e88f97e1856","assignee":{"login":"sapieneptus","id":3009852,"avatar_url":"https://avatars.githubusercontent.com/u/3009852?v=3","gravatar_id":"","url":"https://api.github.com/users/sapieneptus","html_url":"https://github.com/sapieneptus","followers_url":"https://api.github.com/users/sapieneptus/followers","following_url":"https://api.github.com/users/sapieneptus/following{/other_user}","gists_url":"https://api.github.com/users/sapieneptus/gists{/gist_id}","starred_url":"https://api.github.com/users/sapieneptus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sapieneptus/subscriptions","organizations_url":"https://api.github.com/users/sapieneptus/orgs","repos_url":"https://api.github.com/users/sapieneptus/repos","events_url":"https://api.github.com/users/sapieneptus/events{/privacy}","received_events_url":"https://api.github.com/users/sapieneptus/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/calabash/calabash-ios/pulls/943/commits","review_comments_url":"https://api.github.com/repos/calabash/calabash-ios/pulls/943/comments","review_comment_url":"https://api.github.com/repos/calabash/calabash-ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/calabash/calabash-ios/issues/943/comments","statuses_url":"https://api.github.com/repos/calabash/calabash-ios/statuses/ffa2502d4a097aff9c3a2c38aed5db849949f0f0","head":{"label":"calabash:feature/irb-interface-for-users-to-interact-with-preferences","ref":"feature/irb-interface-for-users-to-interact-with-preferences","sha":"ffa2502d4a097aff9c3a2c38aed5db849949f0f0","user":{"login":"calabash","id":1325677,"avatar_url":"https://avatars.githubusercontent.com/u/1325677?v=3","gravatar_id":"","url":"https://api.github.com/users/calabash","html_url":"https://github.com/calabash","followers_url":"https://api.github.com/users/calabash/followers","following_url":"https://api.github.com/users/calabash/following{/other_user}","gists_url":"https://api.github.com/users/calabash/gists{/gist_id}","starred_url":"https://api.github.com/users/calabash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calabash/subscriptions","organizations_url":"https://api.github.com/users/calabash/orgs","repos_url":"https://api.github.com/users/calabash/repos","events_url":"https://api.github.com/users/calabash/events{/privacy}","received_events_url":"https://api.github.com/users/calabash/received_events","type":"Organization","site_admin":false},"repo":{"id":3610323,"name":"calabash-ios","full_name":"calabash/calabash-ios","owner":{"login":"calabash","id":1325677,"avatar_url":"https://avatars.githubusercontent.com/u/1325677?v=3","gravatar_id":"","url":"https://api.github.com/users/calabash","html_url":"https://github.com/calabash","followers_url":"https://api.github.com/users/calabash/followers","following_url":"https://api.github.com/users/calabash/following{/other_user}","gists_url":"https://api.github.com/users/calabash/gists{/gist_id}","starred_url":"https://api.github.com/users/calabash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calabash/subscriptions","organizations_url":"https://api.github.com/users/calabash/orgs","repos_url":"https://api.github.com/users/calabash/repos","events_url":"https://api.github.com/users/calabash/events{/privacy}","received_events_url":"https://api.github.com/users/calabash/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/calabash/calabash-ios","description":"Calabash for iOS","fork":false,"url":"https://api.github.com/repos/calabash/calabash-ios","forks_url":"https://api.github.com/repos/calabash/calabash-ios/forks","keys_url":"https://api.github.com/repos/calabash/calabash-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/calabash/calabash-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/calabash/calabash-ios/teams","hooks_url":"https://api.github.com/repos/calabash/calabash-ios/hooks","issue_events_url":"https://api.github.com/repos/calabash/calabash-ios/issues/events{/number}","events_url":"https://api.github.com/repos/calabash/calabash-ios/events","assignees_url":"https://api.github.com/repos/calabash/calabash-ios/assignees{/user}","branches_url":"https://api.github.com/repos/calabash/calabash-ios/branches{/branch}","tags_url":"https://api.github.com/repos/calabash/calabash-ios/tags","blobs_url":"https://api.github.com/repos/calabash/calabash-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/calabash/calabash-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/calabash/calabash-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/calabash/calabash-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/calabash/calabash-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/calabash/calabash-ios/languages","stargazers_url":"https://api.github.com/repos/calabash/calabash-ios/stargazers","contributors_url":"https://api.github.com/repos/calabash/calabash-ios/contributors","subscribers_url":"https://api.github.com/repos/calabash/calabash-ios/subscribers","subscription_url":"https://api.github.com/repos/calabash/calabash-ios/subscription","commits_url":"https://api.github.com/repos/calabash/calabash-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/calabash/calabash-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/calabash/calabash-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/calabash/calabash-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/calabash/calabash-ios/contents/{+path}","compare_url":"https://api.github.com/repos/calabash/calabash-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/calabash/calabash-ios/merges","archive_url":"https://api.github.com/repos/calabash/calabash-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/calabash/calabash-ios/downloads","issues_url":"https://api.github.com/repos/calabash/calabash-ios/issues{/number}","pulls_url":"https://api.github.com/repos/calabash/calabash-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/calabash/calabash-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/calabash/calabash-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/calabash/calabash-ios/labels{/name}","releases_url":"https://api.github.com/repos/calabash/calabash-ios/releases{/id}","created_at":"2012-03-03T11:52:47Z","updated_at":"2015-12-03T16:56:07Z","pushed_at":"2015-12-07T15:54:40Z","git_url":"git://github.com/calabash/calabash-ios.git","ssh_url":"git@github.com:calabash/calabash-ios.git","clone_url":"https://github.com/calabash/calabash-ios.git","svn_url":"https://github.com/calabash/calabash-ios","homepage":"http://calaba.sh/","size":62608,"stargazers_count":1154,"watchers_count":1154,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":290,"mirror_url":null,"open_issues_count":57,"forks":290,"open_issues":57,"watchers":1154,"default_branch":"develop"}},"base":{"label":"calabash:develop","ref":"develop","sha":"909fc1622431b1f155599154376d98ee96051a3c","user":{"login":"calabash","id":1325677,"avatar_url":"https://avatars.githubusercontent.com/u/1325677?v=3","gravatar_id":"","url":"https://api.github.com/users/calabash","html_url":"https://github.com/calabash","followers_url":"https://api.github.com/users/calabash/followers","following_url":"https://api.github.com/users/calabash/following{/other_user}","gists_url":"https://api.github.com/users/calabash/gists{/gist_id}","starred_url":"https://api.github.com/users/calabash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calabash/subscriptions","organizations_url":"https://api.github.com/users/calabash/orgs","repos_url":"https://api.github.com/users/calabash/repos","events_url":"https://api.github.com/users/calabash/events{/privacy}","received_events_url":"https://api.github.com/users/calabash/received_events","type":"Organization","site_admin":false},"repo":{"id":3610323,"name":"calabash-ios","full_name":"calabash/calabash-ios","owner":{"login":"calabash","id":1325677,"avatar_url":"https://avatars.githubusercontent.com/u/1325677?v=3","gravatar_id":"","url":"https://api.github.com/users/calabash","html_url":"https://github.com/calabash","followers_url":"https://api.github.com/users/calabash/followers","following_url":"https://api.github.com/users/calabash/following{/other_user}","gists_url":"https://api.github.com/users/calabash/gists{/gist_id}","starred_url":"https://api.github.com/users/calabash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calabash/subscriptions","organizations_url":"https://api.github.com/users/calabash/orgs","repos_url":"https://api.github.com/users/calabash/repos","events_url":"https://api.github.com/users/calabash/events{/privacy}","received_events_url":"https://api.github.com/users/calabash/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/calabash/calabash-ios","description":"Calabash for iOS","fork":false,"url":"https://api.github.com/repos/calabash/calabash-ios","forks_url":"https://api.github.com/repos/calabash/calabash-ios/forks","keys_url":"https://api.github.com/repos/calabash/calabash-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/calabash/calabash-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/calabash/calabash-ios/teams","hooks_url":"https://api.github.com/repos/calabash/calabash-ios/hooks","issue_events_url":"https://api.github.com/repos/calabash/calabash-ios/issues/events{/number}","events_url":"https://api.github.com/repos/calabash/calabash-ios/events","assignees_url":"https://api.github.com/repos/calabash/calabash-ios/assignees{/user}","branches_url":"https://api.github.com/repos/calabash/calabash-ios/branches{/branch}","tags_url":"https://api.github.com/repos/calabash/calabash-ios/tags","blobs_url":"https://api.github.com/repos/calabash/calabash-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/calabash/calabash-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/calabash/calabash-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/calabash/calabash-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/calabash/calabash-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/calabash/calabash-ios/languages","stargazers_url":"https://api.github.com/repos/calabash/calabash-ios/stargazers","contributors_url":"https://api.github.com/repos/calabash/calabash-ios/contributors","subscribers_url":"https://api.github.com/repos/calabash/calabash-ios/subscribers","subscription_url":"https://api.github.com/repos/calabash/calabash-ios/subscription","commits_url":"https://api.github.com/repos/calabash/calabash-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/calabash/calabash-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/calabash/calabash-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/calabash/calabash-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/calabash/calabash-ios/contents/{+path}","compare_url":"https://api.github.com/repos/calabash/calabash-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/calabash/calabash-ios/merges","archive_url":"https://api.github.com/repos/calabash/calabash-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/calabash/calabash-ios/downloads","issues_url":"https://api.github.com/repos/calabash/calabash-ios/issues{/number}","pulls_url":"https://api.github.com/repos/calabash/calabash-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/calabash/calabash-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/calabash/calabash-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/calabash/calabash-ios/labels{/name}","releases_url":"https://api.github.com/repos/calabash/calabash-ios/releases{/id}","created_at":"2012-03-03T11:52:47Z","updated_at":"2015-12-03T16:56:07Z","pushed_at":"2015-12-07T15:54:40Z","git_url":"git://github.com/calabash/calabash-ios.git","ssh_url":"git@github.com:calabash/calabash-ios.git","clone_url":"https://github.com/calabash/calabash-ios.git","svn_url":"https://github.com/calabash/calabash-ios","homepage":"http://calaba.sh/","size":62608,"stargazers_count":1154,"watchers_count":1154,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":290,"mirror_url":null,"open_issues_count":57,"forks":290,"open_issues":57,"watchers":1154,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/calabash/calabash-ios/pulls/943"},"html":{"href":"https://github.com/calabash/calabash-ios/pull/943"},"issue":{"href":"https://api.github.com/repos/calabash/calabash-ios/issues/943"},"comments":{"href":"https://api.github.com/repos/calabash/calabash-ios/issues/943/comments"},"review_comments":{"href":"https://api.github.com/repos/calabash/calabash-ios/pulls/943/comments"},"review_comment":{"href":"https://api.github.com/repos/calabash/calabash-ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/calabash/calabash-ios/pulls/943/commits"},"statuses":{"href":"https://api.github.com/repos/calabash/calabash-ios/statuses/ffa2502d4a097aff9c3a2c38aed5db849949f0f0"}}}}