{"action":"created","comment":{"url":"https://api.github.com/repos/cucumber/aruba/pulls/comments/36193361","id":36193361,"diff_hunk":"@@ -0,0 +1,98 @@\n+require 'spec_helper'\n+\n+# create a value that does not exist in the collection. append a number to the original_str until not found\n+def nonexistant(coll = [], str = \"zzz\")\n+  not_found_value = str\n+  i = 1\n+  while coll.include?(not_found_value)\n+    not_found_value = \"#{not_found_value}-#{i}\"\n+    i += 1\n+  end\n+  not_found_value\n+end\n+\n+describe WindowsEnvironmentVars do\n+  subject(:windows_env) { described_class.new }\n+\n+  let(:env_1)         { \"EnvVarAdapt-1\" }\n+  let(:env_1_value)   { \"EVA one one one\" }\n+  let(:env_2)         { \"EnvVarAdapt-2\" }\n+  let(:env_2_value)   { \"EVA two two two\" }\n+  let(:default_value) { \"default value\" }\n+\n+  it \"doesn't have any lower-case letters\" do","path":"spec/aruba/platform/windows_environment_vars_spec.rb","position":23,"original_position":23,"commit_id":"b7becc3875c2a7529a40883660dd6fb1c032270f","original_commit_id":"b7becc3875c2a7529a40883660dd6fb1c032270f","user":{"login":"dg-ratiodata","id":1267524,"avatar_url":"https://avatars.githubusercontent.com/u/1267524?v=3","gravatar_id":"","url":"https://api.github.com/users/dg-ratiodata","html_url":"https://github.com/dg-ratiodata","followers_url":"https://api.github.com/users/dg-ratiodata/followers","following_url":"https://api.github.com/users/dg-ratiodata/following{/other_user}","gists_url":"https://api.github.com/users/dg-ratiodata/gists{/gist_id}","starred_url":"https://api.github.com/users/dg-ratiodata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dg-ratiodata/subscriptions","organizations_url":"https://api.github.com/users/dg-ratiodata/orgs","repos_url":"https://api.github.com/users/dg-ratiodata/repos","events_url":"https://api.github.com/users/dg-ratiodata/events{/privacy}","received_events_url":"https://api.github.com/users/dg-ratiodata/received_events","type":"User","site_admin":false},"body":"Please use a different style for tests:\r\n\r\n~~~ruby\r\ndescribe '#[]' do\r\n  context 'when environment contains uppercase variable' do\r\n    let(:old_environment) { { 'MY_VARIABLE' => '1' } }\r\n\r\n    context 'when uppercase key is given' do\r\n      let(:variable) { 'MY_VARIABLE' }\r\n\r\n      it { expect(windows_env[variable]).to eq '1' }\r\n    end\r\n\r\n    context 'when lowercase key is given' do\r\n      let(:variable) { 'my_variable' }\r\n\r\n      it { expect(windows_env[variable]).to eq '1' }\r\n    end\r\n  end\r\nend\r\n~~~\r\n","created_at":"2015-08-04T14:26:08Z","updated_at":"2015-08-04T14:26:08Z","html_url":"https://github.com/cucumber/aruba/pull/300#discussion_r36193361","pull_request_url":"https://api.github.com/repos/cucumber/aruba/pulls/300","_links":{"self":{"href":"https://api.github.com/repos/cucumber/aruba/pulls/comments/36193361"},"html":{"href":"https://github.com/cucumber/aruba/pull/300#discussion_r36193361"},"pull_request":{"href":"https://api.github.com/repos/cucumber/aruba/pulls/300"}}},"pull_request":{"url":"https://api.github.com/repos/cucumber/aruba/pulls/300","id":40833500,"html_url":"https://github.com/cucumber/aruba/pull/300","diff_url":"https://github.com/cucumber/aruba/pull/300.diff","patch_url":"https://github.com/cucumber/aruba/pull/300.patch","issue_url":"https://api.github.com/repos/cucumber/aruba/issues/300","number":300,"state":"open","locked":false,"title":"Windows Environment Vars are converted to all upper case","user":{"login":"weedySeaDragon","id":673794,"avatar_url":"https://avatars.githubusercontent.com/u/673794?v=3","gravatar_id":"","url":"https://api.github.com/users/weedySeaDragon","html_url":"https://github.com/weedySeaDragon","followers_url":"https://api.github.com/users/weedySeaDragon/followers","following_url":"https://api.github.com/users/weedySeaDragon/following{/other_user}","gists_url":"https://api.github.com/users/weedySeaDragon/gists{/gist_id}","starred_url":"https://api.github.com/users/weedySeaDragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weedySeaDragon/subscriptions","organizations_url":"https://api.github.com/users/weedySeaDragon/orgs","repos_url":"https://api.github.com/users/weedySeaDragon/repos","events_url":"https://api.github.com/users/weedySeaDragon/events{/privacy}","received_events_url":"https://api.github.com/users/weedySeaDragon/received_events","type":"User","site_admin":false},"body":"addresses #291 \r\n```WindowsEnvironmentVars < Environment```  converts all ENV keys to upper case on initialization.  \r\n\r\n```WindowsPlatform``` now uses ```WindowsEnvironmentVars``` as its environment:\r\n```ruby\r\n    class WindowsPlatform < UnixPlatform\r\n      ...\r\n      def environment_variables\r\n        WindowsEnvironmentVars.new\r\n      end\r\n```\r\n\r\nRspec tests for ```WindowsEnvironmentVars``` included to be sure that accessing the environment variables by the keys will work and that ```WindowsEnvironmentVars.keys``` only has upper case chars.\r\n\r\n-  I put the class into aruba/lib/platforms  but perhaps it should go somewhere else\r\n-  \"```WindowsEnvironmentVars.keys``` only has upper case chars.\" really means that it only checks to be sure that none of the keys match ```/[a-z]+/```  I think that might not catch lower case unicode chars that don't get 'upper-cased' by ```[String].upcase```\r\n  - Is this is worth including a gem that does unicode checking and 'upper-casing' so that we can be sure to check this? (like [unicode_utils](https://github.com/lang/unicode_utils))   Or should we wait until someone has an issue with it and then deal with it?","created_at":"2015-07-25T08:25:47Z","updated_at":"2015-08-04T14:26:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb7f958c98a341752e1c778c6a397eac088b7232","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cucumber/aruba/pulls/300/commits","review_comments_url":"https://api.github.com/repos/cucumber/aruba/pulls/300/comments","review_comment_url":"https://api.github.com/repos/cucumber/aruba/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cucumber/aruba/issues/300/comments","statuses_url":"https://api.github.com/repos/cucumber/aruba/statuses/b7becc3875c2a7529a40883660dd6fb1c032270f","head":{"label":"weedySeaDragon:150724-wsd--windows-env-vars-upcase","ref":"150724-wsd--windows-env-vars-upcase","sha":"b7becc3875c2a7529a40883660dd6fb1c032270f","user":{"login":"weedySeaDragon","id":673794,"avatar_url":"https://avatars.githubusercontent.com/u/673794?v=3","gravatar_id":"","url":"https://api.github.com/users/weedySeaDragon","html_url":"https://github.com/weedySeaDragon","followers_url":"https://api.github.com/users/weedySeaDragon/followers","following_url":"https://api.github.com/users/weedySeaDragon/following{/other_user}","gists_url":"https://api.github.com/users/weedySeaDragon/gists{/gist_id}","starred_url":"https://api.github.com/users/weedySeaDragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weedySeaDragon/subscriptions","organizations_url":"https://api.github.com/users/weedySeaDragon/orgs","repos_url":"https://api.github.com/users/weedySeaDragon/repos","events_url":"https://api.github.com/users/weedySeaDragon/events{/privacy}","received_events_url":"https://api.github.com/users/weedySeaDragon/received_events","type":"User","site_admin":false},"repo":{"id":39090751,"name":"aruba","full_name":"weedySeaDragon/aruba","owner":{"login":"weedySeaDragon","id":673794,"avatar_url":"https://avatars.githubusercontent.com/u/673794?v=3","gravatar_id":"","url":"https://api.github.com/users/weedySeaDragon","html_url":"https://github.com/weedySeaDragon","followers_url":"https://api.github.com/users/weedySeaDragon/followers","following_url":"https://api.github.com/users/weedySeaDragon/following{/other_user}","gists_url":"https://api.github.com/users/weedySeaDragon/gists{/gist_id}","starred_url":"https://api.github.com/users/weedySeaDragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weedySeaDragon/subscriptions","organizations_url":"https://api.github.com/users/weedySeaDragon/orgs","repos_url":"https://api.github.com/users/weedySeaDragon/repos","events_url":"https://api.github.com/users/weedySeaDragon/events{/privacy}","received_events_url":"https://api.github.com/users/weedySeaDragon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/weedySeaDragon/aruba","description":"CLI Steps for Cucumber","fork":true,"url":"https://api.github.com/repos/weedySeaDragon/aruba","forks_url":"https://api.github.com/repos/weedySeaDragon/aruba/forks","keys_url":"https://api.github.com/repos/weedySeaDragon/aruba/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weedySeaDragon/aruba/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weedySeaDragon/aruba/teams","hooks_url":"https://api.github.com/repos/weedySeaDragon/aruba/hooks","issue_events_url":"https://api.github.com/repos/weedySeaDragon/aruba/issues/events{/number}","events_url":"https://api.github.com/repos/weedySeaDragon/aruba/events","assignees_url":"https://api.github.com/repos/weedySeaDragon/aruba/assignees{/user}","branches_url":"https://api.github.com/repos/weedySeaDragon/aruba/branches{/branch}","tags_url":"https://api.github.com/repos/weedySeaDragon/aruba/tags","blobs_url":"https://api.github.com/repos/weedySeaDragon/aruba/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weedySeaDragon/aruba/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weedySeaDragon/aruba/git/refs{/sha}","trees_url":"https://api.github.com/repos/weedySeaDragon/aruba/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weedySeaDragon/aruba/statuses/{sha}","languages_url":"https://api.github.com/repos/weedySeaDragon/aruba/languages","stargazers_url":"https://api.github.com/repos/weedySeaDragon/aruba/stargazers","contributors_url":"https://api.github.com/repos/weedySeaDragon/aruba/contributors","subscribers_url":"https://api.github.com/repos/weedySeaDragon/aruba/subscribers","subscription_url":"https://api.github.com/repos/weedySeaDragon/aruba/subscription","commits_url":"https://api.github.com/repos/weedySeaDragon/aruba/commits{/sha}","git_commits_url":"https://api.github.com/repos/weedySeaDragon/aruba/git/commits{/sha}","comments_url":"https://api.github.com/repos/weedySeaDragon/aruba/comments{/number}","issue_comment_url":"https://api.github.com/repos/weedySeaDragon/aruba/issues/comments{/number}","contents_url":"https://api.github.com/repos/weedySeaDragon/aruba/contents/{+path}","compare_url":"https://api.github.com/repos/weedySeaDragon/aruba/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weedySeaDragon/aruba/merges","archive_url":"https://api.github.com/repos/weedySeaDragon/aruba/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weedySeaDragon/aruba/downloads","issues_url":"https://api.github.com/repos/weedySeaDragon/aruba/issues{/number}","pulls_url":"https://api.github.com/repos/weedySeaDragon/aruba/pulls{/number}","milestones_url":"https://api.github.com/repos/weedySeaDragon/aruba/milestones{/number}","notifications_url":"https://api.github.com/repos/weedySeaDragon/aruba/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weedySeaDragon/aruba/labels{/name}","releases_url":"https://api.github.com/repos/weedySeaDragon/aruba/releases{/id}","created_at":"2015-07-14T17:43:41Z","updated_at":"2015-07-14T17:43:42Z","pushed_at":"2015-07-25T08:04:17Z","git_url":"git://github.com/weedySeaDragon/aruba.git","ssh_url":"git@github.com:weedySeaDragon/aruba.git","clone_url":"https://github.com/weedySeaDragon/aruba.git","svn_url":"https://github.com/weedySeaDragon/aruba","homepage":"","size":1472,"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":"cucumber:master","ref":"master","sha":"fe7851d91fda1cfb065b54997a698c8d6a23792f","user":{"login":"cucumber","id":320565,"avatar_url":"https://avatars.githubusercontent.com/u/320565?v=3","gravatar_id":"","url":"https://api.github.com/users/cucumber","html_url":"https://github.com/cucumber","followers_url":"https://api.github.com/users/cucumber/followers","following_url":"https://api.github.com/users/cucumber/following{/other_user}","gists_url":"https://api.github.com/users/cucumber/gists{/gist_id}","starred_url":"https://api.github.com/users/cucumber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cucumber/subscriptions","organizations_url":"https://api.github.com/users/cucumber/orgs","repos_url":"https://api.github.com/users/cucumber/repos","events_url":"https://api.github.com/users/cucumber/events{/privacy}","received_events_url":"https://api.github.com/users/cucumber/received_events","type":"Organization","site_admin":false},"repo":{"id":515585,"name":"aruba","full_name":"cucumber/aruba","owner":{"login":"cucumber","id":320565,"avatar_url":"https://avatars.githubusercontent.com/u/320565?v=3","gravatar_id":"","url":"https://api.github.com/users/cucumber","html_url":"https://github.com/cucumber","followers_url":"https://api.github.com/users/cucumber/followers","following_url":"https://api.github.com/users/cucumber/following{/other_user}","gists_url":"https://api.github.com/users/cucumber/gists{/gist_id}","starred_url":"https://api.github.com/users/cucumber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cucumber/subscriptions","organizations_url":"https://api.github.com/users/cucumber/orgs","repos_url":"https://api.github.com/users/cucumber/repos","events_url":"https://api.github.com/users/cucumber/events{/privacy}","received_events_url":"https://api.github.com/users/cucumber/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cucumber/aruba","description":"CLI Steps for Cucumber","fork":false,"url":"https://api.github.com/repos/cucumber/aruba","forks_url":"https://api.github.com/repos/cucumber/aruba/forks","keys_url":"https://api.github.com/repos/cucumber/aruba/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cucumber/aruba/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cucumber/aruba/teams","hooks_url":"https://api.github.com/repos/cucumber/aruba/hooks","issue_events_url":"https://api.github.com/repos/cucumber/aruba/issues/events{/number}","events_url":"https://api.github.com/repos/cucumber/aruba/events","assignees_url":"https://api.github.com/repos/cucumber/aruba/assignees{/user}","branches_url":"https://api.github.com/repos/cucumber/aruba/branches{/branch}","tags_url":"https://api.github.com/repos/cucumber/aruba/tags","blobs_url":"https://api.github.com/repos/cucumber/aruba/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cucumber/aruba/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cucumber/aruba/git/refs{/sha}","trees_url":"https://api.github.com/repos/cucumber/aruba/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cucumber/aruba/statuses/{sha}","languages_url":"https://api.github.com/repos/cucumber/aruba/languages","stargazers_url":"https://api.github.com/repos/cucumber/aruba/stargazers","contributors_url":"https://api.github.com/repos/cucumber/aruba/contributors","subscribers_url":"https://api.github.com/repos/cucumber/aruba/subscribers","subscription_url":"https://api.github.com/repos/cucumber/aruba/subscription","commits_url":"https://api.github.com/repos/cucumber/aruba/commits{/sha}","git_commits_url":"https://api.github.com/repos/cucumber/aruba/git/commits{/sha}","comments_url":"https://api.github.com/repos/cucumber/aruba/comments{/number}","issue_comment_url":"https://api.github.com/repos/cucumber/aruba/issues/comments{/number}","contents_url":"https://api.github.com/repos/cucumber/aruba/contents/{+path}","compare_url":"https://api.github.com/repos/cucumber/aruba/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cucumber/aruba/merges","archive_url":"https://api.github.com/repos/cucumber/aruba/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cucumber/aruba/downloads","issues_url":"https://api.github.com/repos/cucumber/aruba/issues{/number}","pulls_url":"https://api.github.com/repos/cucumber/aruba/pulls{/number}","milestones_url":"https://api.github.com/repos/cucumber/aruba/milestones{/number}","notifications_url":"https://api.github.com/repos/cucumber/aruba/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cucumber/aruba/labels{/name}","releases_url":"https://api.github.com/repos/cucumber/aruba/releases{/id}","created_at":"2010-02-12T19:06:31Z","updated_at":"2015-07-31T12:44:41Z","pushed_at":"2015-08-03T04:35:24Z","git_url":"git://github.com/cucumber/aruba.git","ssh_url":"git@github.com:cucumber/aruba.git","clone_url":"https://github.com/cucumber/aruba.git","svn_url":"https://github.com/cucumber/aruba","homepage":"","size":3791,"stargazers_count":617,"watchers_count":617,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":110,"mirror_url":null,"open_issues_count":43,"forks":110,"open_issues":43,"watchers":617,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cucumber/aruba/pulls/300"},"html":{"href":"https://github.com/cucumber/aruba/pull/300"},"issue":{"href":"https://api.github.com/repos/cucumber/aruba/issues/300"},"comments":{"href":"https://api.github.com/repos/cucumber/aruba/issues/300/comments"},"review_comments":{"href":"https://api.github.com/repos/cucumber/aruba/pulls/300/comments"},"review_comment":{"href":"https://api.github.com/repos/cucumber/aruba/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cucumber/aruba/pulls/300/commits"},"statuses":{"href":"https://api.github.com/repos/cucumber/aruba/statuses/b7becc3875c2a7529a40883660dd6fb1c032270f"}}}}