{"action":"created","comment":{"url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/pulls/comments/82589405","pull_request_review_id":3485759,"id":82589405,"diff_hunk":"@@ -37,7 +37,7 @@ def request(method, path, query_params = {}, body_params = {})\n       response = connection.send(method) do |request|\n         request.url(path, query_params)\n         request.headers['Content-Type'] = 'application/json'\n-        request.headers['X-MailerLite-ApiKey'] = client.config.api_key\n+        request.headers['X-MailerLite-ApiKey'] = client.config.api_key if client.config.api_key","path":"lib/mailerlite/connection.rb","position":5,"original_position":5,"commit_id":"2f5f6aac29c7204e355ecc59300a9f05fa85a91a","original_commit_id":"2f5f6aac29c7204e355ecc59300a9f05fa85a91a","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.<br>Line is too long. [95/80]","created_at":"2016-10-10T11:55:49Z","updated_at":"2016-10-10T11:55:49Z","html_url":"https://github.com/jpalumickas/mailerlite-ruby/pull/2#discussion_r82589405","pull_request_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/pulls/comments/82589405"},"html":{"href":"https://github.com/jpalumickas/mailerlite-ruby/pull/2#discussion_r82589405"},"pull_request":{"href":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/pulls/2","id":88650060,"html_url":"https://github.com/jpalumickas/mailerlite-ruby/pull/2","diff_url":"https://github.com/jpalumickas/mailerlite-ruby/pull/2.diff","patch_url":"https://github.com/jpalumickas/mailerlite-ruby/pull/2.patch","issue_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/issues/2","number":2,"state":"open","locked":false,"title":"Better error when API key is not set","user":{"login":"PavelPenkov","id":375548,"avatar_url":"https://avatars.githubusercontent.com/u/375548?v=3","gravatar_id":"","url":"https://api.github.com/users/PavelPenkov","html_url":"https://github.com/PavelPenkov","followers_url":"https://api.github.com/users/PavelPenkov/followers","following_url":"https://api.github.com/users/PavelPenkov/following{/other_user}","gists_url":"https://api.github.com/users/PavelPenkov/gists{/gist_id}","starred_url":"https://api.github.com/users/PavelPenkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PavelPenkov/subscriptions","organizations_url":"https://api.github.com/users/PavelPenkov/orgs","repos_url":"https://api.github.com/users/PavelPenkov/repos","events_url":"https://api.github.com/users/PavelPenkov/events{/privacy}","received_events_url":"https://api.github.com/users/PavelPenkov/received_events","type":"User","site_admin":false},"body":"If API key is not set client fails in the depth of `net/http` with cryptic error message (`Method 'strip' not found for 'nil'`), I think it's better to fail with 403 or whatever mailer lite API returns for unauthorized request.","created_at":"2016-10-10T11:55:41Z","updated_at":"2016-10-10T11:55:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc837b4c69c64d766648947bb96e8bfe78abc49c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/pulls/2/commits","review_comments_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/pulls/2/comments","review_comment_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/issues/2/comments","statuses_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/statuses/2f5f6aac29c7204e355ecc59300a9f05fa85a91a","head":{"label":"PavelPenkov:api_key_check","ref":"api_key_check","sha":"2f5f6aac29c7204e355ecc59300a9f05fa85a91a","user":{"login":"PavelPenkov","id":375548,"avatar_url":"https://avatars.githubusercontent.com/u/375548?v=3","gravatar_id":"","url":"https://api.github.com/users/PavelPenkov","html_url":"https://github.com/PavelPenkov","followers_url":"https://api.github.com/users/PavelPenkov/followers","following_url":"https://api.github.com/users/PavelPenkov/following{/other_user}","gists_url":"https://api.github.com/users/PavelPenkov/gists{/gist_id}","starred_url":"https://api.github.com/users/PavelPenkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PavelPenkov/subscriptions","organizations_url":"https://api.github.com/users/PavelPenkov/orgs","repos_url":"https://api.github.com/users/PavelPenkov/repos","events_url":"https://api.github.com/users/PavelPenkov/events{/privacy}","received_events_url":"https://api.github.com/users/PavelPenkov/received_events","type":"User","site_admin":false},"repo":{"id":70481020,"name":"mailerlite-ruby","full_name":"PavelPenkov/mailerlite-ruby","owner":{"login":"PavelPenkov","id":375548,"avatar_url":"https://avatars.githubusercontent.com/u/375548?v=3","gravatar_id":"","url":"https://api.github.com/users/PavelPenkov","html_url":"https://github.com/PavelPenkov","followers_url":"https://api.github.com/users/PavelPenkov/followers","following_url":"https://api.github.com/users/PavelPenkov/following{/other_user}","gists_url":"https://api.github.com/users/PavelPenkov/gists{/gist_id}","starred_url":"https://api.github.com/users/PavelPenkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PavelPenkov/subscriptions","organizations_url":"https://api.github.com/users/PavelPenkov/orgs","repos_url":"https://api.github.com/users/PavelPenkov/repos","events_url":"https://api.github.com/users/PavelPenkov/events{/privacy}","received_events_url":"https://api.github.com/users/PavelPenkov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PavelPenkov/mailerlite-ruby","description":"Ruby wrapper for MailerLite API v2","fork":true,"url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby","forks_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/forks","keys_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/teams","hooks_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/hooks","issue_events_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/events","assignees_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/tags","blobs_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/languages","stargazers_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/stargazers","contributors_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/contributors","subscribers_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/subscribers","subscription_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/subscription","commits_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/merges","archive_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/downloads","issues_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/labels{/name}","releases_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/releases{/id}","deployments_url":"https://api.github.com/repos/PavelPenkov/mailerlite-ruby/deployments","created_at":"2016-10-10T11:22:47Z","updated_at":"2016-10-10T11:22:48Z","pushed_at":"2016-10-10T11:33:30Z","git_url":"git://github.com/PavelPenkov/mailerlite-ruby.git","ssh_url":"git@github.com:PavelPenkov/mailerlite-ruby.git","clone_url":"https://github.com/PavelPenkov/mailerlite-ruby.git","svn_url":"https://github.com/PavelPenkov/mailerlite-ruby","homepage":"","size":55,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"jpalumickas:master","ref":"master","sha":"6b3493d01e226e6485ca77f456441ea9e3a4de09","user":{"login":"jpalumickas","id":2738630,"avatar_url":"https://avatars.githubusercontent.com/u/2738630?v=3","gravatar_id":"","url":"https://api.github.com/users/jpalumickas","html_url":"https://github.com/jpalumickas","followers_url":"https://api.github.com/users/jpalumickas/followers","following_url":"https://api.github.com/users/jpalumickas/following{/other_user}","gists_url":"https://api.github.com/users/jpalumickas/gists{/gist_id}","starred_url":"https://api.github.com/users/jpalumickas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpalumickas/subscriptions","organizations_url":"https://api.github.com/users/jpalumickas/orgs","repos_url":"https://api.github.com/users/jpalumickas/repos","events_url":"https://api.github.com/users/jpalumickas/events{/privacy}","received_events_url":"https://api.github.com/users/jpalumickas/received_events","type":"User","site_admin":false},"repo":{"id":56453403,"name":"mailerlite-ruby","full_name":"jpalumickas/mailerlite-ruby","owner":{"login":"jpalumickas","id":2738630,"avatar_url":"https://avatars.githubusercontent.com/u/2738630?v=3","gravatar_id":"","url":"https://api.github.com/users/jpalumickas","html_url":"https://github.com/jpalumickas","followers_url":"https://api.github.com/users/jpalumickas/followers","following_url":"https://api.github.com/users/jpalumickas/following{/other_user}","gists_url":"https://api.github.com/users/jpalumickas/gists{/gist_id}","starred_url":"https://api.github.com/users/jpalumickas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpalumickas/subscriptions","organizations_url":"https://api.github.com/users/jpalumickas/orgs","repos_url":"https://api.github.com/users/jpalumickas/repos","events_url":"https://api.github.com/users/jpalumickas/events{/privacy}","received_events_url":"https://api.github.com/users/jpalumickas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jpalumickas/mailerlite-ruby","description":"Ruby wrapper for MailerLite API v2","fork":false,"url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby","forks_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/forks","keys_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/teams","hooks_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/hooks","issue_events_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/events","assignees_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/tags","blobs_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/languages","stargazers_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/stargazers","contributors_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/contributors","subscribers_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/subscribers","subscription_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/subscription","commits_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/merges","archive_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/downloads","issues_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/labels{/name}","releases_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/releases{/id}","deployments_url":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/deployments","created_at":"2016-04-17T19:06:43Z","updated_at":"2016-08-28T16:05:23Z","pushed_at":"2016-10-10T11:55:42Z","git_url":"git://github.com/jpalumickas/mailerlite-ruby.git","ssh_url":"git@github.com:jpalumickas/mailerlite-ruby.git","clone_url":"https://github.com/jpalumickas/mailerlite-ruby.git","svn_url":"https://github.com/jpalumickas/mailerlite-ruby","homepage":"","size":55,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/pulls/2"},"html":{"href":"https://github.com/jpalumickas/mailerlite-ruby/pull/2"},"issue":{"href":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/issues/2"},"comments":{"href":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/jpalumickas/mailerlite-ruby/statuses/2f5f6aac29c7204e355ecc59300a9f05fa85a91a"}}}}
{"actor":{"display_login":"houndci-bot"}}