summaryrefslogtreecommitdiffstats
path: root/lib/puppet/module.rb
Commit message (Collapse)AuthorAgeFilesLines
* Making a Puppet::Module test more resilientLuke Kanies2010-04-131-3/+3
| | | | | | It would fail if a directory unexpectedly existed. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Fixing #3407 Failing tests in spec/unit/node/environment.rbJesse Wolfe2010-03-221-12/+8
| | | | | | | | | 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>
* Adding module metadataLuke Kanies2009-12-091-0/+74
| | | | | | | | | | | | | This is a first version that does very little - it has a few fields, and allows speciification of dependencies with other modules as well as compatibility with individual Puppet versions. It's not really sufficient, because it only allows specific versions, rather than a range of versions, but it's a good demo of what it takes and what we provide. Signed-off-by: Luke Kanies <luke@madstop.com>
* Ticket #2525 don't fail find_manifest on invalid module namesMarkus Roberts2009-09-051-1/+1
| | | | | | | | | The patch that put validity assertions in for module names broke find_manifest because rather than returning a failure it now rasies an exception. This patch catches the exception and treats it as a negative result. Signed-off-by: Markus Roberts <Markus@reality.com>
* Refactoring the Module/Environment co-interfaceLuke Kanies2009-08-181-22/+13
| | | | | | | 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>
* Fixing #1544 - plugins in modules now works againLuke Kanies2009-08-181-0/+2
| | | | | | | | | | | | 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>
* Using the logging utilities to clean up module warningsLuke Kanies2009-06-191-1/+12
| | | | | | | This just makes it easier to add context to warnings and other logs from the module. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #1064 - Deprecating module 'plugins' directoriesLuke Kanies2009-06-191-1/+12
| | | | | | | | | You should now use 'lib' instead of 'plugins'. The old directory still works, but you get a warning for every module that uses it. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2323 - Modules use environments correctlyLuke Kanies2009-06-121-1/+1
| | | | | | | | Previously, modules were not using their environments when looking up their paths, which meant that they often found files in the wrong environment. Signed-off-by: Luke Kanies <luke@madstop.com>
* Removed extra whitespace from end of linesIan Taylor2009-06-061-1/+1
|
* Modules now can find their own pathsLuke Kanies2009-05-151-23/+65
| | | | | | | | | | | | 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>
* Moving file-searching code out of Puppet::ModuleLuke Kanies2009-05-151-88/+1
| | | | | | | | | | The Module class had a bunch of code for finding manifests and templates even when not in a module, and it complicated the class unnecessarily. This moves that code to a new, hackish-but-sufficient module for just that purpose. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding pluginsyncing support to the IndirectorLuke Kanies2009-02-191-1/+5
| | | | | | | | | This switches away from the use of terminii for each type of fileserving - it goes back to the traditional fileserving method, and is much cleaner and simpler as a result. Signed-off-by: Luke Kanies <luke@madstop.com>
* Using the Environments to handle a lot of Module searchingLuke Kanies2009-02-181-37/+2
| | | | | | | | | | Since Environments now know how to look for modules, a lot of the Module code was able to be pushed into them. Also moving some of the tests to instance-level tests, rather than just testing the class-level interfaces. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding support for finding all modules in a given path.Luke Kanies2009-02-181-0/+22
| | | | | | | | This 'each_module' method will be used by environments to find all or a given module, and will likely eventually be used internally, too. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding new methods to Puppet::Module.Luke Kanies2009-02-181-7/+20
| | | | | | | | | | | | There are now boolean methods to test whether a given kind of file is present in a given module. E.g, you can do: Puppet::Module.new("mod", "/my/path").plugins? There are also accessor-style methods that return the full path for a given kind of file. Signed-off-by: Luke Kanies <luke@madstop.com>
* Refactoring Puppet::Module a bit.Luke Kanies2009-02-181-22/+18
| | | | | | | No behaviour change here, just some internal changes to make way for methods I want to add. Signed-off-by: Luke Kanies <luke@madstop.com>
* Finishing the work to use Puppet::Resource instead of TransObjectLuke Kanies2008-12-181-2/+7
| | | | | | | | | | | | This was a complicated project because TransObject had made its way into too many classes. The usage by Util::Settings was particularly nefarious. Refactoring and fixing this exposed some other issues. The main complication, though, was the extent to which the Puppet::Type class depended on TransObject. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixes #1773 - no longer check for absolute pathsThom May2008-11-291-1/+1
|
* Fix regression when templatedir doesn't exist.Brice Figureau2008-10-081-8/+14
| | | | | | | | When searching for a module template and if the default templatedir is inexistant, puppet was raising an error without trying the modules templates directories. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Bug #1550 - Rework to avoid regressing rspec tests, add new rspec tests for ↵Paul Nasrat2008-09-201-9/+15
| | | | | | templatedir as a path Signed-off-by: Paul Nasrat <pnasrat@googlemail.com>
* Allow a templatedir to be colon separated.Thom May2008-09-201-3/+15
| | | | | Signed-off-by: Thom May <thom@clearairturbulence.org> Signed-off-by: Paul Nasrat <pnasrat@googlemail.com>
* Fixed #1012 - templates in the templatedir are preferred to module templates.Luke Kanies2008-06-161-1/+5
|
* Fixing #1173 -- classes and definitions can now have the sameLuke Kanies2008-04-101-1/+1
| | | | name as a directory with no failures.
* Integrating Matt Palmer's patch to provide a 'plugins'Luke Kanies2007-11-241-1/+3
| | | | | | | | | | mount, fixing #891. The patch was ported to the current code by David Schmitt, I applied the rest of Matt's patches, and I then fixed all of the code so that the tests passed. The primary change I had to make to the patch was reenabling host expansion in paths -- his patch had disabled it.
* fix #891: create a plugins mount which collects all modules' plugins/ subdirsDavid Schmitt2007-11-081-4/+17
| | | | | | | This is Matthew Palmer's work, from his debian package at http://theshed.hezmatt.org/mattshacks/puppet/_patches/load_plugins_from_modules/20070831054902-6856b-0fd1481621def5d0c4d1ae48fb2f1dc357767c1e.patch I just wriggled a few hunks so they apply.
* Adding more behaviours to the Puppet::Module spec,Luke Kanies2007-10-031-6/+7
| | | | | | | and fixing some bugs in the process. Specifically, modules were no longer correctly handling fully qualified files, and they do so once again.
* Renaming the 'Puppet::Util::Config' class toLuke Kanies2007-09-221-2/+2
| | | | | | | 'Puppet::Util::Settings'. This is to clear up confusion caused by the fact that we now have a 'Configuration' class to model host configurations, or any set of resources as a "configuration".
* And we have multiple environment support in the parser. The only remaining ↵Luke Kanies2007-08-251-6/+14
| | | | piece to make this complete is to add multiple environment support to the fileserver. I also renamed Configuration.rb to Compile.rb (that is, I fixed all the classes that used to know it as a configuration).
* Modules are now tested with spec, and they now can handle ↵Luke Kanies2007-08-251-26/+30
| | | | environment-specific module paths.
* Fixing #596 -- classes in modules now autoloadluke2007-07-061-0/+115
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2655 980ebf18-57e1-0310-9a29-db15c13687c0