summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/templatewrapper.rb
Commit message (Collapse)AuthorAgeFilesLines
* All non-transient parser references are goneLuke Kanies2010-02-171-4/+2
| | | | | | | | | We now use references to the ResourceTypeCollection instances through the environment, which is much cleaner. The next step is to remove the Interpreter class. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Removed extra whitespace from end of linesIan Taylor2009-06-061-1/+1
|
* Fixing a bunch of warningsLuke Kanies2009-06-031-1/+3
| | | | | | This commit should have no functional effect. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2250 - Missing templates throw a helpful errorLuke Kanies2009-05-181-5/+2
| | | | | | | | | | | This changes the behaviour of template searching a bit - we previously usually returned a file name, whether the template existed or not. Now we only return a path if it exists. Refactoring a few of the the tests for TemplateWrapper, also. Signed-off-by: Luke Kanies <luke@madstop.com>
* Moving file-searching code out of Puppet::ModuleLuke Kanies2009-05-151-2/+3
| | | | | | | | | | 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>
* Fix #1741 - refactor TemplateWrapper, test for template functionBrice Figureau2008-11-291-22/+30
|
* Fixes #1663 - added Symbol check and additional testSean E. Millichamp2008-10-231-1/+5
|
* Fix #1115 - part2 - fix tests and add all_tagsBrice Figureau2008-10-211-1/+6
| | | | | | | | Up until this patch, TemplateWrapper.tags was returning all the tags defined in the catalog. I think this is wrong and tags shoul only return the defined tags in the current scope. Hence, I defined a all_tags method that returns the list of tags defined in the whole catalog.
* Fixed #1663 - Regression relating to facter fact naming from 0.24.5James Turnbull2008-10-211-1/+2
|
* Fix #1115 - Allow checking tags/classes from ERb templatesBrice Figureau2008-10-141-0/+10
| | | | | | | | Add to predefined variables to the ERB template space. "classes" and "tags" which provide arrays of all the defined classes and tags for a node. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Added tests for TemplateWrapper's use of Scope#to_hash.Luke Kanies2008-08-091-11/+10
| | | | | | We should deprecate the method_missing stuff in 0.25. Signed-off-by: Luke Kanies <luke@madstop.com>
* Expose all puppet variables as instance member variables of the template ↵Daniel Pittman2008-08-011-13/+40
| | | | | | | | | | | | | | | | | wrapper. This helps resolve redmine #1427, by providing a safe mechanism to access variables. * Implement Puppet::Parser::Scope#to_hash, which returns a hash containing all the variable bindings in the current and, optionally, parent scope. * Use that to set instance member variables into Puppet::Parser::Templatewrapper * Report the time taken for variable binding at debug level, to help identify any performance regression that is encountered in the real world. * Rename the @scope and @file members of the template wrapper, to avoid clashing with a scope variable exposed within puppet. Signed-off-by: Daniel Pittman <daniel@rimspace.net> (cherry picked from commit ba220b41e4f509f2632e2664d332e49b20a70ea7)
* Correcting whitespace in the templatewrapper code.Luke Kanies2008-05-131-6/+6
| | | | Also slightly modified the wording of some of the tests.
* Adding has_variable? support, fixing ticket #1177Adam Jacob2008-05-131-0/+9
|
* Changing the name of the Compile class to Compiler,Luke Kanies2008-02-111-1/+1
| | | | | since it's stupid to have a class named after a verb.
* Removing the Id tags from all of the filesLuke Kanies2007-10-031-1/+0
|
* Renaming the "configuration" object to "compile", because it is only a ↵Luke Kanies2007-08-251-1/+1
| | | | transitional object and I want the real "configuration" object to be the thing that I pass from the server to the client; it will be a subclass of GRATR::Digraph.
* Modules are now tested with spec, and they now can handle ↵Luke Kanies2007-08-251-2/+2
| | | | environment-specific module paths.
* All language tests now pass. I expect there are other failures elsewhere, ↵Luke Kanies2007-08-201-2/+2
| | | | but I want to commit this before delving into them. My method for fixing the tests was to do as little as possible, keeping the tests as bad or as good as they were before I started. Mostly this was about changing references to the interpreter into references to the parser (since that is where the new* methods are now for ast containers) and then dealing with the new config object and its relationship to scopes.
* The template function now tries to first find a template within a modulelutter2007-03-091-5/+1
| | | | | | | | (if the template path looks like it belongs to a module) and only when that fails looks for it in templatedir git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2277 980ebf18-57e1-0310-9a29-db15c13687c0
* Merging the changes from the override-refactor branch. This is a ↵luke2006-10-041-0/+58
significant rewrite of the parser, but it has little affect on the rest of the code tree. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1726 980ebf18-57e1-0310-9a29-db15c13687c0