summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/scope.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* The "collectable" syntax now works end-to-end -- the parser correctly ↵luke2006-05-131-101/+19
| | | | | | recognizes it, the AST objects retain the settings, the scopes do the right conversion, the interpreter stores them all in the database, and then it strips the collectable objects out before sending the object list to the client git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1189 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding some small changes towards fixing #140 and #83, but this work needs ↵luke2006-05-131-10/+38
| | | | | | to take a back seat to object collection, so i will come back to it later. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1186 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #141. It was a problem related to the recent parser changes I made.luke2006-05-121-1/+0
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1185 980ebf18-57e1-0310-9a29-db15c13687c0
* removing some extraneous loggingluke2006-05-121-1/+0
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1184 980ebf18-57e1-0310-9a29-db15c13687c0
* Preliminary commit of the first phase of the parser redesign. The biggest ↵luke2006-05-091-119/+168
| | | | | | 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
* Allowing dashes in class names, although grammar rules restrict it from ↵luke2006-05-021-1/+1
| | | | | | working anywhere except node names or in tag(). They are valid in host names, and many companies have them in the host names; in fact, this fix is for a company with this exact problem -- they cannot use puppet with their nodes because all their hosts have dashes in the host names. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1165 980ebf18-57e1-0310-9a29-db15c13687c0
* Modifying "setclass" on scope to check the validity of class names, now that ↵luke2006-04-111-0/+4
| | | | | | "set" can be used to set them manually, and added a test for it. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1104 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding simple benchmarking, and using it in a few of the more obvious ↵luke2006-04-101-1/+6
| | | | | | places. Also, fixed a bug in Scope#gennode. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1098 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #103. There are now no such things as node scopes; the entire tree ↵luke2006-04-051-903/+833
| | | | | | is evaluated on every node connection, and node facts are set at the top-level scope. This includes,um, the code; the last commit was accidentally just test changes. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1073 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing the class file to actually store class names, not object ids. Also ↵luke2006-04-041-6/+6
| | | | | | added tests to make sure it all stays that way. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1063 980ebf18-57e1-0310-9a29-db15c13687c0
* Using undefined variables is no longer an exception, it just returns an ↵luke2006-03-111-4/+5
| | | | | | empty string. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1003 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #96. Defaults are now set when the object is passed out by the ↵luke2006-03-091-0/+17
| | | | | | scope, rather than when the object is created. This is nice because it also moves awareness of the scope internals out of the AST object and back into the scope. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@996 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing bug #60. Converting nodes to use types everywhere instead of names, ↵luke2006-02-281-97/+238
| | | | | | and adding a localobjectable to keep track of what parameters have been defined locally. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@957 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #64; multiple class definitions in the same scope is now an error, ↵luke2006-02-271-1/+7
| | | | | | although using the same class name in different scopes is not an error. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@956 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing bug #73; node names now appear only once in the pathluke2006-02-271-2/+12
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@955 980ebf18-57e1-0310-9a29-db15c13687c0
* Removing all of the autoname codeluke2006-02-271-2/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@953 980ebf18-57e1-0310-9a29-db15c13687c0
* Mostly, this is a refactoring commit. There is one significant new feature,luke2006-02-271-25/+101
| | | | | | | | | | | | | | | | | though: overrides now only work within a class heirarchy, which is to say that a subclass can override an element in a base class, but a child scope cannot otherwise override an element in a base scope. I've also done a good bit of refactoring, though; notably, AST#evaluate now takes named arguments, and I changed the 'name' parameter to 'type' in all of the Component classes (this was all internal, but was confusing as it was). I also removed the need for the autonaming stuff -- it's now acceptable for components not to have names, and everything behaves correctly. I haven't yet removed the autoname code, though; I'll do that on the next commit. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@952 980ebf18-57e1-0310-9a29-db15c13687c0
* Switching setclass to use object_ids instead of class names, and adding some ↵luke2006-02-271-6/+7
| | | | | | comments. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@951 980ebf18-57e1-0310-9a29-db15c13687c0
* Changing transactions to be one-stage instead of two, and changing most of ↵luke2006-02-161-1/+0
| | | | | | the type classes to use "obj[:name]" instead of "obj.name" where appropriate, because "obj.name" might be a symbolic name (e.g., File.unlink(file.name) will not do what you want if file.name == "sshdconfig" but file[:path] == "/etc/ssh/sshd_config") git-svn-id: https://reductivelabs.com/svn/puppet/trunk@922 980ebf18-57e1-0310-9a29-db15c13687c0
* Committing the initial ldap support -- puppet can now look up node ↵luke2006-02-141-5/+43
| | | | | | configurations in ldap. The test scripts currently only work on my home network. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@909 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing some problems with cron tab management, and creating ↵luke2006-02-131-0/+3
| | | | | | Puppet::Util.{u,g}id methods. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@898 980ebf18-57e1-0310-9a29-db15c13687c0
* Making the language name a real alias. Now all objects in Puppet support ↵luke2006-02-101-0/+1
| | | | | | specifying both the name and the namevar, or just a name and having the namevar set. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@896 980ebf18-57e1-0310-9a29-db15c13687c0
* Committing both the finalization of the config code, plus all of the code ↵luke2006-02-071-1/+11
| | | | | | necessary to get basic isomorphism from code to transportables and back. Mostly keyword and autoname stuff. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@871 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing class storage -- it was not working for nodescopesluke2006-01-301-5/+17
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@858 980ebf18-57e1-0310-9a29-db15c13687c0
* Made lots of small changes, mostly to help usability but also fixed a couple ↵luke2006-01-181-29/+16
| | | | | | of key bugs git-svn-id: https://reductivelabs.com/svn/puppet/trunk@841 980ebf18-57e1-0310-9a29-db15c13687c0
* Converting transport format to YAML instead of Marshal, and caching the file ↵luke2006-01-121-1/+9
| | | | | | in a YAML format, also. This required a significant rework of both Transportable classes. Lastly, I am also now caching the list of classes in a class file in /etc/puppet. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@816 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding "content" state to files, and string interpolation handles escaped ↵luke2006-01-121-1/+1
| | | | | | whitespace characters. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@813 980ebf18-57e1-0310-9a29-db15c13687c0
* adding cfengine module, which required passing the cfengine classes all the ↵luke2005-11-171-1/+9
| | | | | | way through the stack to the scope git-svn-id: https://reductivelabs.com/svn/puppet/trunk@746 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding "isomorphic?" method to classes, and testing for isomorphism before ↵luke2005-11-021-9/+14
| | | | | | throwing a conflict git-svn-id: https://reductivelabs.com/svn/puppet/trunk@741 980ebf18-57e1-0310-9a29-db15c13687c0
* Further progress towards the next release. Lots of small bugs fixed, the ↵luke2005-11-011-5/+3
| | | | | | paths look much better now, and Transportable is much cleaner. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@740 980ebf18-57e1-0310-9a29-db15c13687c0
* The language now verifies some resemblance to closurehood. I now only need ↵luke2005-10-301-29/+95
| | | | | | to fix the library to expect this behaviour. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@736 980ebf18-57e1-0310-9a29-db15c13687c0
* central logging is fully functional now, but it is painfully slow, so it is ↵luke2005-10-281-1/+1
| | | | | | disabled by default git-svn-id: https://reductivelabs.com/svn/puppet/trunk@733 980ebf18-57e1-0310-9a29-db15c13687c0
* The Puppet::Util.asuser function now works; had to slightly modify user.rb ↵luke2005-10-231-1/+1
| | | | | | to make checking work. In addition, exec.rb now takes advantage of it. I also decided to make a small change to type.rb -- validstates now only returns state names, not names and states. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@726 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding some semantic tagging. It is not exactly full-featured yet, and it ↵luke2005-10-101-20/+84
| | | | | | is not used at all, but it was sufficient for some proof-of-concept stuff in preparation for the conference git-svn-id: https://reductivelabs.com/svn/puppet/trunk@716 980ebf18-57e1-0310-9a29-db15c13687c0
* adding tag support to scopes and the transportable classluke2005-10-041-1/+32
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@715 980ebf18-57e1-0310-9a29-db15c13687c0
* Many, many changes toward a completely functional system. The only current ↵luke2005-09-231-7/+10
| | | | | | problems with my home config are that apache's stupid init script does not do status and that packages are not working as non-root users (which makes sense). git-svn-id: https://reductivelabs.com/svn/puppet/trunk@703 980ebf18-57e1-0310-9a29-db15c13687c0
* Nodes now support inheritance, for better or for worse.luke2005-09-231-69/+44
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@701 980ebf18-57e1-0310-9a29-db15c13687c0
* The new "include" syntax works now.luke2005-09-221-1/+3
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@700 980ebf18-57e1-0310-9a29-db15c13687c0
* Okay, all tests pass again. The work done on nodes will take a little while ↵luke2005-09-221-16/+50
| | | | | | to clarify and such, but it should work pretty well. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@698 980ebf18-57e1-0310-9a29-db15c13687c0
* I am still somewhat in mid-change, but I have made the biggest changes to ↵luke2005-09-211-23/+121
| | | | | | making nodes work correctly. The core code works, but I still need to fix my various test cases git-svn-id: https://reductivelabs.com/svn/puppet/trunk@697 980ebf18-57e1-0310-9a29-db15c13687c0
* Okay, significant change -- classes no longer accept arguments (which makes ↵luke2005-09-211-106/+146
| | | | | | things simpler but encourages the user of global variables, which is bad), and classes are finally singletons, meaning they will only ever be evaluated for each node a single time. I still need to make nodes work correctly, but that is going to involve modifying the parsing system and a bit more git-svn-id: https://reductivelabs.com/svn/puppet/trunk@694 980ebf18-57e1-0310-9a29-db15c13687c0
* My cfengine2puppet config now entirely parses. The biggest problem I ran ↵luke2005-09-181-1/+4
| | | | | | into is that my glob-based parsing was only returning the results of the last parsed file, instead of collecting all of the results. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@689 980ebf18-57e1-0310-9a29-db15c13687c0
* tracked down some sticky bugs related to having false values and empty ↵luke2005-09-131-3/+4
| | | | | | strings; all fixed now, and all tests pass again, including the new tests that cover the bugs i found git-svn-id: https://reductivelabs.com/svn/puppet/trunk@652 980ebf18-57e1-0310-9a29-db15c13687c0
* replacing if statements with case statement, and adding defaults for both ↵Luke Kanies2005-08-241-1/+1
| | | | | | selectors and case statements git-svn-id: https://reductivelabs.com/svn/puppet/trunk@587 980ebf18-57e1-0310-9a29-db15c13687c0
* Moving all files into a consolidated trunk. All tests pass except the ↵Luke Kanies2005-08-231-0/+427
known-failing certificate test, but there appear to be some errors that are incorrectly not resulting in failurs. I will track those down ASAP. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@576 980ebf18-57e1-0310-9a29-db15c13687c0