{"action":"created","comment":{"url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/pulls/comments/59190235","id":59190235,"diff_hunk":"@@ -0,0 +1,84 @@\n+require 'net/http'\n+require 'open3'\n+require 'openssl'\n+\n+class GyazoClient\n+\n+  def initialize(opts = {})\n+    default_opts = {\n+      id_file:       ENV['HOME'] + \"/.gyazotest.id\",","path":"src/gyazo_client.rb","position":9,"original_position":9,"commit_id":"5522a085ae237f912ba9aba49e5bb26c0496eb37","original_commit_id":"5522a085ae237f912ba9aba49e5bb26c0496eb37","user":{"login":"drobune","id":3685237,"avatar_url":"https://avatars.githubusercontent.com/u/3685237?v=3","gravatar_id":"","url":"https://api.github.com/users/drobune","html_url":"https://github.com/drobune","followers_url":"https://api.github.com/users/drobune/followers","following_url":"https://api.github.com/users/drobune/following{/other_user}","gists_url":"https://api.github.com/users/drobune/gists{/gist_id}","starred_url":"https://api.github.com/users/drobune/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drobune/subscriptions","organizations_url":"https://api.github.com/users/drobune/orgs","repos_url":"https://api.github.com/users/drobune/repos","events_url":"https://api.github.com/users/drobune/events{/privacy}","received_events_url":"https://api.github.com/users/drobune/received_events","type":"User","site_admin":false},"body":"Sorry, this is my mistake. I leave debug codes.\r\nI will fix  \"/.gyazotest.id\" -> \"/.gyazo.id\"","created_at":"2016-04-11T11:37:43Z","updated_at":"2016-04-11T11:37:43Z","html_url":"https://github.com/gyazo/Gyazo-for-Linux/pull/64#discussion_r59190235","pull_request_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/pulls/64","_links":{"self":{"href":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/pulls/comments/59190235"},"html":{"href":"https://github.com/gyazo/Gyazo-for-Linux/pull/64#discussion_r59190235"},"pull_request":{"href":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/pulls/64"}}},"pull_request":{"url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/pulls/64","id":65730736,"html_url":"https://github.com/gyazo/Gyazo-for-Linux/pull/64","diff_url":"https://github.com/gyazo/Gyazo-for-Linux/pull/64.diff","patch_url":"https://github.com/gyazo/Gyazo-for-Linux/pull/64.patch","issue_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/issues/64","number":64,"state":"open","locked":false,"title":"Refactoring gyazo ruby script","user":{"login":"drobune","id":3685237,"avatar_url":"https://avatars.githubusercontent.com/u/3685237?v=3","gravatar_id":"","url":"https://api.github.com/users/drobune","html_url":"https://github.com/drobune","followers_url":"https://api.github.com/users/drobune/followers","following_url":"https://api.github.com/users/drobune/following{/other_user}","gists_url":"https://api.github.com/users/drobune/gists{/gist_id}","starred_url":"https://api.github.com/users/drobune/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drobune/subscriptions","organizations_url":"https://api.github.com/users/drobune/orgs","repos_url":"https://api.github.com/users/drobune/repos","events_url":"https://api.github.com/users/drobune/events{/privacy}","received_events_url":"https://api.github.com/users/drobune/received_events","type":"User","site_admin":false},"body":"It seems getting complex. I try to refactor.\r\n\r\nI generate GyazoClient class.The reasons is next.\r\n\r\n- Reduce code size in one file.\r\n- Put codes of environment variables in one.\r\n\r\nAlso I add brief test for GyazoClient.","created_at":"2016-04-08T03:03:13Z","updated_at":"2016-04-11T11:37:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"896aa0bad1ff5e4d1dd14f0859c8bce6b16e12ce","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/pulls/64/commits","review_comments_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/pulls/64/comments","review_comment_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/issues/64/comments","statuses_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/statuses/5522a085ae237f912ba9aba49e5bb26c0496eb37","head":{"label":"gyazo:drobune-patch-2","ref":"drobune-patch-2","sha":"5522a085ae237f912ba9aba49e5bb26c0496eb37","user":{"login":"gyazo","id":140548,"avatar_url":"https://avatars.githubusercontent.com/u/140548?v=3","gravatar_id":"","url":"https://api.github.com/users/gyazo","html_url":"https://github.com/gyazo","followers_url":"https://api.github.com/users/gyazo/followers","following_url":"https://api.github.com/users/gyazo/following{/other_user}","gists_url":"https://api.github.com/users/gyazo/gists{/gist_id}","starred_url":"https://api.github.com/users/gyazo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gyazo/subscriptions","organizations_url":"https://api.github.com/users/gyazo/orgs","repos_url":"https://api.github.com/users/gyazo/repos","events_url":"https://api.github.com/users/gyazo/events{/privacy}","received_events_url":"https://api.github.com/users/gyazo/received_events","type":"Organization","site_admin":false},"repo":{"id":340290,"name":"Gyazo-for-Linux","full_name":"gyazo/Gyazo-for-Linux","owner":{"login":"gyazo","id":140548,"avatar_url":"https://avatars.githubusercontent.com/u/140548?v=3","gravatar_id":"","url":"https://api.github.com/users/gyazo","html_url":"https://github.com/gyazo","followers_url":"https://api.github.com/users/gyazo/followers","following_url":"https://api.github.com/users/gyazo/following{/other_user}","gists_url":"https://api.github.com/users/gyazo/gists{/gist_id}","starred_url":"https://api.github.com/users/gyazo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gyazo/subscriptions","organizations_url":"https://api.github.com/users/gyazo/orgs","repos_url":"https://api.github.com/users/gyazo/repos","events_url":"https://api.github.com/users/gyazo/events{/privacy}","received_events_url":"https://api.github.com/users/gyazo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gyazo/Gyazo-for-Linux","description":"Gyazo for Linux","fork":false,"url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux","forks_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/forks","keys_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/teams","hooks_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/hooks","issue_events_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/issues/events{/number}","events_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/events","assignees_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/assignees{/user}","branches_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/branches{/branch}","tags_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/tags","blobs_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/git/refs{/sha}","trees_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/statuses/{sha}","languages_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/languages","stargazers_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/stargazers","contributors_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/contributors","subscribers_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/subscribers","subscription_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/subscription","commits_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/commits{/sha}","git_commits_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/git/commits{/sha}","comments_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/comments{/number}","issue_comment_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/issues/comments{/number}","contents_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/contents/{+path}","compare_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/merges","archive_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/downloads","issues_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/issues{/number}","pulls_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/pulls{/number}","milestones_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/milestones{/number}","notifications_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/labels{/name}","releases_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/releases{/id}","deployments_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/deployments","created_at":"2009-10-17T06:40:53Z","updated_at":"2016-04-08T17:55:35Z","pushed_at":"2016-04-08T11:45:16Z","git_url":"git://github.com/gyazo/Gyazo-for-Linux.git","ssh_url":"git@github.com:gyazo/Gyazo-for-Linux.git","clone_url":"https://github.com/gyazo/Gyazo-for-Linux.git","svn_url":"https://github.com/gyazo/Gyazo-for-Linux","homepage":"http://gyazo.com","size":272,"stargazers_count":145,"watchers_count":145,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":66,"mirror_url":null,"open_issues_count":4,"forks":66,"open_issues":4,"watchers":145,"default_branch":"master"}},"base":{"label":"gyazo:master","ref":"master","sha":"fbfbe01e3c089a3366e68cd6d3ce300009048c79","user":{"login":"gyazo","id":140548,"avatar_url":"https://avatars.githubusercontent.com/u/140548?v=3","gravatar_id":"","url":"https://api.github.com/users/gyazo","html_url":"https://github.com/gyazo","followers_url":"https://api.github.com/users/gyazo/followers","following_url":"https://api.github.com/users/gyazo/following{/other_user}","gists_url":"https://api.github.com/users/gyazo/gists{/gist_id}","starred_url":"https://api.github.com/users/gyazo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gyazo/subscriptions","organizations_url":"https://api.github.com/users/gyazo/orgs","repos_url":"https://api.github.com/users/gyazo/repos","events_url":"https://api.github.com/users/gyazo/events{/privacy}","received_events_url":"https://api.github.com/users/gyazo/received_events","type":"Organization","site_admin":false},"repo":{"id":340290,"name":"Gyazo-for-Linux","full_name":"gyazo/Gyazo-for-Linux","owner":{"login":"gyazo","id":140548,"avatar_url":"https://avatars.githubusercontent.com/u/140548?v=3","gravatar_id":"","url":"https://api.github.com/users/gyazo","html_url":"https://github.com/gyazo","followers_url":"https://api.github.com/users/gyazo/followers","following_url":"https://api.github.com/users/gyazo/following{/other_user}","gists_url":"https://api.github.com/users/gyazo/gists{/gist_id}","starred_url":"https://api.github.com/users/gyazo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gyazo/subscriptions","organizations_url":"https://api.github.com/users/gyazo/orgs","repos_url":"https://api.github.com/users/gyazo/repos","events_url":"https://api.github.com/users/gyazo/events{/privacy}","received_events_url":"https://api.github.com/users/gyazo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gyazo/Gyazo-for-Linux","description":"Gyazo for Linux","fork":false,"url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux","forks_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/forks","keys_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/teams","hooks_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/hooks","issue_events_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/issues/events{/number}","events_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/events","assignees_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/assignees{/user}","branches_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/branches{/branch}","tags_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/tags","blobs_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/git/refs{/sha}","trees_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/statuses/{sha}","languages_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/languages","stargazers_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/stargazers","contributors_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/contributors","subscribers_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/subscribers","subscription_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/subscription","commits_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/commits{/sha}","git_commits_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/git/commits{/sha}","comments_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/comments{/number}","issue_comment_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/issues/comments{/number}","contents_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/contents/{+path}","compare_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/merges","archive_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/downloads","issues_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/issues{/number}","pulls_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/pulls{/number}","milestones_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/milestones{/number}","notifications_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/labels{/name}","releases_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/releases{/id}","deployments_url":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/deployments","created_at":"2009-10-17T06:40:53Z","updated_at":"2016-04-08T17:55:35Z","pushed_at":"2016-04-08T11:45:16Z","git_url":"git://github.com/gyazo/Gyazo-for-Linux.git","ssh_url":"git@github.com:gyazo/Gyazo-for-Linux.git","clone_url":"https://github.com/gyazo/Gyazo-for-Linux.git","svn_url":"https://github.com/gyazo/Gyazo-for-Linux","homepage":"http://gyazo.com","size":272,"stargazers_count":145,"watchers_count":145,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":66,"mirror_url":null,"open_issues_count":4,"forks":66,"open_issues":4,"watchers":145,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/pulls/64"},"html":{"href":"https://github.com/gyazo/Gyazo-for-Linux/pull/64"},"issue":{"href":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/issues/64"},"comments":{"href":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/issues/64/comments"},"review_comments":{"href":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/pulls/64/comments"},"review_comment":{"href":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/pulls/64/commits"},"statuses":{"href":"https://api.github.com/repos/gyazo/Gyazo-for-Linux/statuses/5522a085ae237f912ba9aba49e5bb26c0496eb37"}}}}