{"action":"created","comment":{"url":"https://api.github.com/repos/namely/connect/pulls/comments/33159555","id":33159555,"diff_hunk":"@@ -1,6 +1,46 @@\n require \"rails_helper\"\n \n describe NetSuite::Client do\n+  describe \".from_env\" do\n+    it \"finds authorization from the environment\" do\n+      env = {\n+        \"CLOUD_ELEMENTS_USER_SECRET\" => \"user-secret\",\n+        \"CLOUD_ELEMENTS_ORGANIZATION_SECRET\" => \"org-secret\"\n+      }\n+\n+      ClimateControl.modify env do\n+        stub_request(:post, /.*/)\n+        client = NetSuite::Client.from_env\n+\n+        client.create_instance({})\n+\n+        expect(WebMock).to have_requested(:post, /.*/).with(headers: {\n+          \"Authorization\" => \"User user-secret, Organization org-secret\"\n+        })","path":"spec/models/net_suite/client_spec.rb","position":19,"original_position":19,"commit_id":"cc9175f8542a13740e8ec516f3fe70924c351806","original_commit_id":"cc9175f8542a13740e8ec516f3fe70924c351806","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":"Indent the right brace the same as the first position after the preceding left parenthesis.","created_at":"2015-06-24T15:26:38Z","updated_at":"2015-06-24T15:26:38Z","html_url":"https://github.com/namely/connect/pull/119#discussion_r33159555","pull_request_url":"https://api.github.com/repos/namely/connect/pulls/119","_links":{"self":{"href":"https://api.github.com/repos/namely/connect/pulls/comments/33159555"},"html":{"href":"https://github.com/namely/connect/pull/119#discussion_r33159555"},"pull_request":{"href":"https://api.github.com/repos/namely/connect/pulls/119"}}},"pull_request":{"url":"https://api.github.com/repos/namely/connect/pulls/119","id":38454304,"html_url":"https://github.com/namely/connect/pull/119","diff_url":"https://github.com/namely/connect/pull/119.diff","patch_url":"https://github.com/namely/connect/pull/119.patch","issue_url":"https://api.github.com/repos/namely/connect/issues/119","number":119,"state":"open","locked":false,"title":"Refactor client initialization","user":{"login":"jferris","id":7591,"avatar_url":"https://avatars.githubusercontent.com/u/7591?v=3","gravatar_id":"","url":"https://api.github.com/users/jferris","html_url":"https://github.com/jferris","followers_url":"https://api.github.com/users/jferris/followers","following_url":"https://api.github.com/users/jferris/following{/other_user}","gists_url":"https://api.github.com/users/jferris/gists{/gist_id}","starred_url":"https://api.github.com/users/jferris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jferris/subscriptions","organizations_url":"https://api.github.com/users/jferris/orgs","repos_url":"https://api.github.com/users/jferris/repos","events_url":"https://api.github.com/users/jferris/events{/privacy}","received_events_url":"https://api.github.com/users/jferris/received_events","type":"User","site_admin":false},"body":"* Encapsulate ENV variables in one place\n* Remove direct Client references in controllers\n* Makes it easier initialize clients in several places\n* Makes it easier to consolidate controllers","created_at":"2015-06-24T15:26:33Z","updated_at":"2015-06-24T15:26:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/namely/connect/pulls/119/commits","review_comments_url":"https://api.github.com/repos/namely/connect/pulls/119/comments","review_comment_url":"https://api.github.com/repos/namely/connect/pulls/comments{/number}","comments_url":"https://api.github.com/repos/namely/connect/issues/119/comments","statuses_url":"https://api.github.com/repos/namely/connect/statuses/cc9175f8542a13740e8ec516f3fe70924c351806","head":{"label":"namely:refactor-client-initialization","ref":"refactor-client-initialization","sha":"cc9175f8542a13740e8ec516f3fe70924c351806","user":{"login":"namely","id":1004321,"avatar_url":"https://avatars.githubusercontent.com/u/1004321?v=3","gravatar_id":"","url":"https://api.github.com/users/namely","html_url":"https://github.com/namely","followers_url":"https://api.github.com/users/namely/followers","following_url":"https://api.github.com/users/namely/following{/other_user}","gists_url":"https://api.github.com/users/namely/gists{/gist_id}","starred_url":"https://api.github.com/users/namely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namely/subscriptions","organizations_url":"https://api.github.com/users/namely/orgs","repos_url":"https://api.github.com/users/namely/repos","events_url":"https://api.github.com/users/namely/events{/privacy}","received_events_url":"https://api.github.com/users/namely/received_events","type":"Organization","site_admin":false},"repo":{"id":26101808,"name":"connect","full_name":"namely/connect","owner":{"login":"namely","id":1004321,"avatar_url":"https://avatars.githubusercontent.com/u/1004321?v=3","gravatar_id":"","url":"https://api.github.com/users/namely","html_url":"https://github.com/namely","followers_url":"https://api.github.com/users/namely/followers","following_url":"https://api.github.com/users/namely/following{/other_user}","gists_url":"https://api.github.com/users/namely/gists{/gist_id}","starred_url":"https://api.github.com/users/namely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namely/subscriptions","organizations_url":"https://api.github.com/users/namely/orgs","repos_url":"https://api.github.com/users/namely/repos","events_url":"https://api.github.com/users/namely/events{/privacy}","received_events_url":"https://api.github.com/users/namely/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/namely/connect","description":"Namely Connect – Integrations with the Namely HRIS System.","fork":false,"url":"https://api.github.com/repos/namely/connect","forks_url":"https://api.github.com/repos/namely/connect/forks","keys_url":"https://api.github.com/repos/namely/connect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/namely/connect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/namely/connect/teams","hooks_url":"https://api.github.com/repos/namely/connect/hooks","issue_events_url":"https://api.github.com/repos/namely/connect/issues/events{/number}","events_url":"https://api.github.com/repos/namely/connect/events","assignees_url":"https://api.github.com/repos/namely/connect/assignees{/user}","branches_url":"https://api.github.com/repos/namely/connect/branches{/branch}","tags_url":"https://api.github.com/repos/namely/connect/tags","blobs_url":"https://api.github.com/repos/namely/connect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/namely/connect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/namely/connect/git/refs{/sha}","trees_url":"https://api.github.com/repos/namely/connect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/namely/connect/statuses/{sha}","languages_url":"https://api.github.com/repos/namely/connect/languages","stargazers_url":"https://api.github.com/repos/namely/connect/stargazers","contributors_url":"https://api.github.com/repos/namely/connect/contributors","subscribers_url":"https://api.github.com/repos/namely/connect/subscribers","subscription_url":"https://api.github.com/repos/namely/connect/subscription","commits_url":"https://api.github.com/repos/namely/connect/commits{/sha}","git_commits_url":"https://api.github.com/repos/namely/connect/git/commits{/sha}","comments_url":"https://api.github.com/repos/namely/connect/comments{/number}","issue_comment_url":"https://api.github.com/repos/namely/connect/issues/comments{/number}","contents_url":"https://api.github.com/repos/namely/connect/contents/{+path}","compare_url":"https://api.github.com/repos/namely/connect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/namely/connect/merges","archive_url":"https://api.github.com/repos/namely/connect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/namely/connect/downloads","issues_url":"https://api.github.com/repos/namely/connect/issues{/number}","pulls_url":"https://api.github.com/repos/namely/connect/pulls{/number}","milestones_url":"https://api.github.com/repos/namely/connect/milestones{/number}","notifications_url":"https://api.github.com/repos/namely/connect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/namely/connect/labels{/name}","releases_url":"https://api.github.com/repos/namely/connect/releases{/id}","created_at":"2014-11-03T03:10:16Z","updated_at":"2015-06-16T14:13:51Z","pushed_at":"2015-06-24T15:26:33Z","git_url":"git://github.com/namely/connect.git","ssh_url":"git@github.com:namely/connect.git","clone_url":"https://github.com/namely/connect.git","svn_url":"https://github.com/namely/connect","homepage":"","size":4137,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"namely:master","ref":"master","sha":"1dbe8be5325e1ebc10213c8ff2b653f94bc2adb4","user":{"login":"namely","id":1004321,"avatar_url":"https://avatars.githubusercontent.com/u/1004321?v=3","gravatar_id":"","url":"https://api.github.com/users/namely","html_url":"https://github.com/namely","followers_url":"https://api.github.com/users/namely/followers","following_url":"https://api.github.com/users/namely/following{/other_user}","gists_url":"https://api.github.com/users/namely/gists{/gist_id}","starred_url":"https://api.github.com/users/namely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namely/subscriptions","organizations_url":"https://api.github.com/users/namely/orgs","repos_url":"https://api.github.com/users/namely/repos","events_url":"https://api.github.com/users/namely/events{/privacy}","received_events_url":"https://api.github.com/users/namely/received_events","type":"Organization","site_admin":false},"repo":{"id":26101808,"name":"connect","full_name":"namely/connect","owner":{"login":"namely","id":1004321,"avatar_url":"https://avatars.githubusercontent.com/u/1004321?v=3","gravatar_id":"","url":"https://api.github.com/users/namely","html_url":"https://github.com/namely","followers_url":"https://api.github.com/users/namely/followers","following_url":"https://api.github.com/users/namely/following{/other_user}","gists_url":"https://api.github.com/users/namely/gists{/gist_id}","starred_url":"https://api.github.com/users/namely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namely/subscriptions","organizations_url":"https://api.github.com/users/namely/orgs","repos_url":"https://api.github.com/users/namely/repos","events_url":"https://api.github.com/users/namely/events{/privacy}","received_events_url":"https://api.github.com/users/namely/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/namely/connect","description":"Namely Connect – Integrations with the Namely HRIS System.","fork":false,"url":"https://api.github.com/repos/namely/connect","forks_url":"https://api.github.com/repos/namely/connect/forks","keys_url":"https://api.github.com/repos/namely/connect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/namely/connect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/namely/connect/teams","hooks_url":"https://api.github.com/repos/namely/connect/hooks","issue_events_url":"https://api.github.com/repos/namely/connect/issues/events{/number}","events_url":"https://api.github.com/repos/namely/connect/events","assignees_url":"https://api.github.com/repos/namely/connect/assignees{/user}","branches_url":"https://api.github.com/repos/namely/connect/branches{/branch}","tags_url":"https://api.github.com/repos/namely/connect/tags","blobs_url":"https://api.github.com/repos/namely/connect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/namely/connect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/namely/connect/git/refs{/sha}","trees_url":"https://api.github.com/repos/namely/connect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/namely/connect/statuses/{sha}","languages_url":"https://api.github.com/repos/namely/connect/languages","stargazers_url":"https://api.github.com/repos/namely/connect/stargazers","contributors_url":"https://api.github.com/repos/namely/connect/contributors","subscribers_url":"https://api.github.com/repos/namely/connect/subscribers","subscription_url":"https://api.github.com/repos/namely/connect/subscription","commits_url":"https://api.github.com/repos/namely/connect/commits{/sha}","git_commits_url":"https://api.github.com/repos/namely/connect/git/commits{/sha}","comments_url":"https://api.github.com/repos/namely/connect/comments{/number}","issue_comment_url":"https://api.github.com/repos/namely/connect/issues/comments{/number}","contents_url":"https://api.github.com/repos/namely/connect/contents/{+path}","compare_url":"https://api.github.com/repos/namely/connect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/namely/connect/merges","archive_url":"https://api.github.com/repos/namely/connect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/namely/connect/downloads","issues_url":"https://api.github.com/repos/namely/connect/issues{/number}","pulls_url":"https://api.github.com/repos/namely/connect/pulls{/number}","milestones_url":"https://api.github.com/repos/namely/connect/milestones{/number}","notifications_url":"https://api.github.com/repos/namely/connect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/namely/connect/labels{/name}","releases_url":"https://api.github.com/repos/namely/connect/releases{/id}","created_at":"2014-11-03T03:10:16Z","updated_at":"2015-06-16T14:13:51Z","pushed_at":"2015-06-24T15:26:33Z","git_url":"git://github.com/namely/connect.git","ssh_url":"git@github.com:namely/connect.git","clone_url":"https://github.com/namely/connect.git","svn_url":"https://github.com/namely/connect","homepage":"","size":4137,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/namely/connect/pulls/119"},"html":{"href":"https://github.com/namely/connect/pull/119"},"issue":{"href":"https://api.github.com/repos/namely/connect/issues/119"},"comments":{"href":"https://api.github.com/repos/namely/connect/issues/119/comments"},"review_comments":{"href":"https://api.github.com/repos/namely/connect/pulls/119/comments"},"review_comment":{"href":"https://api.github.com/repos/namely/connect/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/namely/connect/pulls/119/commits"},"statuses":{"href":"https://api.github.com/repos/namely/connect/statuses/cc9175f8542a13740e8ec516f3fe70924c351806"}}}}