summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser
Commit message (Collapse)AuthorAgeFilesLines
...
* | Significantly refactoring the lexer, including adding Token and TokenListLuke Kanies2008-01-302-275/+393
| | | | | | | | | | | | classes for managing how the tokens work. I also moved they tests to RSpec, but I didn't rewrite all of them.
* | Removing tons of unnecessary calls to "nil?" from the lexer.Luke Kanies2008-01-281-22/+6
|/
* Fixing #976 -- both the full name of qualified classes andLuke Kanies2008-01-191-25/+10
| | | | | | the class parts are now added as tags. I've also created a Tagging module that we should push throughout the rest of the system that uses tags.
* Applying a fix for #998 -- I used a patch equivalent toLuke Kanies2008-01-191-0/+3
| | | | | bartv's, although I could not use his commit because it was against the 'master' branch instead of 0.24.x.
* Fixing #982 -- I have completely removed the GRATR graph libraryLuke Kanies2008-01-071-5/+1
| | | | from the system, and implemented my own topsort method.
* Fixing #971 -- classes can once again be included multipleLuke Kanies2008-01-071-0/+3
| | | | times.
* Fixing #967 -- relationships now work when running 0.23.x clientsLuke Kanies2007-12-181-1/+7
| | | | against 0.24.0 servers.
* This should be the last fix for exported resources.Luke Kanies2007-12-111-0/+2
| | | | | | Hosts were keeping the export bit on all resources, even when they'd collected another host's resources, which caused a duplicate copy that was still exported.
* Renaming 'configuration' to 'catalog', fixing #954.Luke Kanies2007-12-114-23/+23
|
* Fixing #923. Resources that are collected on the localLuke Kanies2007-12-061-1/+0
| | | | host are no longer marked as not exported.
* Theoretically, this patch is to fix #917 (which it does), butLuke Kanies2007-11-284-27/+22
| | | | | | | | | | | | | | | | | | | there were enough problems fixing it that I decided something more drastic needed to be done. This uses the new Puppet::ResourceReference class to canonize what a resource reference looks like and how to retrieve resources via their references. Specifically, it guarantees that resource types are always capitalized, even when they include '::' in them. While many files are modified in this commit, the majority of changes are quite small, and most of the changes are fixing the tests to use capitalized types. As we look at consolidating some of our resource types, we could consolidate the ResourceReference stuff at the same time, but at least the Puppet::Parser::ResourceReference class subclasses the main Puppet::ResourceReference class.
* Fixing the first half of #917 -- the ResourcReferenceLuke Kanies2007-11-281-2/+2
| | | | | | AST code now correctly finds the resource. It's getting lost in the configuration translation, though, so I need to fix that, too.
* Fixing the error message as requested in #893.Luke Kanies2007-11-271-3/+1
|
* Fixing #921, mostly by just deleting the existing test. I hadLuke Kanies2007-11-261-2/+4
| | | | | | already migrated all of the tests into rspec but forgot about these tests -- they were only in the rails/ subdir because people kept not running the parser/ tests after modifying the Rails code.
* Incorporating patch ↵Luke Kanies2007-11-241-89/+75
| | | | | | | | | | 20071030034736-6856b-6004090b3968cdbf7d366a03ee1c44e2160a3fe0.patch from womble, and rewriting and significantly enhancing the unit tests for the Puppet::Parser::Collector class; it should have full coverage now. There are no integration tests for it, so there's still no guarantee that it works at all, but hey, we're a lot better off than we were.
* Adding patch ↵Luke Kanies2007-11-231-1/+1
| | | | 20070913032650-6856b-b1cca1c249415c6076ffcecb9df1525a728457c7.patch from womble -- Fix annoying database deletion error for ParamValue objects.
* Fixing the first part of #787. Not all collections wereLuke Kanies2007-11-201-4/+5
| | | | | | | | being evaluated on the first pass because they were being deleted from the collections list during evaluation, which caused some to get skipped. This commit fixes that problem, which helps in the trivial cases where the collections are in the same scope. I expect it's still broken for more complicated usages.
* Fixing a failing test from my fix for #446 -- I had changedLuke Kanies2007-11-191-6/+5
| | | | | | the behaviour of Resource#override_parameter unintentionally. I've corrected the comments so it's clear why the original behaviour was there.
* Fixing #446. I ended up largely not using porridge's patch,Luke Kanies2007-11-191-21/+34
| | | | | | but only because the code (and my coding style, to some extent) has changed so much in the last few months. Also, added specs.
* Fixing a parser test -- really, just removing testsLuke Kanies2007-11-132-1/+2
| | | | | | | | that belong with the AST classes rather than in the parser. Yeah, these tests need to be rewritten. Committed on an airplane. :)
* Fixing #800 by refactoring how configurations are retrievedLuke Kanies2007-11-121-6/+3
| | | | | | | | | from the server. The real problem was getting all of the validation done before any caching, which required a good bit more refactoring than I expected. In actuality, this commit is relatively small even though it covers many files; most of the changes just make the code clearer or shorter.
* Moving some compile tests to the spec/ directory, andLuke Kanies2007-11-121-5/+14
| | | | | | | | | | | | switching the node scope to no longer be lazy evaluation, just like I switched 'main'. When I made all of these classes and nodes lazy evaluated, I should have decoupled my real goal (using resources to evaluate them) from the idea of lazy-evaluating them, and this basically does that. I also changed the scope heirarchy slightly so that scopes will tend to be below the node scope, altho this was already generally the case.
* Changing the 'main' class to no longer be lazy-evaluated.Luke Kanies2007-11-121-0/+2
| | | | | It was getting evaluated after node classes, which caused even stranger ordering issues.
* Merge commit 'davids-bugfixes/rest/fix-731'Luke Kanies2007-11-081-1/+2
|\
| * fix #731: add exported=true to collect_exportedDavid Schmitt2007-11-081-1/+2
| | | | | | | | this just adds the patch from the bugreport
* | Switching the class resource evaluation to only happenLuke Kanies2007-11-082-5/+10
| | | | | | | | | | when using :include, not (for example) when evaluating node classes.
* | Classes once again get evaluated immediately when theLuke Kanies2007-11-081-0/+1
|/ | | | | | | | | | 'include' function is used, instead of being lazy-evaluated. Previous work caused resources to get created to model these classes, but in the process, I removed the fact that the classes were evaluated immediately. This meant that you couldn't guarantee that a class was evaluated before you went to use its variables.
* Fixing error thrown when the end of the file is encountered unexpectedlyLuke Kanies2007-10-051-4/+6
|
* Adding a :code setting for specifying code to runLuke Kanies2007-10-051-16/+3
| | | | | | | | instead of a manifest, and removing all of the ambiguity around whether an interpreter gets its own file specified or uses the central setting. Most of the changes are around fixing existing tests to use this new system.
* This commit is focused on getting the 'puppet' executableLuke Kanies2007-10-052-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | to work. As a result, it involves a lot of integration-level testing, and a lot of small design changes to make the code actually work. In particular, indirections can now have default termini, so that configurations and facts default to their code terminus Also, I've removed the ability to manually control whether ast nodes are used. I might need to add it back in later, but if so it will be in the form of a global setting, rather than the previous system of passing it through 10 different classes. Instead, the parser detects whether there are AST nodes defined and requires them if so or ignores them if not. About 75 tests are still failing in the main set of tests, but it's going to be a long slog to get them working -- there are significant design issues around them, as most of the failures are a result of tests trying to emulate both the client and server sides of a connection, which normally would have different fact termini but in this case must have the same terminus just because they're in the same process and are global. The next step, then, is to figure that process out, thus finding a way to make this all work.
* Removing the Id tags from all of the filesLuke Kanies2007-10-036-6/+0
|
* Fixed #854.Michael V. O'Brien2007-10-031-3/+1
|
* Fixing #814 -- when files are missing, the exceptions shouldLuke Kanies2007-10-031-8/+11
| | | | now be more reasonable.
* Merge branch 'indirection' of git://reductivelabs.com/puppet-lukeLuke Kanies2007-09-252-225/+1
|\
| * Renaming the 'Puppet::Util::Config' class toLuke Kanies2007-09-221-1/+1
| | | | | | | | | | | | | | '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".
| * Removing the completely obsolete passwd2puppet and the obsolete component.rbLuke Kanies2007-09-131-224/+0
| |
* | Removed TYPE token, replacing it with CLASSREF token, in the grammar and ↵Michael V. O'Brien2007-09-103-576/+553
| | | | | | | | lexer. Updated CLASSREF token regex in the lexer.
* | Fixed #774, which fixed fully qualified collection statementsMichael V. O'Brien2007-09-102-630/+624
|/
* *Finally* fixing the tests that were failing around users and groups. The ↵Luke Kanies2007-09-071-4/+0
| | | | problem was that the autoload tests were somehow clearing all loaded classes, including the providers. This is fixed now.
* Fixing some failed tests. Mostly cleanup. Next is to make all of the user ↵Luke Kanies2007-09-072-4/+10
| | | | tests pass again, dammit.
* Fixing #802 -- tags are now applied before parent classes are evaluated, so ↵Luke Kanies2007-09-062-3/+6
| | | | parent classes can use tagged() to test if a node is a member of a subclass.
* Fixing #807. The exception handling should more closely resemble how it ↵Luke Kanies2007-09-061-6/+13
| | | | used to be done.
* Renaming some ast resource classes and files so they make a lot more sense.Luke Kanies2007-09-067-22/+22
|
* Fixing #806. Resources correctly look up their fully qualified definition ↵Luke Kanies2007-09-063-18/+34
| | | | type, just like resource references do, which causes the resource and reference to again agree on the full name of a given defined type.
* Flipped the switch so that compiles now return a Configuration instance ↵Luke Kanies2007-09-041-4/+5
| | | | instead of pre-extracting the configuration.
* Successfully modified all tests and code so that all language tests pass ↵Luke Kanies2007-09-046-65/+38
| | | | 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-0428-509/+101
| | | | 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.
* More refactoring. I have removed a few more extraneous methods from Scope, ↵Luke Kanies2007-09-036-68/+53
| | | | mostly just pointing directly to the compile, and I have begun (but commented out) the move to having resources to model each of the classes and nodes, in addition to the definitions. This will, again, enable a real Configuration object, and it will enable class versioning and similar features.
* Removing the Scope#setresource method, since it was essentially redundant. ↵Luke Kanies2007-09-032-18/+3
| | | | The work is done in either AST::ResourceDef#evaluate or Compile#store_resource.
* Doing a small amount of refactoring, toward being able to use Parser ↵Luke Kanies2007-09-035-90/+92
| | | | resources to evaluate classes and nodes, not just definitions. This will hopefully simplify some of the parsing work, and it will enable the use of a Configuration object that more completely models a configuration.