{"action":"created","comment":{"url":"https://api.github.com/repos/abonas/kubeclient/pulls/comments/73546979","id":73546979,"diff_hunk":"@@ -76,57 +77,49 @@ def handle_uri(uri, path)\n       @api_endpoint = (uri.is_a?(URI) ? uri : URI.parse(uri))\n       @api_endpoint.path = path if @api_endpoint.path.empty?\n       @api_endpoint.path = @api_endpoint.path.chop if @api_endpoint.path.end_with? '/'\n+      components = @api_endpoint.path.to_s.split('/') # [\"\", \"api\"] or [\"\", \"apis\", batch]\n+      @group = components[2] if components.length > 2\n     end\n \n     def build_namespace_prefix(namespace)\n       namespace.to_s.empty? ? '' : \"namespaces/#{namespace}/\"\n     end\n \n-    public\n+    def method_missing(method_sym, *args, &block)\n+      resource_method = resource_method?(method_sym)\n+      super unless resource_method\n+      rest_method, singular, collection = resource_method\n+      method_name = [rest_method, collection ? 'entities' : 'entity'].join('_')\n+      if collection\n+        options = args[0] || {}\n+        # This watch_entity method used to take resource_version as a param, so\n+        # this conversion is to keep backwards compatibility\n+        options = { resource_version: options } unless options.is_a?(Hash)\n+        args = [singular, options]\n+      else\n+        args = [singular] + args\n+      end\n+      send(method_name.to_sym, *args)\n+    end\n+\n+    def respond_to?(method_sym)\n+      resource_method?(method_sym) ? true : super","path":"lib/kubeclient/common.rb","position":39,"original_position":39,"commit_id":"d5877fa7b2396077a9931a4049c0514961820b31","original_commit_id":"d5877fa7b2396077a9931a4049c0514961820b31","user":{"login":"moolitayer","id":3010449,"avatar_url":"https://avatars.githubusercontent.com/u/3010449?v=3","gravatar_id":"","url":"https://api.github.com/users/moolitayer","html_url":"https://github.com/moolitayer","followers_url":"https://api.github.com/users/moolitayer/followers","following_url":"https://api.github.com/users/moolitayer/following{/other_user}","gists_url":"https://api.github.com/users/moolitayer/gists{/gist_id}","starred_url":"https://api.github.com/users/moolitayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moolitayer/subscriptions","organizations_url":"https://api.github.com/users/moolitayer/orgs","repos_url":"https://api.github.com/users/moolitayer/repos","events_url":"https://api.github.com/users/moolitayer/events{/privacy}","received_events_url":"https://api.github.com/users/moolitayer/received_events","type":"User","site_admin":false},"body":"The including object;\r\n```\r\n> client.hi\r\nNoMethodError: undefined method `hi' for #<Kubeclient::Client:0x00000003ed5118>\r\n```","created_at":"2016-08-04T15:39:17Z","updated_at":"2016-08-04T15:39:17Z","html_url":"https://github.com/abonas/kubeclient/pull/181#discussion_r73546979","pull_request_url":"https://api.github.com/repos/abonas/kubeclient/pulls/181","_links":{"self":{"href":"https://api.github.com/repos/abonas/kubeclient/pulls/comments/73546979"},"html":{"href":"https://github.com/abonas/kubeclient/pull/181#discussion_r73546979"},"pull_request":{"href":"https://api.github.com/repos/abonas/kubeclient/pulls/181"}}},"pull_request":{"url":"https://api.github.com/repos/abonas/kubeclient/pulls/181","id":79042252,"html_url":"https://github.com/abonas/kubeclient/pull/181","diff_url":"https://github.com/abonas/kubeclient/pull/181.diff","patch_url":"https://github.com/abonas/kubeclient/pull/181.patch","issue_url":"https://api.github.com/repos/abonas/kubeclient/issues/181","number":181,"state":"open","locked":false,"title":"Support kubernetes group api","user":{"login":"moolitayer","id":3010449,"avatar_url":"https://avatars.githubusercontent.com/u/3010449?v=3","gravatar_id":"","url":"https://api.github.com/users/moolitayer","html_url":"https://github.com/moolitayer","followers_url":"https://api.github.com/users/moolitayer/followers","following_url":"https://api.github.com/users/moolitayer/following{/other_user}","gists_url":"https://api.github.com/users/moolitayer/gists{/gist_id}","starred_url":"https://api.github.com/users/moolitayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moolitayer/subscriptions","organizations_url":"https://api.github.com/users/moolitayer/orgs","repos_url":"https://api.github.com/users/moolitayer/repos","events_url":"https://api.github.com/users/moolitayer/events{/privacy}","received_events_url":"https://api.github.com/users/moolitayer/received_events","type":"User","site_admin":false},"body":"[kubernetes api-group proposal](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/api-group.md)\r\n[kubernetes api](https://github.com/kubernetes/kubernetes/blob/master/docs/api.md)\r\n\r\n[specification](https://github.com/abonas/kubeclient/issues/144#issuecomment-235254248)\r\n\r\n[Some testing code](https://gist.github.com/moolitayer/476ed01d377fc9e9954fea83572ba662)\r\n(Devided into core, groups & OpenShift)\r\n\r\nFixes #144 \r\nDoes not handle nested (e.g pods/status) and first level (e.g /healthz) resources","created_at":"2016-07-27T15:11:12Z","updated_at":"2016-08-04T15:39:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"de58f06f1533fff5800acdcf56089f0861c4218d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/abonas/kubeclient/pulls/181/commits","review_comments_url":"https://api.github.com/repos/abonas/kubeclient/pulls/181/comments","review_comment_url":"https://api.github.com/repos/abonas/kubeclient/pulls/comments{/number}","comments_url":"https://api.github.com/repos/abonas/kubeclient/issues/181/comments","statuses_url":"https://api.github.com/repos/abonas/kubeclient/statuses/d5877fa7b2396077a9931a4049c0514961820b31","head":{"label":"moolitayer:support_group_api","ref":"support_group_api","sha":"d5877fa7b2396077a9931a4049c0514961820b31","user":{"login":"moolitayer","id":3010449,"avatar_url":"https://avatars.githubusercontent.com/u/3010449?v=3","gravatar_id":"","url":"https://api.github.com/users/moolitayer","html_url":"https://github.com/moolitayer","followers_url":"https://api.github.com/users/moolitayer/followers","following_url":"https://api.github.com/users/moolitayer/following{/other_user}","gists_url":"https://api.github.com/users/moolitayer/gists{/gist_id}","starred_url":"https://api.github.com/users/moolitayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moolitayer/subscriptions","organizations_url":"https://api.github.com/users/moolitayer/orgs","repos_url":"https://api.github.com/users/moolitayer/repos","events_url":"https://api.github.com/users/moolitayer/events{/privacy}","received_events_url":"https://api.github.com/users/moolitayer/received_events","type":"User","site_admin":false},"repo":{"id":40304902,"name":"kubeclient","full_name":"moolitayer/kubeclient","owner":{"login":"moolitayer","id":3010449,"avatar_url":"https://avatars.githubusercontent.com/u/3010449?v=3","gravatar_id":"","url":"https://api.github.com/users/moolitayer","html_url":"https://github.com/moolitayer","followers_url":"https://api.github.com/users/moolitayer/followers","following_url":"https://api.github.com/users/moolitayer/following{/other_user}","gists_url":"https://api.github.com/users/moolitayer/gists{/gist_id}","starred_url":"https://api.github.com/users/moolitayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moolitayer/subscriptions","organizations_url":"https://api.github.com/users/moolitayer/orgs","repos_url":"https://api.github.com/users/moolitayer/repos","events_url":"https://api.github.com/users/moolitayer/events{/privacy}","received_events_url":"https://api.github.com/users/moolitayer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/moolitayer/kubeclient","description":"A Ruby client for Kubernetes REST api","fork":true,"url":"https://api.github.com/repos/moolitayer/kubeclient","forks_url":"https://api.github.com/repos/moolitayer/kubeclient/forks","keys_url":"https://api.github.com/repos/moolitayer/kubeclient/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moolitayer/kubeclient/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moolitayer/kubeclient/teams","hooks_url":"https://api.github.com/repos/moolitayer/kubeclient/hooks","issue_events_url":"https://api.github.com/repos/moolitayer/kubeclient/issues/events{/number}","events_url":"https://api.github.com/repos/moolitayer/kubeclient/events","assignees_url":"https://api.github.com/repos/moolitayer/kubeclient/assignees{/user}","branches_url":"https://api.github.com/repos/moolitayer/kubeclient/branches{/branch}","tags_url":"https://api.github.com/repos/moolitayer/kubeclient/tags","blobs_url":"https://api.github.com/repos/moolitayer/kubeclient/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moolitayer/kubeclient/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moolitayer/kubeclient/git/refs{/sha}","trees_url":"https://api.github.com/repos/moolitayer/kubeclient/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moolitayer/kubeclient/statuses/{sha}","languages_url":"https://api.github.com/repos/moolitayer/kubeclient/languages","stargazers_url":"https://api.github.com/repos/moolitayer/kubeclient/stargazers","contributors_url":"https://api.github.com/repos/moolitayer/kubeclient/contributors","subscribers_url":"https://api.github.com/repos/moolitayer/kubeclient/subscribers","subscription_url":"https://api.github.com/repos/moolitayer/kubeclient/subscription","commits_url":"https://api.github.com/repos/moolitayer/kubeclient/commits{/sha}","git_commits_url":"https://api.github.com/repos/moolitayer/kubeclient/git/commits{/sha}","comments_url":"https://api.github.com/repos/moolitayer/kubeclient/comments{/number}","issue_comment_url":"https://api.github.com/repos/moolitayer/kubeclient/issues/comments{/number}","contents_url":"https://api.github.com/repos/moolitayer/kubeclient/contents/{+path}","compare_url":"https://api.github.com/repos/moolitayer/kubeclient/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moolitayer/kubeclient/merges","archive_url":"https://api.github.com/repos/moolitayer/kubeclient/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moolitayer/kubeclient/downloads","issues_url":"https://api.github.com/repos/moolitayer/kubeclient/issues{/number}","pulls_url":"https://api.github.com/repos/moolitayer/kubeclient/pulls{/number}","milestones_url":"https://api.github.com/repos/moolitayer/kubeclient/milestones{/number}","notifications_url":"https://api.github.com/repos/moolitayer/kubeclient/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moolitayer/kubeclient/labels{/name}","releases_url":"https://api.github.com/repos/moolitayer/kubeclient/releases{/id}","deployments_url":"https://api.github.com/repos/moolitayer/kubeclient/deployments","created_at":"2015-08-06T12:57:45Z","updated_at":"2015-08-06T12:57:45Z","pushed_at":"2016-07-31T16:17:02Z","git_url":"git://github.com/moolitayer/kubeclient.git","ssh_url":"git@github.com:moolitayer/kubeclient.git","clone_url":"https://github.com/moolitayer/kubeclient.git","svn_url":"https://github.com/moolitayer/kubeclient","homepage":"","size":348,"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":"abonas:master","ref":"master","sha":"3409365eb20171acef57162cf0abc101381474fd","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}","deployments_url":"https://api.github.com/repos/abonas/kubeclient/deployments","created_at":"2014-12-30T10:38:54Z","updated_at":"2016-08-03T17:09:08Z","pushed_at":"2016-07-31T16:17:03Z","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":402,"stargazers_count":48,"watchers_count":48,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":11,"forks":35,"open_issues":11,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/abonas/kubeclient/pulls/181"},"html":{"href":"https://github.com/abonas/kubeclient/pull/181"},"issue":{"href":"https://api.github.com/repos/abonas/kubeclient/issues/181"},"comments":{"href":"https://api.github.com/repos/abonas/kubeclient/issues/181/comments"},"review_comments":{"href":"https://api.github.com/repos/abonas/kubeclient/pulls/181/comments"},"review_comment":{"href":"https://api.github.com/repos/abonas/kubeclient/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/abonas/kubeclient/pulls/181/commits"},"statuses":{"href":"https://api.github.com/repos/abonas/kubeclient/statuses/d5877fa7b2396077a9931a4049c0514961820b31"}}}}
{"actor":{"display_login":"moolitayer"}}