GitHub PullRequestReviewCommentEvent at 2014-07-17 15:49:18
Repository: vcloud-core
Actor: dcarley
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/gds-operations/vcloud-core/pulls/comments/15065487","id":15065487,"diff_hunk":"@@ -0,0 +1,57 @@\n+require 'spec_helper'\n+\n+describe Vcloud::Fog::Login do\n+  let!(:mock_env) { ENV.clone }\n+\n+  before(:each) do\n+    stub_const('ENV', mock_env)\n+  end\n+\n+  describe \"#token\" do\n+    context \"fog credentials without password\" do\n+      let(:token_regex) { /^.{44}$/ }","path":"spec/integration/fog/login_spec.rb","position":12,"original_position":12,"commit_id":"fb9587777eb4471d08170dcb838724548285411b","original_commit_id":"fb9587777eb4471d08170dcb838724548285411b","user":{"login":"dcarley","id":260438,"avatar_url":"https://avatars.githubusercontent.com/u/260438?","gravatar_id":"556697db03496fb493610c7c941fb247","url":"https://api.github.com/users/dcarley","html_url":"https://github.com/dcarley","followers_url":"https://api.github.com/users/dcarley/followers","following_url":"https://api.github.com/users/dcarley/following{/other_user}","gists_url":"https://api.github.com/users/dcarley/gists{/gist_id}","starred_url":"https://api.github.com/users/dcarley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcarley/subscriptions","organizations_url":"https://api.github.com/users/dcarley/orgs","repos_url":"https://api.github.com/users/dcarley/repos","events_url":"https://api.github.com/users/dcarley/events{/privacy}","received_events_url":"https://api.github.com/users/dcarley/received_events","type":"User","site_admin":false},"body":"> My Regex fu is weak. What are we testing here? (Or rather, line 24). That a thing is returned that is 44 characters long, any characters?\r\n\r\nYep. Not as weak as you think!\r\n\r\n> I guess this is the only way we can test it because we don't know what the returned token is going to be... is there any way we could make this clearer?\r\n\r\nNow that you mention it, this doesn't need to be a regex at all. `expect(token.size).to eq(44)` would do the same job more clearly.","created_at":"2014-07-17T15:49:18Z","updated_at":"2014-07-17T15:49:18Z","html_url":"https://github.com/gds-operations/vcloud-core/pull/93#discussion_r15065487","pull_request_url":"https://api.github.com/repos/gds-operations/vcloud-core/pulls/93","_links":{"self":{"href":"https://api.github.com/repos/gds-operations/vcloud-core/pulls/comments/15065487"},"html":{"href":"https://github.com/gds-operations/vcloud-core/pull/93#discussion_r15065487"},"pull_request":{"href":"https://api.github.com/repos/gds-operations/vcloud-core/pulls/93"}}},"pull_request":{"url":"https://api.github.com/repos/gds-operations/vcloud-core/pulls/93","id":18475876,"html_url":"https://github.com/gds-operations/vcloud-core/pull/93","diff_url":"https://github.com/gds-operations/vcloud-core/pull/93.diff","patch_url":"https://github.com/gds-operations/vcloud-core/pull/93.patch","issue_url":"https://api.github.com/repos/gds-operations/vcloud-core/issues/93","number":93,"state":"open","title":"[#68989754] Add vcloud-login utility for session tokens","user":{"login":"dcarley","id":260438,"avatar_url":"https://avatars.githubusercontent.com/u/260438?","gravatar_id":"556697db03496fb493610c7c941fb247","url":"https://api.github.com/users/dcarley","html_url":"https://github.com/dcarley","followers_url":"https://api.github.com/users/dcarley/followers","following_url":"https://api.github.com/users/dcarley/following{/other_user}","gists_url":"https://api.github.com/users/dcarley/gists{/gist_id}","starred_url":"https://api.github.com/users/dcarley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcarley/subscriptions","organizations_url":"https://api.github.com/users/dcarley/orgs","repos_url":"https://api.github.com/users/dcarley/repos","events_url":"https://api.github.com/users/dcarley/events{/privacy}","received_events_url":"https://api.github.com/users/dcarley/received_events","type":"User","site_admin":false},"body":"As described by the --help argument:\r\n\r\n    Usage: ./bin/vcloud-login [options]\r\n\r\n    Utility for obtaining a Fog vCloud Director session token. It will output a\r\n    shell `export` command that can be consumed with:\r\n\r\n        eval $(FOG_CREDENTIAL=example ./bin/vcloud-login)\r\n\r\n    It requires a Fog credentials file (e.g. `~/.fog`) with the host and user\r\n    set, but the password set to an empty string. The password can either be\r\n    entered interactively or piped in, for example from an environment variable:\r\n\r\n        printenv PASSWORD_VAR | FOG_CREDENTIAL=example #{$0}\r\n\r\nThis should serve to consolidate the various scripts other teams have needed to\r\ncreate in order to follow the advice about not storing plaintext passwords in\r\nthe fogrc file.\r\n\r\n---\r\n\r\nI'm going to deal with preventing plaintext password use in a separate PR - but we might as well bundle them both in the same release.\r\n\r\n/cc @annashipman @mattbostock ","created_at":"2014-07-16T15:39:26Z","updated_at":"2014-07-17T15:49:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d929d7f8110d5a4b0262e6af5b71f19d2ea399f0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gds-operations/vcloud-core/pulls/93/commits","review_comments_url":"https://api.github.com/repos/gds-operations/vcloud-core/pulls/93/comments","review_comment_url":"https://api.github.com/repos/gds-operations/vcloud-core/pulls/comments/{number}","comments_url":"https://api.github.com/repos/gds-operations/vcloud-core/issues/93/comments","statuses_url":"https://api.github.com/repos/gds-operations/vcloud-core/statuses/fb9587777eb4471d08170dcb838724548285411b","head":{"label":"gds-operations:vcloud_login_token_tool","ref":"vcloud_login_token_tool","sha":"fb9587777eb4471d08170dcb838724548285411b","user":{"login":"gds-operations","id":4703760,"avatar_url":"https://avatars.githubusercontent.com/u/4703760?","gravatar_id":"960173955522c94a5cade12d7f941f3e","url":"https://api.github.com/users/gds-operations","html_url":"https://github.com/gds-operations","followers_url":"https://api.github.com/users/gds-operations/followers","following_url":"https://api.github.com/users/gds-operations/following{/other_user}","gists_url":"https://api.github.com/users/gds-operations/gists{/gist_id}","starred_url":"https://api.github.com/users/gds-operations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gds-operations/subscriptions","organizations_url":"https://api.github.com/users/gds-operations/orgs","repos_url":"https://api.github.com/users/gds-operations/repos","events_url":"https://api.github.com/users/gds-operations/events{/privacy}","received_events_url":"https://api.github.com/users/gds-operations/received_events","type":"Organization","site_admin":false},"repo":{"id":15996102,"name":"vcloud-core","full_name":"gds-operations/vcloud-core","owner":{"login":"gds-operations","id":4703760,"avatar_url":"https://avatars.githubusercontent.com/u/4703760?","gravatar_id":"960173955522c94a5cade12d7f941f3e","url":"https://api.github.com/users/gds-operations","html_url":"https://github.com/gds-operations","followers_url":"https://api.github.com/users/gds-operations/followers","following_url":"https://api.github.com/users/gds-operations/following{/other_user}","gists_url":"https://api.github.com/users/gds-operations/gists{/gist_id}","starred_url":"https://api.github.com/users/gds-operations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gds-operations/subscriptions","organizations_url":"https://api.github.com/users/gds-operations/orgs","repos_url":"https://api.github.com/users/gds-operations/repos","events_url":"https://api.github.com/users/gds-operations/events{/privacy}","received_events_url":"https://api.github.com/users/gds-operations/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gds-operations/vcloud-core","description":"vCloud Core is a gem that supports automated provisioning of VMWare vCloud Director, used by the vCloud Tools gems","fork":false,"url":"https://api.github.com/repos/gds-operations/vcloud-core","forks_url":"https://api.github.com/repos/gds-operations/vcloud-core/forks","keys_url":"https://api.github.com/repos/gds-operations/vcloud-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gds-operations/vcloud-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gds-operations/vcloud-core/teams","hooks_url":"https://api.github.com/repos/gds-operations/vcloud-core/hooks","issue_events_url":"https://api.github.com/repos/gds-operations/vcloud-core/issues/events{/number}","events_url":"https://api.github.com/repos/gds-operations/vcloud-core/events","assignees_url":"https://api.github.com/repos/gds-operations/vcloud-core/assignees{/user}","branches_url":"https://api.github.com/repos/gds-operations/vcloud-core/branches{/branch}","tags_url":"https://api.github.com/repos/gds-operations/vcloud-core/tags","blobs_url":"https://api.github.com/repos/gds-operations/vcloud-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gds-operations/vcloud-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gds-operations/vcloud-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/gds-operations/vcloud-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gds-operations/vcloud-core/statuses/{sha}","languages_url":"https://api.github.com/repos/gds-operations/vcloud-core/languages","stargazers_url":"https://api.github.com/repos/gds-operations/vcloud-core/stargazers","contributors_url":"https://api.github.com/repos/gds-operations/vcloud-core/contributors","subscribers_url":"https://api.github.com/repos/gds-operations/vcloud-core/subscribers","subscription_url":"https://api.github.com/repos/gds-operations/vcloud-core/subscription","commits_url":"https://api.github.com/repos/gds-operations/vcloud-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/gds-operations/vcloud-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/gds-operations/vcloud-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/gds-operations/vcloud-core/issues/comments/{number}","contents_url":"https://api.github.com/repos/gds-operations/vcloud-core/contents/{+path}","compare_url":"https://api.github.com/repos/gds-operations/vcloud-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gds-operations/vcloud-core/merges","archive_url":"https://api.github.com/repos/gds-operations/vcloud-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gds-operations/vcloud-core/downloads","issues_url":"https://api.github.com/repos/gds-operations/vcloud-core/issues{/number}","pulls_url":"https://api.github.com/repos/gds-operations/vcloud-core/pulls{/number}","milestones_url":"https://api.github.com/repos/gds-operations/vcloud-core/milestones{/number}","notifications_url":"https://api.github.com/repos/gds-operations/vcloud-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gds-operations/vcloud-core/labels{/name}","releases_url":"https://api.github.com/repos/gds-operations/vcloud-core/releases{/id}","created_at":"2014-01-17T09:58:05Z","updated_at":"2014-07-07T09:37:51Z","pushed_at":"2014-07-17T15:09:48Z","git_url":"git://github.com/gds-operations/vcloud-core.git","ssh_url":"git@github.com:gds-operations/vcloud-core.git","clone_url":"https://github.com/gds-operations/vcloud-core.git","svn_url":"https://github.com/gds-operations/vcloud-core","homepage":"http://gds-operations.github.io/vcloud-tools/","size":3711,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"gds-operations:master","ref":"master","sha":"ee44640c15bea6cba039aa2536e2e9febfbc1c3b","user":{"login":"gds-operations","id":4703760,"avatar_url":"https://avatars.githubusercontent.com/u/4703760?","gravatar_id":"960173955522c94a5cade12d7f941f3e","url":"https://api.github.com/users/gds-operations","html_url":"https://github.com/gds-operations","followers_url":"https://api.github.com/users/gds-operations/followers","following_url":"https://api.github.com/users/gds-operations/following{/other_user}","gists_url":"https://api.github.com/users/gds-operations/gists{/gist_id}","starred_url":"https://api.github.com/users/gds-operations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gds-operations/subscriptions","organizations_url":"https://api.github.com/users/gds-operations/orgs","repos_url":"https://api.github.com/users/gds-operations/repos","events_url":"https://api.github.com/users/gds-operations/events{/privacy}","received_events_url":"https://api.github.com/users/gds-operations/received_events","type":"Organization","site_admin":false},"repo":{"id":15996102,"name":"vcloud-core","full_name":"gds-operations/vcloud-core","owner":{"login":"gds-operations","id":4703760,"avatar_url":"https://avatars.githubusercontent.com/u/4703760?","gravatar_id":"960173955522c94a5cade12d7f941f3e","url":"https://api.github.com/users/gds-operations","html_url":"https://github.com/gds-operations","followers_url":"https://api.github.com/users/gds-operations/followers","following_url":"https://api.github.com/users/gds-operations/following{/other_user}","gists_url":"https://api.github.com/users/gds-operations/gists{/gist_id}","starred_url":"https://api.github.com/users/gds-operations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gds-operations/subscriptions","organizations_url":"https://api.github.com/users/gds-operations/orgs","repos_url":"https://api.github.com/users/gds-operations/repos","events_url":"https://api.github.com/users/gds-operations/events{/privacy}","received_events_url":"https://api.github.com/users/gds-operations/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gds-operations/vcloud-core","description":"vCloud Core is a gem that supports automated provisioning of VMWare vCloud Director, used by the vCloud Tools gems","fork":false,"url":"https://api.github.com/repos/gds-operations/vcloud-core","forks_url":"https://api.github.com/repos/gds-operations/vcloud-core/forks","keys_url":"https://api.github.com/repos/gds-operations/vcloud-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gds-operations/vcloud-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gds-operations/vcloud-core/teams","hooks_url":"https://api.github.com/repos/gds-operations/vcloud-core/hooks","issue_events_url":"https://api.github.com/repos/gds-operations/vcloud-core/issues/events{/number}","events_url":"https://api.github.com/repos/gds-operations/vcloud-core/events","assignees_url":"https://api.github.com/repos/gds-operations/vcloud-core/assignees{/user}","branches_url":"https://api.github.com/repos/gds-operations/vcloud-core/branches{/branch}","tags_url":"https://api.github.com/repos/gds-operations/vcloud-core/tags","blobs_url":"https://api.github.com/repos/gds-operations/vcloud-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gds-operations/vcloud-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gds-operations/vcloud-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/gds-operations/vcloud-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gds-operations/vcloud-core/statuses/{sha}","languages_url":"https://api.github.com/repos/gds-operations/vcloud-core/languages","stargazers_url":"https://api.github.com/repos/gds-operations/vcloud-core/stargazers","contributors_url":"https://api.github.com/repos/gds-operations/vcloud-core/contributors","subscribers_url":"https://api.github.com/repos/gds-operations/vcloud-core/subscribers","subscription_url":"https://api.github.com/repos/gds-operations/vcloud-core/subscription","commits_url":"https://api.github.com/repos/gds-operations/vcloud-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/gds-operations/vcloud-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/gds-operations/vcloud-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/gds-operations/vcloud-core/issues/comments/{number}","contents_url":"https://api.github.com/repos/gds-operations/vcloud-core/contents/{+path}","compare_url":"https://api.github.com/repos/gds-operations/vcloud-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gds-operations/vcloud-core/merges","archive_url":"https://api.github.com/repos/gds-operations/vcloud-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gds-operations/vcloud-core/downloads","issues_url":"https://api.github.com/repos/gds-operations/vcloud-core/issues{/number}","pulls_url":"https://api.github.com/repos/gds-operations/vcloud-core/pulls{/number}","milestones_url":"https://api.github.com/repos/gds-operations/vcloud-core/milestones{/number}","notifications_url":"https://api.github.com/repos/gds-operations/vcloud-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gds-operations/vcloud-core/labels{/name}","releases_url":"https://api.github.com/repos/gds-operations/vcloud-core/releases{/id}","created_at":"2014-01-17T09:58:05Z","updated_at":"2014-07-07T09:37:51Z","pushed_at":"2014-07-17T15:09:48Z","git_url":"git://github.com/gds-operations/vcloud-core.git","ssh_url":"git@github.com:gds-operations/vcloud-core.git","clone_url":"https://github.com/gds-operations/vcloud-core.git","svn_url":"https://github.com/gds-operations/vcloud-core","homepage":"http://gds-operations.github.io/vcloud-tools/","size":3711,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gds-operations/vcloud-core/pulls/93"},"html":{"href":"https://github.com/gds-operations/vcloud-core/pull/93"},"issue":{"href":"https://api.github.com/repos/gds-operations/vcloud-core/issues/93"},"comments":{"href":"https://api.github.com/repos/gds-operations/vcloud-core/issues/93/comments"},"review_comments":{"href":"https://api.github.com/repos/gds-operations/vcloud-core/pulls/93/comments"},"review_comment":{"href":"https://api.github.com/repos/gds-operations/vcloud-core/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/gds-operations/vcloud-core/pulls/93/commits"},"statuses":{"href":"https://api.github.com/repos/gds-operations/vcloud-core/statuses/fb9587777eb4471d08170dcb838724548285411b"}}}}