{"action":"created","comment":{"url":"https://api.github.com/repos/ad2games/soapy_cake/pulls/comments/53293465","id":53293465,"diff_hunk":"@@ -38,6 +38,10 @@ def to_s\n       \"#{role}:#{service}:#{method}:#{version} #{opts.to_json}\"\n     end\n \n+    def read_only?\n+      (API_CONFIG.dig('read_only', role, service) || []).include?(method)","path":"lib/soapy_cake/request.rb","position":5,"original_position":5,"commit_id":"83baf159afa11dcfc570cae15ba1bae2c9752a38","original_commit_id":"83baf159afa11dcfc570cae15ba1bae2c9752a38","user":{"login":"dziemba","id":7718617,"avatar_url":"https://avatars.githubusercontent.com/u/7718617?v=3","gravatar_id":"","url":"https://api.github.com/users/dziemba","html_url":"https://github.com/dziemba","followers_url":"https://api.github.com/users/dziemba/followers","following_url":"https://api.github.com/users/dziemba/following{/other_user}","gists_url":"https://api.github.com/users/dziemba/gists{/gist_id}","starred_url":"https://api.github.com/users/dziemba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dziemba/subscriptions","organizations_url":"https://api.github.com/users/dziemba/orgs","repos_url":"https://api.github.com/users/dziemba/repos","events_url":"https://api.github.com/users/dziemba/events{/privacy}","received_events_url":"https://api.github.com/users/dziemba/received_events","type":"User","site_admin":false},"body":"Ruby 2.3 <3","created_at":"2016-02-18T10:04:43Z","updated_at":"2016-02-18T10:04:43Z","html_url":"https://github.com/ad2games/soapy_cake/pull/43#discussion_r53293465","pull_request_url":"https://api.github.com/repos/ad2games/soapy_cake/pulls/43","_links":{"self":{"href":"https://api.github.com/repos/ad2games/soapy_cake/pulls/comments/53293465"},"html":{"href":"https://github.com/ad2games/soapy_cake/pull/43#discussion_r53293465"},"pull_request":{"href":"https://api.github.com/repos/ad2games/soapy_cake/pulls/43"}}},"pull_request":{"url":"https://api.github.com/repos/ad2games/soapy_cake/pulls/43","id":59645031,"html_url":"https://github.com/ad2games/soapy_cake/pull/43","diff_url":"https://github.com/ad2games/soapy_cake/pull/43.diff","patch_url":"https://github.com/ad2games/soapy_cake/pull/43.patch","issue_url":"https://api.github.com/repos/ad2games/soapy_cake/issues/43","number":43,"state":"open","locked":false,"title":"Adds support for read-only mode via $CAKE_WRITE_ENABLED var","user":{"login":"ndreynolds","id":670471,"avatar_url":"https://avatars.githubusercontent.com/u/670471?v=3","gravatar_id":"","url":"https://api.github.com/users/ndreynolds","html_url":"https://github.com/ndreynolds","followers_url":"https://api.github.com/users/ndreynolds/followers","following_url":"https://api.github.com/users/ndreynolds/following{/other_user}","gists_url":"https://api.github.com/users/ndreynolds/gists{/gist_id}","starred_url":"https://api.github.com/users/ndreynolds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndreynolds/subscriptions","organizations_url":"https://api.github.com/users/ndreynolds/orgs","repos_url":"https://api.github.com/users/ndreynolds/repos","events_url":"https://api.github.com/users/ndreynolds/events{/privacy}","received_events_url":"https://api.github.com/users/ndreynolds/received_events","type":"User","site_admin":false},"body":"**Background:** In certain staging environments, we'd like to point the gem at production CAKE to QA reports with production data, while simultaneously providing the assurance that production data will not be accidentally modified.\r\n\r\n- Adds a read-only action whitelist to the API yaml file.\r\n- If an action not present in the whitelist is called, and the new ENV\r\n  var (`$CAKE_WRITE_ENABLED`) is not set, an error is raised and no\r\n  request is made.\r\n- Upgrading to this version will require setting the ENV var wherever\r\n  this behavior is not desired.\r\n- Rubocop updates","created_at":"2016-02-17T13:42:34Z","updated_at":"2016-02-18T10:04:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cc24050741728df5a9b26e7ed5143cce24b377e5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ad2games/soapy_cake/pulls/43/commits","review_comments_url":"https://api.github.com/repos/ad2games/soapy_cake/pulls/43/comments","review_comment_url":"https://api.github.com/repos/ad2games/soapy_cake/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ad2games/soapy_cake/issues/43/comments","statuses_url":"https://api.github.com/repos/ad2games/soapy_cake/statuses/83baf159afa11dcfc570cae15ba1bae2c9752a38","head":{"label":"ad2games:read-only-mode","ref":"read-only-mode","sha":"83baf159afa11dcfc570cae15ba1bae2c9752a38","user":{"login":"ad2games","id":7860017,"avatar_url":"https://avatars.githubusercontent.com/u/7860017?v=3","gravatar_id":"","url":"https://api.github.com/users/ad2games","html_url":"https://github.com/ad2games","followers_url":"https://api.github.com/users/ad2games/followers","following_url":"https://api.github.com/users/ad2games/following{/other_user}","gists_url":"https://api.github.com/users/ad2games/gists{/gist_id}","starred_url":"https://api.github.com/users/ad2games/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ad2games/subscriptions","organizations_url":"https://api.github.com/users/ad2games/orgs","repos_url":"https://api.github.com/users/ad2games/repos","events_url":"https://api.github.com/users/ad2games/events{/privacy}","received_events_url":"https://api.github.com/users/ad2games/received_events","type":"Organization","site_admin":false},"repo":{"id":18368930,"name":"soapy_cake","full_name":"ad2games/soapy_cake","owner":{"login":"ad2games","id":7860017,"avatar_url":"https://avatars.githubusercontent.com/u/7860017?v=3","gravatar_id":"","url":"https://api.github.com/users/ad2games","html_url":"https://github.com/ad2games","followers_url":"https://api.github.com/users/ad2games/followers","following_url":"https://api.github.com/users/ad2games/following{/other_user}","gists_url":"https://api.github.com/users/ad2games/gists{/gist_id}","starred_url":"https://api.github.com/users/ad2games/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ad2games/subscriptions","organizations_url":"https://api.github.com/users/ad2games/orgs","repos_url":"https://api.github.com/users/ad2games/repos","events_url":"https://api.github.com/users/ad2games/events{/privacy}","received_events_url":"https://api.github.com/users/ad2games/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ad2games/soapy_cake","description":"Client library for CAKE.","fork":false,"url":"https://api.github.com/repos/ad2games/soapy_cake","forks_url":"https://api.github.com/repos/ad2games/soapy_cake/forks","keys_url":"https://api.github.com/repos/ad2games/soapy_cake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ad2games/soapy_cake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ad2games/soapy_cake/teams","hooks_url":"https://api.github.com/repos/ad2games/soapy_cake/hooks","issue_events_url":"https://api.github.com/repos/ad2games/soapy_cake/issues/events{/number}","events_url":"https://api.github.com/repos/ad2games/soapy_cake/events","assignees_url":"https://api.github.com/repos/ad2games/soapy_cake/assignees{/user}","branches_url":"https://api.github.com/repos/ad2games/soapy_cake/branches{/branch}","tags_url":"https://api.github.com/repos/ad2games/soapy_cake/tags","blobs_url":"https://api.github.com/repos/ad2games/soapy_cake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ad2games/soapy_cake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ad2games/soapy_cake/git/refs{/sha}","trees_url":"https://api.github.com/repos/ad2games/soapy_cake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ad2games/soapy_cake/statuses/{sha}","languages_url":"https://api.github.com/repos/ad2games/soapy_cake/languages","stargazers_url":"https://api.github.com/repos/ad2games/soapy_cake/stargazers","contributors_url":"https://api.github.com/repos/ad2games/soapy_cake/contributors","subscribers_url":"https://api.github.com/repos/ad2games/soapy_cake/subscribers","subscription_url":"https://api.github.com/repos/ad2games/soapy_cake/subscription","commits_url":"https://api.github.com/repos/ad2games/soapy_cake/commits{/sha}","git_commits_url":"https://api.github.com/repos/ad2games/soapy_cake/git/commits{/sha}","comments_url":"https://api.github.com/repos/ad2games/soapy_cake/comments{/number}","issue_comment_url":"https://api.github.com/repos/ad2games/soapy_cake/issues/comments{/number}","contents_url":"https://api.github.com/repos/ad2games/soapy_cake/contents/{+path}","compare_url":"https://api.github.com/repos/ad2games/soapy_cake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ad2games/soapy_cake/merges","archive_url":"https://api.github.com/repos/ad2games/soapy_cake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ad2games/soapy_cake/downloads","issues_url":"https://api.github.com/repos/ad2games/soapy_cake/issues{/number}","pulls_url":"https://api.github.com/repos/ad2games/soapy_cake/pulls{/number}","milestones_url":"https://api.github.com/repos/ad2games/soapy_cake/milestones{/number}","notifications_url":"https://api.github.com/repos/ad2games/soapy_cake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ad2games/soapy_cake/labels{/name}","releases_url":"https://api.github.com/repos/ad2games/soapy_cake/releases{/id}","deployments_url":"https://api.github.com/repos/ad2games/soapy_cake/deployments","created_at":"2014-04-02T14:20:14Z","updated_at":"2016-01-19T10:07:08Z","pushed_at":"2016-02-17T13:42:34Z","git_url":"git://github.com/ad2games/soapy_cake.git","ssh_url":"git@github.com:ad2games/soapy_cake.git","clone_url":"https://github.com/ad2games/soapy_cake.git","svn_url":"https://github.com/ad2games/soapy_cake","homepage":"","size":337,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ad2games:master","ref":"master","sha":"555226809b10580c7f837ab8ca1571169992dbd2","user":{"login":"ad2games","id":7860017,"avatar_url":"https://avatars.githubusercontent.com/u/7860017?v=3","gravatar_id":"","url":"https://api.github.com/users/ad2games","html_url":"https://github.com/ad2games","followers_url":"https://api.github.com/users/ad2games/followers","following_url":"https://api.github.com/users/ad2games/following{/other_user}","gists_url":"https://api.github.com/users/ad2games/gists{/gist_id}","starred_url":"https://api.github.com/users/ad2games/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ad2games/subscriptions","organizations_url":"https://api.github.com/users/ad2games/orgs","repos_url":"https://api.github.com/users/ad2games/repos","events_url":"https://api.github.com/users/ad2games/events{/privacy}","received_events_url":"https://api.github.com/users/ad2games/received_events","type":"Organization","site_admin":false},"repo":{"id":18368930,"name":"soapy_cake","full_name":"ad2games/soapy_cake","owner":{"login":"ad2games","id":7860017,"avatar_url":"https://avatars.githubusercontent.com/u/7860017?v=3","gravatar_id":"","url":"https://api.github.com/users/ad2games","html_url":"https://github.com/ad2games","followers_url":"https://api.github.com/users/ad2games/followers","following_url":"https://api.github.com/users/ad2games/following{/other_user}","gists_url":"https://api.github.com/users/ad2games/gists{/gist_id}","starred_url":"https://api.github.com/users/ad2games/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ad2games/subscriptions","organizations_url":"https://api.github.com/users/ad2games/orgs","repos_url":"https://api.github.com/users/ad2games/repos","events_url":"https://api.github.com/users/ad2games/events{/privacy}","received_events_url":"https://api.github.com/users/ad2games/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ad2games/soapy_cake","description":"Client library for CAKE.","fork":false,"url":"https://api.github.com/repos/ad2games/soapy_cake","forks_url":"https://api.github.com/repos/ad2games/soapy_cake/forks","keys_url":"https://api.github.com/repos/ad2games/soapy_cake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ad2games/soapy_cake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ad2games/soapy_cake/teams","hooks_url":"https://api.github.com/repos/ad2games/soapy_cake/hooks","issue_events_url":"https://api.github.com/repos/ad2games/soapy_cake/issues/events{/number}","events_url":"https://api.github.com/repos/ad2games/soapy_cake/events","assignees_url":"https://api.github.com/repos/ad2games/soapy_cake/assignees{/user}","branches_url":"https://api.github.com/repos/ad2games/soapy_cake/branches{/branch}","tags_url":"https://api.github.com/repos/ad2games/soapy_cake/tags","blobs_url":"https://api.github.com/repos/ad2games/soapy_cake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ad2games/soapy_cake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ad2games/soapy_cake/git/refs{/sha}","trees_url":"https://api.github.com/repos/ad2games/soapy_cake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ad2games/soapy_cake/statuses/{sha}","languages_url":"https://api.github.com/repos/ad2games/soapy_cake/languages","stargazers_url":"https://api.github.com/repos/ad2games/soapy_cake/stargazers","contributors_url":"https://api.github.com/repos/ad2games/soapy_cake/contributors","subscribers_url":"https://api.github.com/repos/ad2games/soapy_cake/subscribers","subscription_url":"https://api.github.com/repos/ad2games/soapy_cake/subscription","commits_url":"https://api.github.com/repos/ad2games/soapy_cake/commits{/sha}","git_commits_url":"https://api.github.com/repos/ad2games/soapy_cake/git/commits{/sha}","comments_url":"https://api.github.com/repos/ad2games/soapy_cake/comments{/number}","issue_comment_url":"https://api.github.com/repos/ad2games/soapy_cake/issues/comments{/number}","contents_url":"https://api.github.com/repos/ad2games/soapy_cake/contents/{+path}","compare_url":"https://api.github.com/repos/ad2games/soapy_cake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ad2games/soapy_cake/merges","archive_url":"https://api.github.com/repos/ad2games/soapy_cake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ad2games/soapy_cake/downloads","issues_url":"https://api.github.com/repos/ad2games/soapy_cake/issues{/number}","pulls_url":"https://api.github.com/repos/ad2games/soapy_cake/pulls{/number}","milestones_url":"https://api.github.com/repos/ad2games/soapy_cake/milestones{/number}","notifications_url":"https://api.github.com/repos/ad2games/soapy_cake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ad2games/soapy_cake/labels{/name}","releases_url":"https://api.github.com/repos/ad2games/soapy_cake/releases{/id}","deployments_url":"https://api.github.com/repos/ad2games/soapy_cake/deployments","created_at":"2014-04-02T14:20:14Z","updated_at":"2016-01-19T10:07:08Z","pushed_at":"2016-02-17T13:42:34Z","git_url":"git://github.com/ad2games/soapy_cake.git","ssh_url":"git@github.com:ad2games/soapy_cake.git","clone_url":"https://github.com/ad2games/soapy_cake.git","svn_url":"https://github.com/ad2games/soapy_cake","homepage":"","size":337,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ad2games/soapy_cake/pulls/43"},"html":{"href":"https://github.com/ad2games/soapy_cake/pull/43"},"issue":{"href":"https://api.github.com/repos/ad2games/soapy_cake/issues/43"},"comments":{"href":"https://api.github.com/repos/ad2games/soapy_cake/issues/43/comments"},"review_comments":{"href":"https://api.github.com/repos/ad2games/soapy_cake/pulls/43/comments"},"review_comment":{"href":"https://api.github.com/repos/ad2games/soapy_cake/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ad2games/soapy_cake/pulls/43/commits"},"statuses":{"href":"https://api.github.com/repos/ad2games/soapy_cake/statuses/83baf159afa11dcfc570cae15ba1bae2c9752a38"}}}}