summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/functions.rb
Commit message (Collapse)AuthorAgeFilesLines
* Put function in ticket #311 in correct locationJames Turnbull2008-05-241-0/+16
|
* Fix for ticket #1209James Turnbull2008-04-301-1/+1
|
* Changing the name of the Compile class to Compiler,Luke Kanies2008-02-111-3/+3
| | | | | since it's stupid to have a class named after a verb.
* Renaming 'configuration' to 'catalog', fixing #954.Luke Kanies2007-12-111-1/+1
|
* Switching the class resource evaluation to only happenLuke Kanies2007-11-081-1/+3
| | | | | when using :include, not (for example) when evaluating node classes.
* Removing the Id tags from all of the filesLuke Kanies2007-10-031-1/+0
|
* Fixed #854.Michael V. O'Brien2007-10-031-3/+1
|
* Fixing #802 -- tags are now applied before parent classes are evaluated, so ↵Luke Kanies2007-09-061-2/+3
| | | | parent classes can use tagged() to test if a node is a member of a subclass.
* Successfully modified all tests and code so that all language tests pass ↵Luke Kanies2007-09-041-2/+2
| | | | again. This is the majority of the work necessary to make the separate "configuration" object work.
* We now have a real configuration object, as a subclass of GRATR::Digraph, ↵Luke Kanies2007-09-041-1/+0
| | | | that has a resource graph including resources for the container objects like classes and nodes. It is apparently functional, but I have not gone through all of the other tests to fix them yet. That is next.
* Deleting old documentation that somehow made it back into the tree in the ↵Luke Kanies2007-09-011-1/+1
| | | | switch to git, and refactoring the evaluate_classes method on the compile object so I can use resources as intermediaries, thus making classes do late-binding evaluation.
* Renaming the "configuration" object to "compile", because it is only a ↵Luke Kanies2007-08-251-3/+3
| | | | 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.
* The first pass where at least all of the snippet tests pass. I have ↵Luke Kanies2007-08-201-3/+4
| | | | unfortunately had to stop being so assiduous in my rewriting of tests, but I am in too much of a time crunch to do this "right". The basic structure is definitely in place, though, and from here it is a question of making the rest of the tests work and hopefully writing some sufficient new tests, rather than making the code itself work.
* Applying a version of the diff to the defined() docs from David Schmittluke2007-07-121-1/+2
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2681 980ebf18-57e1-0310-9a29-db15c13687c0
* Updating reference docsluke2007-06-201-1/+3
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2637 980ebf18-57e1-0310-9a29-db15c13687c0
* correcting some of the function reference docsluke2007-05-101-3/+6
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2502 980ebf18-57e1-0310-9a29-db15c13687c0
* Translating all of the docs except the type docs to RSTluke2007-04-231-4/+6
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2406 980ebf18-57e1-0310-9a29-db15c13687c0
* Removing the stubs for nodevar; I did not mean to commit themluke2007-04-201-4/+0
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2401 980ebf18-57e1-0310-9a29-db15c13687c0
* adding note about the class variables in the change logluke2007-04-201-0/+4
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2400 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing the documentation to match reality, as reported in #548.luke2007-03-281-3/+2
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2358 980ebf18-57e1-0310-9a29-db15c13687c0
* Clarifying the errors a bit when nodes come from external sources.luke2007-03-191-7/+13
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2324 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding #541. There is now a "generate" function.luke2007-03-181-0/+35
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2299 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #538. There is now a simple file() function to read in file contents.luke2007-03-181-0/+21
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2298 980ebf18-57e1-0310-9a29-db15c13687c0
* Apparently the include function was not failing when it could not find ↵luke2007-03-011-1/+1
| | | | | | asked-for classes. Now it does. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2250 980ebf18-57e1-0310-9a29-db15c13687c0
* More code related to #517. Oops.luke2007-02-271-4/+12
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2227 980ebf18-57e1-0310-9a29-db15c13687c0
* Moving some of the stand-alone classes into the util/ subdirectory, to clean ↵luke2007-02-071-3/+3
| | | | | | up the top-level namespace a bit. This is a lot of file modifications, but most of them just change class names and file paths. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2178 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing documentation references to refer to the wikiluke2007-01-261-1/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2098 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #442. You can now do: defined(File[...]) to see if a resource is ↵luke2007-01-261-7/+21
| | | | | | defined. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2097 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding a bit more comments to the :template functionluke2007-01-051-1/+2
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2053 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #66. The "defined" function previously checked for definitions and ↵luke2006-12-231-1/+1
| | | | | | types, but since types and classes can't have the same name anyway, the function now works for classes. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1965 980ebf18-57e1-0310-9a29-db15c13687c0
* Slightly more doc updatesluke2006-11-091-15/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1846 980ebf18-57e1-0310-9a29-db15c13687c0
* Small fixes here and there. The rails changes needs to be pushed through ↵luke2006-11-091-17/+75
| | | | | | the collection code, so I am committing so Blake can take a look at that. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1844 980ebf18-57e1-0310-9a29-db15c13687c0
* Changing the realize() function to be just syntactic sugar for a collection ↵luke2006-10-181-13/+5
| | | | | | -- it literally creates a collector object now. The benefit of this is that it is late-binding, so file order does not affect whether a resource is available. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1810 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding a "realize" function that can be used to make one or more resource ↵luke2006-10-181-0/+18
| | | | | | non-virtual. It is just syntactic sugar for a collection by title. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1808 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding modified patch from #256 -- apt now uses "responsefile" for the ↵luke2006-10-091-1/+1
| | | | | | preseed file. This is untested, though, since I do not know how to test it. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1753 980ebf18-57e1-0310-9a29-db15c13687c0
* Merging the changes from the override-refactor branch. This is a ↵luke2006-10-041-27/+19
| | | | | | 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
* - New type Notify for sending client-side log messagesajax2006-09-291-0/+7
| | | | | | | | | | | type.rb type/notify.rb - Added server-side functions named after each of the syslog log levels (debug, info, notice, warning, err, crit, alert, and emerg) parser/functions.rb git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1707 980ebf18-57e1-0310-9a29-db15c13687c0
* Reverting the work done in [1605] and [1606]. I have added it as a patch in ↵luke2006-09-151-56/+0
| | | | | | #271. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1610 980ebf18-57e1-0310-9a29-db15c13687c0
* This commit adds two important features (but which probably were notluke2006-09-151-0/+56
| | | | | | | | | | | | | | | | | | | | | | | worth the priority I suddenly placed on them). First, it adds search paths as I originally requested in #114. There is now a 'lib' setting, which can be used to tell Puppet where to find manifests. Any file you tell Puppet to parse will have its directory automatically added to the lib path. Also, Puppet will check the PUPPETLIB environment variable for further directories to search. Second, it converts the 'import' mechanism into a normal function, which means that you can now use variables and what-have-you in it. Of course, this function uses the lib mechanism. This is something that's always bothered me about the language, and having it fixed means you can do simple things like have custom code in the top scope for each operating system and then do "import os/$operatingsystem" to evaluate that code. Without this, you would either need a huge case statement or the code would need to be in a class, which often isn't sufficient. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1605 980ebf18-57e1-0310-9a29-db15c13687c0
* Function autoloading now works as requested in #214.luke2006-08-221-3/+19
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1482 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing error when template does not existluke2006-07-111-0/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1383 980ebf18-57e1-0310-9a29-db15c13687c0
* Moving the template handling into a simple wrapper object so templates don't ↵luke2006-06-301-13/+7
| | | | | | have full access to the scope object without some real hacking. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1342 980ebf18-57e1-0310-9a29-db15c13687c0
* adding some tests for the template functionluke2006-06-291-1/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1341 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding initial template support. It is just a function, and a ↵luke2006-06-291-0/+24
| | | | | | method_missing method on Scope. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1340 980ebf18-57e1-0310-9a29-db15c13687c0
* Making sure fail function converts everything to stringsluke2006-06-271-2/+2
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1323 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding "fail" function, which will raise a ParseError if it is encountered.luke2006-06-271-0/+5
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1322 980ebf18-57e1-0310-9a29-db15c13687c0
* Preliminary commit of the first phase of the parser redesign. The biggest ↵luke2006-05-091-4/+4
| | | | | | difference is that overrides should now work for definitions (although i do not yet have a test case -- i will add one on the next commit). The way this is implemented is by having scopes translate themselves at eval time, but in two phases -- the first phase does the overrides, and the second phase does the evaluation of definitions and classes. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1180 980ebf18-57e1-0310-9a29-db15c13687c0
* This should have been in 0.16.1. Moving the "setclass" statements around so ↵luke2006-04-261-4/+8
| | | | | | that classes are set before a given class's code is evaluated, so it can be tested within the code, within node defs, components, or classes. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1139 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding "defined" functino to puppet, so you can now test whether a given ↵luke2006-04-261-0/+14
| | | | | | class or definition is defined. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1135 980ebf18-57e1-0310-9a29-db15c13687c0
* Creating a simplistic, generic function framework in the parser, so it is ↵luke2006-04-261-0/+103
now very easy to add new functions. There is a pretty crappy, hardwired distinction between functions that return values and those that do not, but I do not see a good way around it right now. Functions are also currently responsible for handling their own arity, although I have plans for fixing that. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1134 980ebf18-57e1-0310-9a29-db15c13687c0