GitHub PullRequestReviewCommentEvent at 2014-03-14 21:50:19
Repository: puppet
Actor: zaphod42
Payload: {"comment":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/10628695","id":10628695,"diff_hunk":"@@ -122,5 +143,127 @@ def loader_from(options, &block)\n         expect(loader.get(\"env_not_in_this_list\")).to be_nil\n       end\n     end\n+\n+    context \"with an environment.conf\" do\n+      let(:envdir) do\n+        FS::MemoryFile.a_directory(File.expand_path(\"envdir\"), [\n+          FS::MemoryFile.a_directory(\"env1\", [\n+            FS::MemoryFile.a_regular_file_containing(\"environment.conf\", content),\n+          ]),\n+        ])\n+      end\n+      let(:manifestdir) { FS::MemoryFile.a_directory(\"/some/manifest/path\") }\n+      let(:modulepath) do\n+        [\n+          FS::MemoryFile.a_directory(\"/some/module/path\"),\n+          FS::MemoryFile.a_directory(\"/some/other/path\"),\n+        ]\n+      end\n+\n+      let(:content) do\n+        <<-EOF\n+manifest=#{manifestdir}\n+modulepath=#{modulepath.join(File::PATH_SEPARATOR)}\n+config_version=/some/script\n+        EOF\n+      end\n+\n+      it \"reads environment.conf settings\" do\n+        loader_from(:filesystem => [envdir, manifestdir, modulepath].flatten,\n+                    :directory => envdir) do |loader|\n+          expect(loader.get(\"env1\")).to environment(:env1).\n+            with_manifest(manifestdir.path).\n+            with_modulepath(modulepath.map(&:path))\n+        end\n+      end\n+\n+      it \"continues to append global_module_path to environment.conf modulepath setting\" do","path":"spec/unit/environments_spec.rb","position":143,"original_position":143,"commit_id":"9f997a044e3c4f420b39dc949dfe35bf73d76c4d","original_commit_id":"9f997a044e3c4f420b39dc949dfe35bf73d76c4d","user":{"login":"zaphod42","id":295810,"avatar_url":"https://gravatar.com/avatar/36ccf398adbe1a4264d57b32917b990c?d=https%3A%2F%2Fidenticons.github.com%2Ff8dc72ae8e222c771273e2d9262581d7.png&r=x","gravatar_id":"36ccf398adbe1a4264d57b32917b990c","url":"https://api.github.com/users/zaphod42","html_url":"https://github.com/zaphod42","followers_url":"https://api.github.com/users/zaphod42/followers","following_url":"https://api.github.com/users/zaphod42/following{/other_user}","gists_url":"https://api.github.com/users/zaphod42/gists{/gist_id}","starred_url":"https://api.github.com/users/zaphod42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zaphod42/subscriptions","organizations_url":"https://api.github.com/users/zaphod42/orgs","repos_url":"https://api.github.com/users/zaphod42/repos","events_url":"https://api.github.com/users/zaphod42/events{/privacy}","received_events_url":"https://api.github.com/users/zaphod42/received_events","type":"User","site_admin":false},"body":"I don't think it should do this. It seems a little surprising that the environment configuration explicitly says one modulepath and the environment ends up with that modulepath plus some other ones.","created_at":"2014-03-14T21:50:19Z","updated_at":"2014-03-14T21:50:19Z","html_url":"https://github.com/puppetlabs/puppet/pull/2431#discussion_r10628695","pull_request_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/2431","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/10628695"},"html":{"href":"https://github.com/puppetlabs/puppet/pull/2431#discussion_r10628695"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/2431"}}}}