GitHub PullRequestReviewCommentEvent at 2014-10-03 22:05:21
Repository: cdap-clients
Actor: wolf31o2
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/caskdata/cdap-clients/pulls/comments/18422044","id":18422044,"diff_hunk":"@@ -0,0 +1,98 @@\n+authentication-client-ruby\n+==========================\n+\n+The Authentication Client Ruby API is for fetching the access token from the authentication server.\n+\n+## Supported Actions\n+\n+ - fetch a access token from the authentication server with credentials, which are supported by the active\n+ authentication mechanism;\n+ - check is the authentication enabled in the gateway server.\n+\n+## Usage\n+\n+ To use the Authentication Client Ruby API, include this gem in your Gemfile:\n+\n+ ```\n+ gem 'authentication-client-ruby'\n+ ```\n+\n+ If you use gem outside Rails, you should require gem files in your application files:\n+\n+ ```\n+ require 'authentication-client-ruby'\n+ ```\n+\n+## Example\n+\n+ Create a ```CDAPIngest::AuthenticationClient``` instance.\n+ Set the connection parameters: authentication server host; authentication server host port; SSL mode:\n+\n+ ```\n+ authentication_client.set_connection_info('localhost',10000, true)\n+ ```\n+\n+ Create the configuration file:\n+ \n+ ```\n+ # config/auth.yml\n+ security.auth.client.username: 'user'\n+ security.auth.client.password: 'secret'\n+ security.auth.client.ssl_cert_check: true\n+ ```  \n+ \n+ Load configuration from file:\n+ \n+ ```\n+ authentication_client.configure('config/auth.yml')\n+ ```\n+ \n+ Or set the required fields in the ```AuthenticationClient``` object:\n+ ```\n+ \n+ authentication_client.username = \"admin\"\n+ authentication_client.password = \"secret\"\n+ authentication_client.ssl_cert_check = true\n+ ```\n+ \n+ Check if authentication is enabled in the gateway server:\n+ \n+ ```\n+  is_enabled = authentication_client.is_auth_enabled\n+ ``` \n+                      \n+ Retrieve the access token from the authentication server:\n+ \n+ ```\n+ token = authentication_client.get_access_token\n+ ```\n+\n+## Additional Notes\n+\n+All methods from the ```AuthenticationClient``` throw exceptions using response code analysis from the\n+ gateway server. These exceptions help determine if the request was processed successfully or not.\n+\n+ In the case of a **200 OK** response, no exception will be thrown; other cases will throw these exceptions:\n+\n+```\n+  400:\n+      'The request had a combination of parameters that is not recognized'\n+  401:\n+      'Invalid username or password'\n+  403:\n+      'The request was authenticated but the client does not have permission'\n+  404:\n+      'The request did not address any of the known URIs'\n+  405:\n+      'A request was received with a method not supported for the URI'\n+  409:\n+      'A request could not be completed due to a conflict with the current resource state'\n+  500:\n+      'An internal error occurred while processing the request'\n+  501:\n+      'A request contained a query that is not supported by this API'\n+```\n+\n+## Testing\n+\n+To run RSpec tests, run ```rspec``` command in your shell.","path":"cdap-authentication-clients/ruby/README.md","position":98,"original_position":98,"commit_id":"b36e0cf5e24a73b7b9ab96ca8a6d31a20a90e798","original_commit_id":"b36e0cf5e24a73b7b9ab96ca8a6d31a20a90e798","user":{"login":"wolf31o2","id":380021,"avatar_url":"https://avatars.githubusercontent.com/u/380021?v=2","gravatar_id":"","url":"https://api.github.com/users/wolf31o2","html_url":"https://github.com/wolf31o2","followers_url":"https://api.github.com/users/wolf31o2/followers","following_url":"https://api.github.com/users/wolf31o2/following{/other_user}","gists_url":"https://api.github.com/users/wolf31o2/gists{/gist_id}","starred_url":"https://api.github.com/users/wolf31o2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolf31o2/subscriptions","organizations_url":"https://api.github.com/users/wolf31o2/orgs","repos_url":"https://api.github.com/users/wolf31o2/repos","events_url":"https://api.github.com/users/wolf31o2/events{/privacy}","received_events_url":"https://api.github.com/users/wolf31o2/received_events","type":"User","site_admin":false},"body":"You should always recommend that rspec is run via bundler, rather than directly. (We don't need to elaborate on RSpec)\r\n\r\nEven better would be a Rakefile with a rake task for running the spec tests.","created_at":"2014-10-03T22:05:21Z","updated_at":"2014-10-03T22:05:21Z","html_url":"https://github.com/caskdata/cdap-clients/pull/35#discussion_r18422044","pull_request_url":"https://api.github.com/repos/caskdata/cdap-clients/pulls/35","_links":{"self":{"href":"https://api.github.com/repos/caskdata/cdap-clients/pulls/comments/18422044"},"html":{"href":"https://github.com/caskdata/cdap-clients/pull/35#discussion_r18422044"},"pull_request":{"href":"https://api.github.com/repos/caskdata/cdap-clients/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/caskdata/cdap-clients/pulls/35","id":22225462,"html_url":"https://github.com/caskdata/cdap-clients/pull/35","diff_url":"https://github.com/caskdata/cdap-clients/pull/35.diff","patch_url":"https://github.com/caskdata/cdap-clients/pull/35.patch","issue_url":"https://api.github.com/repos/caskdata/cdap-clients/issues/35","number":35,"state":"open","locked":false,"title":"CYB-61: add Ruby auth client ","user":{"login":"ytolochkevych","id":8393612,"avatar_url":"https://avatars.githubusercontent.com/u/8393612?v=2","gravatar_id":"","url":"https://api.github.com/users/ytolochkevych","html_url":"https://github.com/ytolochkevych","followers_url":"https://api.github.com/users/ytolochkevych/followers","following_url":"https://api.github.com/users/ytolochkevych/following{/other_user}","gists_url":"https://api.github.com/users/ytolochkevych/gists{/gist_id}","starred_url":"https://api.github.com/users/ytolochkevych/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ytolochkevych/subscriptions","organizations_url":"https://api.github.com/users/ytolochkevych/orgs","repos_url":"https://api.github.com/users/ytolochkevych/repos","events_url":"https://api.github.com/users/ytolochkevych/events{/privacy}","received_events_url":"https://api.github.com/users/ytolochkevych/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-10-03T19:47:12Z","updated_at":"2014-10-03T22:05:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"097b171f7e433a984163ba20e421ab2375c207b9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/caskdata/cdap-clients/pulls/35/commits","review_comments_url":"https://api.github.com/repos/caskdata/cdap-clients/pulls/35/comments","review_comment_url":"https://api.github.com/repos/caskdata/cdap-clients/pulls/comments/{number}","comments_url":"https://api.github.com/repos/caskdata/cdap-clients/issues/35/comments","statuses_url":"https://api.github.com/repos/caskdata/cdap-clients/statuses/b36e0cf5e24a73b7b9ab96ca8a6d31a20a90e798","head":{"label":"cybervisiontech:cyb_61","ref":"cyb_61","sha":"b36e0cf5e24a73b7b9ab96ca8a6d31a20a90e798","user":{"login":"cybervisiontech","id":8482357,"avatar_url":"https://avatars.githubusercontent.com/u/8482357?v=2","gravatar_id":"","url":"https://api.github.com/users/cybervisiontech","html_url":"https://github.com/cybervisiontech","followers_url":"https://api.github.com/users/cybervisiontech/followers","following_url":"https://api.github.com/users/cybervisiontech/following{/other_user}","gists_url":"https://api.github.com/users/cybervisiontech/gists{/gist_id}","starred_url":"https://api.github.com/users/cybervisiontech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cybervisiontech/subscriptions","organizations_url":"https://api.github.com/users/cybervisiontech/orgs","repos_url":"https://api.github.com/users/cybervisiontech/repos","events_url":"https://api.github.com/users/cybervisiontech/events{/privacy}","received_events_url":"https://api.github.com/users/cybervisiontech/received_events","type":"Organization","site_admin":false},"repo":{"id":24754287,"name":"cdap-clients","full_name":"cybervisiontech/cdap-clients","owner":{"login":"cybervisiontech","id":8482357,"avatar_url":"https://avatars.githubusercontent.com/u/8482357?v=2","gravatar_id":"","url":"https://api.github.com/users/cybervisiontech","html_url":"https://github.com/cybervisiontech","followers_url":"https://api.github.com/users/cybervisiontech/followers","following_url":"https://api.github.com/users/cybervisiontech/following{/other_user}","gists_url":"https://api.github.com/users/cybervisiontech/gists{/gist_id}","starred_url":"https://api.github.com/users/cybervisiontech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cybervisiontech/subscriptions","organizations_url":"https://api.github.com/users/cybervisiontech/orgs","repos_url":"https://api.github.com/users/cybervisiontech/repos","events_url":"https://api.github.com/users/cybervisiontech/events{/privacy}","received_events_url":"https://api.github.com/users/cybervisiontech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cybervisiontech/cdap-clients","description":"Clients to interact with CDAP in multiple languages","fork":true,"url":"https://api.github.com/repos/cybervisiontech/cdap-clients","forks_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/forks","keys_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/teams","hooks_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/hooks","issue_events_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/issues/events{/number}","events_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/events","assignees_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/assignees{/user}","branches_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/branches{/branch}","tags_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/tags","blobs_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/git/refs{/sha}","trees_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/statuses/{sha}","languages_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/languages","stargazers_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/stargazers","contributors_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/contributors","subscribers_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/subscribers","subscription_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/subscription","commits_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/commits{/sha}","git_commits_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/git/commits{/sha}","comments_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/comments{/number}","issue_comment_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/issues/comments/{number}","contents_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/contents/{+path}","compare_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/merges","archive_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/downloads","issues_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/issues{/number}","pulls_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/pulls{/number}","milestones_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/milestones{/number}","notifications_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/labels{/name}","releases_url":"https://api.github.com/repos/cybervisiontech/cdap-clients/releases{/id}","created_at":"2014-10-03T10:13:18Z","updated_at":"2014-09-30T17:35:04Z","pushed_at":"2014-10-03T20:25:26Z","git_url":"git://github.com/cybervisiontech/cdap-clients.git","ssh_url":"git@github.com:cybervisiontech/cdap-clients.git","clone_url":"https://github.com/cybervisiontech/cdap-clients.git","svn_url":"https://github.com/cybervisiontech/cdap-clients","homepage":null,"size":1044,"stargazers_count":0,"watchers_count":0,"language":null,"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":"develop"}},"base":{"label":"caskdata:develop","ref":"develop","sha":"c20d2a66d8d58957da92fc835a5ebf42cce64abc","user":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=2","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"repo":{"id":22927654,"name":"cdap-clients","full_name":"caskdata/cdap-clients","owner":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=2","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/caskdata/cdap-clients","description":"Clients to interact with CDAP in multiple languages","fork":false,"url":"https://api.github.com/repos/caskdata/cdap-clients","forks_url":"https://api.github.com/repos/caskdata/cdap-clients/forks","keys_url":"https://api.github.com/repos/caskdata/cdap-clients/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caskdata/cdap-clients/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caskdata/cdap-clients/teams","hooks_url":"https://api.github.com/repos/caskdata/cdap-clients/hooks","issue_events_url":"https://api.github.com/repos/caskdata/cdap-clients/issues/events{/number}","events_url":"https://api.github.com/repos/caskdata/cdap-clients/events","assignees_url":"https://api.github.com/repos/caskdata/cdap-clients/assignees{/user}","branches_url":"https://api.github.com/repos/caskdata/cdap-clients/branches{/branch}","tags_url":"https://api.github.com/repos/caskdata/cdap-clients/tags","blobs_url":"https://api.github.com/repos/caskdata/cdap-clients/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caskdata/cdap-clients/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caskdata/cdap-clients/git/refs{/sha}","trees_url":"https://api.github.com/repos/caskdata/cdap-clients/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caskdata/cdap-clients/statuses/{sha}","languages_url":"https://api.github.com/repos/caskdata/cdap-clients/languages","stargazers_url":"https://api.github.com/repos/caskdata/cdap-clients/stargazers","contributors_url":"https://api.github.com/repos/caskdata/cdap-clients/contributors","subscribers_url":"https://api.github.com/repos/caskdata/cdap-clients/subscribers","subscription_url":"https://api.github.com/repos/caskdata/cdap-clients/subscription","commits_url":"https://api.github.com/repos/caskdata/cdap-clients/commits{/sha}","git_commits_url":"https://api.github.com/repos/caskdata/cdap-clients/git/commits{/sha}","comments_url":"https://api.github.com/repos/caskdata/cdap-clients/comments{/number}","issue_comment_url":"https://api.github.com/repos/caskdata/cdap-clients/issues/comments/{number}","contents_url":"https://api.github.com/repos/caskdata/cdap-clients/contents/{+path}","compare_url":"https://api.github.com/repos/caskdata/cdap-clients/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caskdata/cdap-clients/merges","archive_url":"https://api.github.com/repos/caskdata/cdap-clients/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caskdata/cdap-clients/downloads","issues_url":"https://api.github.com/repos/caskdata/cdap-clients/issues{/number}","pulls_url":"https://api.github.com/repos/caskdata/cdap-clients/pulls{/number}","milestones_url":"https://api.github.com/repos/caskdata/cdap-clients/milestones{/number}","notifications_url":"https://api.github.com/repos/caskdata/cdap-clients/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caskdata/cdap-clients/labels{/name}","releases_url":"https://api.github.com/repos/caskdata/cdap-clients/releases{/id}","created_at":"2014-08-13T19:04:46Z","updated_at":"2014-09-30T17:35:04Z","pushed_at":"2014-10-03T21:19:31Z","git_url":"git://github.com/caskdata/cdap-clients.git","ssh_url":"git@github.com:caskdata/cdap-clients.git","clone_url":"https://github.com/caskdata/cdap-clients.git","svn_url":"https://github.com/caskdata/cdap-clients","homepage":null,"size":1044,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/caskdata/cdap-clients/pulls/35"},"html":{"href":"https://github.com/caskdata/cdap-clients/pull/35"},"issue":{"href":"https://api.github.com/repos/caskdata/cdap-clients/issues/35"},"comments":{"href":"https://api.github.com/repos/caskdata/cdap-clients/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/caskdata/cdap-clients/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/caskdata/cdap-clients/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/caskdata/cdap-clients/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/caskdata/cdap-clients/statuses/b36e0cf5e24a73b7b9ab96ca8a6d31a20a90e798"}}}}