{"action":"created","comment":{"url":"https://api.github.com/repos/abonas/kubeclient/pulls/comments/26747265","id":26747265,"diff_hunk":"@@ -22,8 +22,12 @@ class Client\n       [Kubeclient.const_set(et, Class.new(RecursiveOpenStruct)), et]\n     end\n \n-    def initialize(uri, version)\n+    def initialize(uri, version = 'v1beta3')\n       @api_endpoint = (uri.is_a? URI) ? uri : URI.parse(uri)\n+\n+      unless @api_endpoint.path.include? 'api'\n+        @api_endpoint.merge!(File.join(@api_endpoint.path, 'api'))","path":"lib/kubeclient.rb","position":9,"original_position":9,"commit_id":"e1c3a48319bc0500c28411dbfcdcbda8eee3a312","original_commit_id":"e1c3a48319bc0500c28411dbfcdcbda8eee3a312","user":{"login":"Fryguy","id":52120,"avatar_url":"https://avatars.githubusercontent.com/u/52120?v=3","gravatar_id":"","url":"https://api.github.com/users/Fryguy","html_url":"https://github.com/Fryguy","followers_url":"https://api.github.com/users/Fryguy/followers","following_url":"https://api.github.com/users/Fryguy/following{/other_user}","gists_url":"https://api.github.com/users/Fryguy/gists{/gist_id}","starred_url":"https://api.github.com/users/Fryguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fryguy/subscriptions","organizations_url":"https://api.github.com/users/Fryguy/orgs","repos_url":"https://api.github.com/users/Fryguy/repos","events_url":"https://api.github.com/users/Fryguy/events{/privacy}","received_events_url":"https://api.github.com/users/Fryguy/received_events","type":"User","site_admin":false},"body":"Actually since you have a URI object,  perhaps you can just use it,  which\nwould be the most accurate.\nOn Mar 19, 2015 6:12 AM, \"abonas\" <notifications@github.com> wrote:\n\n> In lib/kubeclient.rb\n> <https://github.com/abonas/kubeclient/pull/42#discussion_r26741641>:\n>\n> >        @api_endpoint = (uri.is_a? URI) ? uri : URI.parse(uri)\n> > +\n> > +      unless @api_endpoint.path.include? 'api'\n> > +        @api_endpoint.merge!(File.join(@api_endpoint.path, 'api'))\n>\n>  You probably don't want this because File.join will use the default file\n> separator which is \\ on Windows. I would just use string interpolation.\n>\n> good point, thanks !\n> I assume the same goes for line 31 too (which is not part of this patch\n> though)\n>\n> BTW from looking at the documentation of the method it's really unclear...\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/abonas/kubeclient/pull/42/files#r26741641>.\n>\n","created_at":"2015-03-19T11:58:18Z","updated_at":"2015-03-19T11:58:18Z","html_url":"https://github.com/abonas/kubeclient/pull/42#discussion_r26747265","pull_request_url":"https://api.github.com/repos/abonas/kubeclient/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/abonas/kubeclient/pulls/comments/26747265"},"html":{"href":"https://github.com/abonas/kubeclient/pull/42#discussion_r26747265"},"pull_request":{"href":"https://api.github.com/repos/abonas/kubeclient/pulls/42"}}},"pull_request":{"url":"https://api.github.com/repos/abonas/kubeclient/pulls/42","id":31443831,"html_url":"https://github.com/abonas/kubeclient/pull/42","diff_url":"https://github.com/abonas/kubeclient/pull/42.diff","patch_url":"https://github.com/abonas/kubeclient/pull/42.patch","issue_url":"https://api.github.com/repos/abonas/kubeclient/issues/42","number":42,"state":"open","locked":false,"title":"Fix #38 add default path and version","user":{"login":"abonas","id":6277245,"avatar_url":"https://avatars.githubusercontent.com/u/6277245?v=3","gravatar_id":"","url":"https://api.github.com/users/abonas","html_url":"https://github.com/abonas","followers_url":"https://api.github.com/users/abonas/followers","following_url":"https://api.github.com/users/abonas/following{/other_user}","gists_url":"https://api.github.com/users/abonas/gists{/gist_id}","starred_url":"https://api.github.com/users/abonas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abonas/subscriptions","organizations_url":"https://api.github.com/users/abonas/orgs","repos_url":"https://api.github.com/users/abonas/repos","events_url":"https://api.github.com/users/abonas/events{/privacy}","received_events_url":"https://api.github.com/users/abonas/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-18T16:06:17Z","updated_at":"2015-03-19T11:58:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"32d34f7153b29d7c5bc85da3e911231d843f3492","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/abonas/kubeclient/pulls/42/commits","review_comments_url":"https://api.github.com/repos/abonas/kubeclient/pulls/42/comments","review_comment_url":"https://api.github.com/repos/abonas/kubeclient/pulls/comments{/number}","comments_url":"https://api.github.com/repos/abonas/kubeclient/issues/42/comments","statuses_url":"https://api.github.com/repos/abonas/kubeclient/statuses/e1c3a48319bc0500c28411dbfcdcbda8eee3a312","head":{"label":"abonas:adddefaults","ref":"adddefaults","sha":"e1c3a48319bc0500c28411dbfcdcbda8eee3a312","user":{"login":"abonas","id":6277245,"avatar_url":"https://avatars.githubusercontent.com/u/6277245?v=3","gravatar_id":"","url":"https://api.github.com/users/abonas","html_url":"https://github.com/abonas","followers_url":"https://api.github.com/users/abonas/followers","following_url":"https://api.github.com/users/abonas/following{/other_user}","gists_url":"https://api.github.com/users/abonas/gists{/gist_id}","starred_url":"https://api.github.com/users/abonas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abonas/subscriptions","organizations_url":"https://api.github.com/users/abonas/orgs","repos_url":"https://api.github.com/users/abonas/repos","events_url":"https://api.github.com/users/abonas/events{/privacy}","received_events_url":"https://api.github.com/users/abonas/received_events","type":"User","site_admin":false},"repo":{"id":28627094,"name":"kubeclient","full_name":"abonas/kubeclient","owner":{"login":"abonas","id":6277245,"avatar_url":"https://avatars.githubusercontent.com/u/6277245?v=3","gravatar_id":"","url":"https://api.github.com/users/abonas","html_url":"https://github.com/abonas","followers_url":"https://api.github.com/users/abonas/followers","following_url":"https://api.github.com/users/abonas/following{/other_user}","gists_url":"https://api.github.com/users/abonas/gists{/gist_id}","starred_url":"https://api.github.com/users/abonas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abonas/subscriptions","organizations_url":"https://api.github.com/users/abonas/orgs","repos_url":"https://api.github.com/users/abonas/repos","events_url":"https://api.github.com/users/abonas/events{/privacy}","received_events_url":"https://api.github.com/users/abonas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abonas/kubeclient","description":"A Ruby client for Kubernetes REST api","fork":false,"url":"https://api.github.com/repos/abonas/kubeclient","forks_url":"https://api.github.com/repos/abonas/kubeclient/forks","keys_url":"https://api.github.com/repos/abonas/kubeclient/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abonas/kubeclient/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abonas/kubeclient/teams","hooks_url":"https://api.github.com/repos/abonas/kubeclient/hooks","issue_events_url":"https://api.github.com/repos/abonas/kubeclient/issues/events{/number}","events_url":"https://api.github.com/repos/abonas/kubeclient/events","assignees_url":"https://api.github.com/repos/abonas/kubeclient/assignees{/user}","branches_url":"https://api.github.com/repos/abonas/kubeclient/branches{/branch}","tags_url":"https://api.github.com/repos/abonas/kubeclient/tags","blobs_url":"https://api.github.com/repos/abonas/kubeclient/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abonas/kubeclient/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abonas/kubeclient/git/refs{/sha}","trees_url":"https://api.github.com/repos/abonas/kubeclient/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abonas/kubeclient/statuses/{sha}","languages_url":"https://api.github.com/repos/abonas/kubeclient/languages","stargazers_url":"https://api.github.com/repos/abonas/kubeclient/stargazers","contributors_url":"https://api.github.com/repos/abonas/kubeclient/contributors","subscribers_url":"https://api.github.com/repos/abonas/kubeclient/subscribers","subscription_url":"https://api.github.com/repos/abonas/kubeclient/subscription","commits_url":"https://api.github.com/repos/abonas/kubeclient/commits{/sha}","git_commits_url":"https://api.github.com/repos/abonas/kubeclient/git/commits{/sha}","comments_url":"https://api.github.com/repos/abonas/kubeclient/comments{/number}","issue_comment_url":"https://api.github.com/repos/abonas/kubeclient/issues/comments{/number}","contents_url":"https://api.github.com/repos/abonas/kubeclient/contents/{+path}","compare_url":"https://api.github.com/repos/abonas/kubeclient/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abonas/kubeclient/merges","archive_url":"https://api.github.com/repos/abonas/kubeclient/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abonas/kubeclient/downloads","issues_url":"https://api.github.com/repos/abonas/kubeclient/issues{/number}","pulls_url":"https://api.github.com/repos/abonas/kubeclient/pulls{/number}","milestones_url":"https://api.github.com/repos/abonas/kubeclient/milestones{/number}","notifications_url":"https://api.github.com/repos/abonas/kubeclient/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abonas/kubeclient/labels{/name}","releases_url":"https://api.github.com/repos/abonas/kubeclient/releases{/id}","created_at":"2014-12-30T10:38:54Z","updated_at":"2015-03-18T19:32:04Z","pushed_at":"2015-03-18T19:32:04Z","git_url":"git://github.com/abonas/kubeclient.git","ssh_url":"git@github.com:abonas/kubeclient.git","clone_url":"https://github.com/abonas/kubeclient.git","svn_url":"https://github.com/abonas/kubeclient","homepage":"","size":814,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":5,"forks":5,"open_issues":5,"watchers":2,"default_branch":"master"}},"base":{"label":"abonas:master","ref":"master","sha":"c565b9d28c3b90ccb9a2059bb05304140dc493a8","user":{"login":"abonas","id":6277245,"avatar_url":"https://avatars.githubusercontent.com/u/6277245?v=3","gravatar_id":"","url":"https://api.github.com/users/abonas","html_url":"https://github.com/abonas","followers_url":"https://api.github.com/users/abonas/followers","following_url":"https://api.github.com/users/abonas/following{/other_user}","gists_url":"https://api.github.com/users/abonas/gists{/gist_id}","starred_url":"https://api.github.com/users/abonas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abonas/subscriptions","organizations_url":"https://api.github.com/users/abonas/orgs","repos_url":"https://api.github.com/users/abonas/repos","events_url":"https://api.github.com/users/abonas/events{/privacy}","received_events_url":"https://api.github.com/users/abonas/received_events","type":"User","site_admin":false},"repo":{"id":28627094,"name":"kubeclient","full_name":"abonas/kubeclient","owner":{"login":"abonas","id":6277245,"avatar_url":"https://avatars.githubusercontent.com/u/6277245?v=3","gravatar_id":"","url":"https://api.github.com/users/abonas","html_url":"https://github.com/abonas","followers_url":"https://api.github.com/users/abonas/followers","following_url":"https://api.github.com/users/abonas/following{/other_user}","gists_url":"https://api.github.com/users/abonas/gists{/gist_id}","starred_url":"https://api.github.com/users/abonas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abonas/subscriptions","organizations_url":"https://api.github.com/users/abonas/orgs","repos_url":"https://api.github.com/users/abonas/repos","events_url":"https://api.github.com/users/abonas/events{/privacy}","received_events_url":"https://api.github.com/users/abonas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abonas/kubeclient","description":"A Ruby client for Kubernetes REST api","fork":false,"url":"https://api.github.com/repos/abonas/kubeclient","forks_url":"https://api.github.com/repos/abonas/kubeclient/forks","keys_url":"https://api.github.com/repos/abonas/kubeclient/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abonas/kubeclient/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abonas/kubeclient/teams","hooks_url":"https://api.github.com/repos/abonas/kubeclient/hooks","issue_events_url":"https://api.github.com/repos/abonas/kubeclient/issues/events{/number}","events_url":"https://api.github.com/repos/abonas/kubeclient/events","assignees_url":"https://api.github.com/repos/abonas/kubeclient/assignees{/user}","branches_url":"https://api.github.com/repos/abonas/kubeclient/branches{/branch}","tags_url":"https://api.github.com/repos/abonas/kubeclient/tags","blobs_url":"https://api.github.com/repos/abonas/kubeclient/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abonas/kubeclient/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abonas/kubeclient/git/refs{/sha}","trees_url":"https://api.github.com/repos/abonas/kubeclient/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abonas/kubeclient/statuses/{sha}","languages_url":"https://api.github.com/repos/abonas/kubeclient/languages","stargazers_url":"https://api.github.com/repos/abonas/kubeclient/stargazers","contributors_url":"https://api.github.com/repos/abonas/kubeclient/contributors","subscribers_url":"https://api.github.com/repos/abonas/kubeclient/subscribers","subscription_url":"https://api.github.com/repos/abonas/kubeclient/subscription","commits_url":"https://api.github.com/repos/abonas/kubeclient/commits{/sha}","git_commits_url":"https://api.github.com/repos/abonas/kubeclient/git/commits{/sha}","comments_url":"https://api.github.com/repos/abonas/kubeclient/comments{/number}","issue_comment_url":"https://api.github.com/repos/abonas/kubeclient/issues/comments{/number}","contents_url":"https://api.github.com/repos/abonas/kubeclient/contents/{+path}","compare_url":"https://api.github.com/repos/abonas/kubeclient/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abonas/kubeclient/merges","archive_url":"https://api.github.com/repos/abonas/kubeclient/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abonas/kubeclient/downloads","issues_url":"https://api.github.com/repos/abonas/kubeclient/issues{/number}","pulls_url":"https://api.github.com/repos/abonas/kubeclient/pulls{/number}","milestones_url":"https://api.github.com/repos/abonas/kubeclient/milestones{/number}","notifications_url":"https://api.github.com/repos/abonas/kubeclient/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abonas/kubeclient/labels{/name}","releases_url":"https://api.github.com/repos/abonas/kubeclient/releases{/id}","created_at":"2014-12-30T10:38:54Z","updated_at":"2015-03-18T19:32:04Z","pushed_at":"2015-03-18T19:32:04Z","git_url":"git://github.com/abonas/kubeclient.git","ssh_url":"git@github.com:abonas/kubeclient.git","clone_url":"https://github.com/abonas/kubeclient.git","svn_url":"https://github.com/abonas/kubeclient","homepage":"","size":814,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":5,"forks":5,"open_issues":5,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/abonas/kubeclient/pulls/42"},"html":{"href":"https://github.com/abonas/kubeclient/pull/42"},"issue":{"href":"https://api.github.com/repos/abonas/kubeclient/issues/42"},"comments":{"href":"https://api.github.com/repos/abonas/kubeclient/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/abonas/kubeclient/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/abonas/kubeclient/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/abonas/kubeclient/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/abonas/kubeclient/statuses/e1c3a48319bc0500c28411dbfcdcbda8eee3a312"}}}}