summaryrefslogtreecommitdiff
path: root/spec/integration/directory_environments_spec.rb
AgeCommit message (Collapse)AuthorFilesLines
2014-04-07(PUP-2158) Hide dir envs behind a feature flagAndrew Parker1-1/+2
In too many cases, having the directory environments enabled by default caused many user's dynamic environments to be detected as directory environments. This caused broken environments, sometimes in very subtle ways. This changes it so that directory environments are not enabled by default, but can be turned on. It does this by defaulting the environmentpath to the empty string, and using the empty string to denote disabled directory environments. When directory environments are enabled, legacy environments are disabled, and vice versa.
2014-02-19(PUP-1676) Puppet::Settings retrieves directory environment settingsJosh Partlow1-0/+50
During a Puppet[:setting] call, legacy environment settings would be loaded from a puppet.conf stanza. But settings from directory environments would never be seen. Areas in the codebase could obtain per environment settings by looking them up directly from an environment. However a call to puppet config or to an application with --configprint, would return the default modulepath if redirected to a directory environment using the --environment setting. A ValuesFromCurrentEnvironment class has been added to Settings to lookup environment settings not found in puppet.conf if there is a match with the :current_environment from the Context. Because of the need to access a global modulepath for environment and directory loader construction, a setting, :basemodulepath, has been added, so that we can initialize without fear of recursing infinitely looking up :modulepath. The possibility for recursion has been there since at least 3.0.0: [legacy] modulepath=/foo:$modulepath would overflow the stack. It could now be: [legacy] modulepath=/foo:$basemodulepath