| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
A naked rescue in Puppet::Node::Environment was hiding expectation
violations from the Mocha mocks.
Specifically, 'modulepath' expectations were failing, as Puppet::Module now calls
Puppet::Node::Environment#modulepath internally.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
|
|
| |
This adds a new environment cached attribute: manifestdir.
It is modeled on the code of modulepath, but returns
the manifestdir.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
| |
This simplifies who owns what code in these two classes,
and the result should be much cleaner and simpler.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We had to fix the fileserving plumbing to use the request
environment instead of trying to use the node environment.
This was apparently never fixed after we added the environment
to the URI in REST calls.
There's still a bit of refactoring left to clean up the APIs used
in some of this code.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Caching the module path (because we check which
directories exist, and this method can get called
often), and the complete list of modules.
The cache ttl uses the filetimeout, which defaults to
15 seconds.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, when you created a module you had to specify
the path. Now Module instances can use the module path
to look up their paths, and there are methods for determining
whether the module is present (if the path is present).
Also cleaned up the methods for figuring out what's in
the module (plugins, etc.).
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
| |
This is the first main phase to having a common module for
handling the REST api - this Handler module will be included
by all of the web server REST modules and the Indirector
Request class, so there's a common place that understands
how the URI consists.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
| |
They were previously still using just the variable itself.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This includes adding PUPPETLIB from the shell environment.
I'm moving responsibility for this from the Module class,
because nearly every method in Puppet::Module accepted
'environment' as its argument, which is a good sign that
it's on the wrong class.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
| |
This uses the environment to search for the modules, rather
than relying on the Puppet::Module class to know how to
handle environments.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
| |
any local variables and added a local variable -- see
http://snurl.com/21zf8. My own testing showed that this
caused memory growth to level off at a reasonable level.
Note that the link above says the problem is only with class
methods, but my own testing showed that it's any method that
meets these criteria. This is not a functional change, but
should hopefully be the last nail in the coffin of #1131.
|
|
|
|
|
| |
rather than plenty of different places having the logic of how
to determine the default environment.
|
|
and you have to specify the valid environments for your site.
|