summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Adding #2477 - puppet can apply provided catalogsLuke Kanies2009-08-025-35/+187
| | | | | | | | | | | | This provides the other half of #2440 - you can compile catalogs into json with puppetmasterd, and now you can take those json catalogs and apply them. This allows you to use whatever mechanism you want to ship the catalogs around. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing problems my Feature refactor causedLuke Kanies2009-08-022-6/+9
| | | | | | | | | The problems were that I wasn't propagating return values sufficiently, such that false values didn't travel enough, and the 'name' attribute was necessary in the private method but wasn't actually passed in. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing ruby warning in definition testLuke Kanies2009-08-021-1/+1
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixed global deprecation error in useradd Unit testsJames Turnbull2009-08-021-3/+0
|
* Adding a test for the Exec typeLuke Kanies2009-08-021-0/+13
| | | | | | | | I thought I'd found a bug, but I couldn't reproduce it. This test was supposed to demonstrate the bug, but is at least good enough to leave in. Signed-off-by: Luke Kanies <luke@madstop.com>
* Speeding a test up through stubbingLuke Kanies2009-08-021-0/+1
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing a small test by stubbing instead of mockingLuke Kanies2009-08-021-2/+1
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing a test broken by the regex featuresLuke Kanies2009-08-021-0/+14
| | | | | | | | Unsetting scope vars was broken, but it was only ever used in testing (and apparently rarely at that), so it wasn't caught. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing tests broken by caching autoload resultsLuke Kanies2009-08-023-10/+3
| | | | | | | | | These tests tried to load something, verified the loads didn't work, and then created the thing to load. This is a bit silly, so I just removed those sections of the tests. Signed-off-by: Luke Kanies <luke@madstop.com>
* Migrating Handler base tests from test/ to spec/Luke Kanies2009-08-022-63/+25
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Migrating Feature tests to specLuke Kanies2009-08-024-110/+145
| | | | | | | | | | This was to fix a failing test/unit test. Test coverage is now a bit better, more maintainable, and I refactored the code just slightly to make it a bit cleaner. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing cron test to match new behaviourLuke Kanies2009-08-021-1/+1
| | | | | | | 7 was added as a valid weekday in #2293, and this test just corrects that. Signed-off-by: Luke Kanies <luke@madstop.com>
* Migrating tests to spec and removing an obsolete testLuke Kanies2009-08-022-70/+19
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Logging the configuration version we're applyingLuke Kanies2009-08-011-0/+2
| | | | | | | This is just an additional info log in the transaction, and is only done if the version is non-nil. Signed-off-by: Luke Kanies <luke@madstop.com>
* Configuration version information is now in logsLuke Kanies2009-08-014-1/+53
| | | | | | | | | | The log instances have file, line, and config version information, although it's not currently printed. It's available in the reports, and you can strip it out with your own processors. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding support for an external catalog versionLuke Kanies2009-08-016-2/+68
| | | | | | | | This allows you to specify a command used to determine the catalog version. Also added an integration test to verify the version cascades. Signed-off-by: Luke Kanies <luke@madstop.com>
* Cleaning up duplication in another test fileLuke Kanies2009-08-011-31/+28
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Removing duplication in the test structureLuke Kanies2009-08-011-10/+10
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Simplified Rakefile and moved tasks to tasks/rake directoryaJames Turnbull2009-08-027-81/+93
|
* Implement node matching with regexesBrice Figureau2009-08-0110-584/+725
| | | | | | | This patch enhance AST::HostName to support regexes, and modifies the parser to allow regex to be used as node name. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>]
* Make sure node are referenced by their namesBrice Figureau2009-08-0110-597/+792
| | | | | | | | | This patch uses the unused AST::HostName as the only way to reference a node in the AST nodes array. The AST::HostName respect the hash properties of the underlying string, to keep the O(1) hash properties. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Enhance selector and case statements to match with regexpBrice Figureau2009-08-0111-618/+972
| | | | | | | | | | | | | | | | | | | | | | | | | The case and selector statements define ephemeral vars, like 'if'. Usage: case statement: $var = "foobar" case $var { "foo": { notify { "got a foo": } } /(.*)bar$/: { notify{ "hey we got a $1": } } } and for selector: $val = $test ? { /^match.*$/ => "matched", default => "default" } Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #2033 - Allow regexp in if expressionBrice Figureau2009-08-0111-643/+836
| | | | | | | | | | | | | | | | | | | This changeset introduces regexp in if expression with the use of the =~ (match) and !~ (not match) operator. Usage: if $uname =~ /Linux|Debian/ { ... } Moreover this patch creates ephemeral variables ($0 to $9) in the current scope which contains the regex captures: if $uname =~ /(Linux|Debian)/ { notice("this is a $1 system") } Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Add AST::Regex, an AST leaf node representing a regexBrice Figureau2009-08-014-39/+213
| | | | | | Add a regex rule (unused for the moment) to the parser. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Add regexes and regex match operators to the parserBrice Figureau2009-08-012-775/+773
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Add regex, match and not match token to the lexerBrice Figureau2009-08-012-0/+21
| | | | | | | | | | The lexer recognizes regex delimited by / as in: /^$/ The match operator is defined by =~ The not match operator is defined by !~ Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Allow variable $0 to $9 to be interpolated, if ephemeralBrice Figureau2009-08-012-2/+37
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Implement ephemeral scope variablesBrice Figureau2009-08-014-28/+107
| | | | | | | | | | Those variables have been created to be short lived and used mainly to define temporary special variables. They do not persist after a call to unset_ephemeral_var. Also Scope#set_ephemeral_from can be used to promote a regexp MatchData to ephemeral values. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Signed-off-by: Eric Sorenson <ahpook@gmail.com>Eric Sorenson2009-08-013-3/+3
| | | | | | | | | Apologies if this violates the no-trivial-patches rule. I am getting used to git and this seemed like a harmless place to start. Documentation fix for help text, configuration reference URL is 404 now. Updated to equivalent page on wiki, fixes #2466 Signed-off-by: Eric Sorenson <ahpook@gmail.com>
* Modifying the REST client error to make server errors more clearLuke Kanies2009-08-011-1/+1
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixes #2472. Load Facter facts when ralsh is invoked, plus test.Nigel Kersten2009-08-012-0/+7
|
* Update CHANGELOG.gitJames Turnbull2009-07-311-0/+18615
|
* Fixed ci_spec task for RubyGems 1.3.5James Turnbull2009-07-311-2/+2
|
* Fixes #2461. Provide new and old code paths for macosx_productversion_major ↵Nigel Kersten2009-07-311-1/+12
| | | | with deprecation warning
* Fixing typo in two tests which caused them to always passMarkus Roberts2009-07-311-2/+2
|
* Fixing #2440 - catalogs can now be compiled on demandLuke Kanies2009-07-312-1/+90
| | | | | | | | | This uses the locally cached yaml facts and prints the catalog in json. It's meant to be used one-time, but you have to use puppetmasterd since we assume it's the executable correctly configured for compilation. Signed-off-by: Luke Kanies <luke@madstop.com>
* Exiting from app failures instead of raisingLuke Kanies2009-07-312-12/+26
| | | | | | | This protects the user from seeing stack traces in normal situations. It makes sense here because this is explicitly for user interactions. Signed-off-by: Luke Kanies <luke@madstop.com>
* Minimal patch to fix #2290 (/tmp permissions)Markus Roberts2009-07-311-0/+4
| | | | | | | | | | | | | | | | | This patch rectifies the specified problem by resetting the permissions to 1777 after the offending tests have run. I am providing it for testing but suspect there may be a deeper bug hiding behind this one--specifically, it isn't clear to me that an analogous problem could not occur in production use (which this patch to the spec would not fix). This patch also fixes the specific test isolation failure which was causing ticket #2290; if spec/unit/util/storage.rb was run by "rake spec" before spec/integration/network/server/webrick.rb without any intervening tests which did a Puppet.settings.clear, the the webrick test would change the permissions on /tmp. Signed-off-by: Markus Roberts <Markus@reality.com>
* Fix #2467 - rack: suggest putting puppet/lib at beginning of RUBYLIB search pathMarc Fournier2009-07-301-1/+1
| | | | | | | | | | If you happen to already have puppet code somewhere in your ruby path, you might get unexpected behaviour when trying to run puppetmaster with passenger. Suggesting that the path to puppet/lib gets prepended instead of appended to RUBYLIB could save time to some. Signed-off-by: Marc Fournier <marc.fournier@camptocamp.com>
* Fix #2465 - Default auth information is confusing with no auth.confBrice Figureau2009-07-301-1/+1
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #2459 - puppetdoc added namespace classes as RDoc modules instead of classesBrice Figureau2009-07-302-1/+9
| | | | | | | | | | | | | Puppetdoc while parsing a class name creates intermediate RDoc classes to form a hierarchy. Due to a coding error, those intermediate classes were created as RDoc modules. Later, when puppetdoc was parsing the definition of one of this class, it wasn't finding it in RDoc list of classes (since it was recorded as a module). Puppetdoc was then creating documentation for two objects of the same name. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #2429 - vim: class/define/node should only be followed by whitespaceMarc Fournier2009-07-291-1/+1
| | | | | | Thanks to Charles Duffy for noticing this and providing this patch. Signed-off-by: Marc Fournier <marc.fournier@camptocamp.com>
* Fix #2448 - fix the broken runit provider and testsBrice Figureau2009-07-292-1/+23
| | | | | | | The runit provider was broken when the daemontools provider was enhanced.This patch aims to fix this. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fixed #2405 - Mount parameter "dump" doesn't accept all valid values on FreeBSDJames Turnbull2009-07-291-2/+7
|
* Fixes #2362. Do not validate users/groups when supplied with numeric uid/gidsNigel Kersten2009-07-294-0/+22
|
* Fix #2454 - Definition named after a module don't show in puppetdocBrice Figureau2009-07-281-2/+0
| | | | | | | | RDoc#find_local_symbol can return a module. So if you have a defition of the same name as the module in which it is defined we weren't producing documentation for it. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #2453 - puppetdoc mixes long class names that look alikeBrice Figureau2009-07-281-2/+14
| | | | | | | | | | The issue is that RDoc (the engine producing the documentation) is buggy: With a class named: A::C and a class named: D::A::E Then RDoc was attaching E under the root ::A and not D::A. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #2422 & #2433 - make sure puppetdoc transform AST::Leaf boolean correctlyBrice Figureau2009-07-259-25/+84
| | | | | | | | | | AST nodes don't have a valid to_s that is producing a correct representation of said node. This patch adds some of the AST node to_s to produce correct values that can be used verbatim by puppetdoc to render the documentation. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fixing #2296 - overlapping recursions work againLuke Kanies2009-07-255-108/+52
| | | | | | | | | | | | This fixes the behaviour when you have file recursions that overlap - we again correctly use the most specific information. It's still a bit expensive when you do this, but at least it behaves correctly, and it should be a rare circumstance. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing mocks to remove warningsLuke Kanies2009-07-251-18/+18
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>