{"action":"created","issue":{"url":"https://api.github.com/repos/cucumber/aruba/issues/291","labels_url":"https://api.github.com/repos/cucumber/aruba/issues/291/labels{/name}","comments_url":"https://api.github.com/repos/cucumber/aruba/issues/291/comments","events_url":"https://api.github.com/repos/cucumber/aruba/issues/291/events","html_url":"https://github.com/cucumber/aruba/issues/291","id":95431936,"number":291,"title":"Windows ENV variables are case-insensitive (but not to Ruby)","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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-16T13:22:23Z","updated_at":"2015-07-19T04:43:49Z","closed_at":null,"body":"Windows treats its environment variables without regard to the CASE. That is, in Windows, the environment variable <code>'PATH' == 'Path' == 'PaTh' == 'patH'</code> etc.  Using <code>ENV</code> to query the environment variables from Windows is also case-insensitive.  So: <code>ENV['PATH'] == ENV['Path']</code>\r\n\r\nHowever, once that information is brought into Ruby (e.g. by something like <code>environment = ENV.to_hash</code>, then case matters.  In this case, the keys in <code>environment</code> _are_ case sensitive.  So <code>environment['PATH'] </code> is _not_ equal to <code>environment['Path']</code>\r\n\r\nThis is causing failure anywhere that ENV['PATH'] is used.  (Specs and features that depend on this all fail under Windows.)  ENV['Path'] = _<the actual path information, according to Windows>_ is what is copied into <code>@environment</code>  But the key used is still 'Path' (mixed case).  But in the rest of the code, the key 'PATH' is used.  Since nothing exists for that key, things don't happen like they should.\r\n\r\nI suggest that the use of ENV['PATH'] be isolated (turned in to a method call).  Then any initial case conversion can be done privately (e.g. change things to upper case before any comparison is done with ENV['PATH']).  \r\nI'm not sure where such a method should go.  (I haven't explored it.)  "},"comment":{"url":"https://api.github.com/repos/cucumber/aruba/issues/comments/122625416","html_url":"https://github.com/cucumber/aruba/issues/291#issuecomment-122625416","issue_url":"https://api.github.com/repos/cucumber/aruba/issues/291","id":122625416,"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},"created_at":"2015-07-19T04:43:49Z","updated_at":"2015-07-19T04:43:49Z","body":"I've created a PR for this (#293). With that PR (and the one it depends on: #290 ), all but one of the specs passed.  That one that didn't (Aruba::Api files #expand_path when file_name contains fixtures \"%\" string..)  needed to have one change:  it was using <code>instance_double('Aruba::Environment')</code>.  But that wouldn't work.  Changing the mock from an <code>instance_double</code> to an <code>object_double</code> did the trick.  ...Except for ruby 1.9.2.  The configuration features are failing with that one. I'm not sure if or how this might have caused that.  \r\ni hope this doesn't collide with anything you're working on.\r\n\r\nUsing the PR, running the cucumber tests on my system now shows a whole new set of errors (in a good way).  As an example, now I'm getting a whole lot of \"Command \\\"cli\\\" not found in PATH-variable\" -- which means that at least things are getting farther.   :clap:\r\n\r\nLet me know what you think of it."}}