summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | (#7269) Fix error reporting for bad render formats...Daniel Pittman2011-04-282-81/+91
|/ / | | | | | | | | | | | | | | The previous change was incomplete, and could result in internal errors with the wrong combination of inputs. Now we have more testing, and a logically consistent model, so all works. Reviewed-By: Max Martin <max@puppetlabs.com>
* | Merge branch 'feature/2.7.x/7160-support-json-externally' into 2.7.xDaniel Pittman2011-04-282-8/+32
|\ \
| * | (#7269) Better error reporting for bad render formats.Daniel Pittman2011-04-282-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we would try and send `nil` to a class to render an unsupported format, which was bad. Worse, we would only discover this *after* the fact, when we tried to render, so the entire action had run and the result was lost to the world. Instead, validate the parameter early and fail during option parsing. This has less nice error reporting than we can get handling it later[1], but it gets us a much better overall set of behaviour. [1] puppet/application.rb will print and exit, rather than raising, when the option handler fails; this will improve when we unify face and application options properly. Reviewed-By: Max Martin <max@puppetlabs.com>
| * | (#7160) Support 'json' as a rendering method for CLI faces.Daniel Pittman2011-04-282-6/+17
|/ / | | | | | | | | | | | | | | | | | | | | | | We already had some specialized support for rendering JSON using the PSON libraries; this just extends that to recognize the request on the command line for json to be identical to a request for pson. Theoretically we should also support the format in our network rendering code, but that is a much bigger change, in established code, that has more chance of destabilizing the whole release. Reviewed-By: Max Martin <max@puppetlabs.com>
* | Merge branch 'feature/2.7.x/6962-finish-documentation-api-for-faces' into 2.7.xDaniel Pittman2011-04-2733-81/+698
|\ \ | |/ |/|
| * (#6962) Add integration tests on Face documentation.Daniel Pittman2011-04-275-1/+62
| | | | | | | | | | | | | | | | | | | | We now run all the faces, and their actions, as well as global help through the wringer in this test: this way we can be confident that we have, at least, the ability to generate the help without a user-visible failure. We also check that we have set copyright and license terms in our own faces. Theoretically this might fail if the end user has extra faces on LOAD_PATH, but my hope is that we won't hit that...
| * (#6962) Finish documentation API on Face options.Daniel Pittman2011-04-2710-15/+31
| | | | | | | | | | | | | | This extends the last of the documentation support, down into options, so they can be described as expected. In the process we split out the modular docs API into a full and short version options only want short docs, but the behaviours are identical to the full version.
| * (#6962) Give copyright and license for all faces.Daniel Pittman2011-04-2617-0/+51
| | | | | | | | | | Now we have the capability, mark all our faces copyright the company and under the Apache 2 license, which indeed they are.
| * (#6962) Fill out documentation on Faces and ActionsDaniel Pittman2011-04-265-11/+24
| | | | | | | | | | | | This uses the documentation we had written, wiring it into the existing faces and actions. This helps fill out the need to document these things before they ship.
| * (#6962) Move documentation support into a module.Daniel Pittman2011-04-265-184/+255
| | | | | | | | | | | | Given that we have identical documentation behaviour in the face and action code, it should properly be written once. So, move it into a module, extend the other classes with it, and have done.
| * (#6962) Extend documentation API for Faces.Daniel Pittman2011-04-265-28/+433
| | | | | | | | | | | | This adds the remaining documentation mechanisms to the Face instances, allowing them to build and report correct documentation, licensing and ownership for the help face to build on.
* | Merge branch 'tickets/2.7.x/7251' into 2.7.xPieter van de Bruggen2011-04-263-8/+6
|\ \
| * | (#7251) Let exceptions raised in decorators rise.Pieter van de Bruggen2011-04-263-8/+6
|/ / | | | | | | | | | | This allows users to write before_action advice that does basic option validation very easily. Reviewed-By: Daniel Pittman
* | Merge branch 'tickets/2.7.x/7249' into 2.7.xPieter van de Bruggen2011-04-261-14/+14
|\ \
| * | (#7249) Publicize ActionBuilder DSL methods.Pieter van de Bruggen2011-04-261-14/+14
|/ / | | | | | | | | | | | | | | This change permits users to call functions with a reference to `self` that can augment the in-progress action declaration, which can be helpful in some more involved cases. Reviewed-By: Max Martin Reviewed-By: Daniel Pittman
* | add test for ticket 7101Dominic Maraglia2011-04-261-0/+25
| |
* | Merge branch 'ticket/2.7.x/7101-template-compilation' into 2.7.xMax Martin2011-04-261-1/+1
|\ \ | |/ |/| | | | | * ticket/2.7.x/7101-template-compilation: (#7101) Fix template error messages in Ruby 1.8.5
| * (#7101) Fix template error messages in Ruby 1.8.5Max Martin2011-04-261-1/+1
|/ | | | | | | | | | lib/puppet/parser/templatewrapper.rb#script_line was calling .first on a String object, which in Ruby > 1.8.5 will return the entire string, but in 1.8.5 will cause an exception. This change (proposed by Markus Roberts) removes the call to .first and adds a condition for when the template error involves the file not being found. Reviewed-by: Jesse Wolfe
* Merge branch 'ticket/2.7.x/7137-spurious-warnings' into 2.7.xMax Martin2011-04-251-2/+0
|\ | | | | | | | | * ticket/2.7.x/7137-spurious-warnings: (#7137) Get rid of spurious info messages in useradd
| * (#7137) Get rid of spurious info messages in useraddMax Martin2011-04-251-2/+0
|/ | | | | | | | | | | | | Usage of the useradd provider was leading to spurious log messages of this form: info: /User[nigel]: Provider useradd does not support features manages_aix_lam; not managing attribute ia_load_module This was due to the ia_load_module parameter requiring manages_aix_lam and additionally having a defaultto value of "compat." Paired-with: Matt Robinson <matt@puppetlabs.com>
* Fix test ticket_6928_puppet_master_parse_failsDominic Maraglia2011-04-251-7/+4
| | | | Output for error conditions changed causing a regex to fail
* maint: add the 'to', 'not_to', and 'to_not' aliases to rspec...Daniel Pittman2011-04-241-0/+12
| | | | | Specifically, add them if they are not already added by rspec itself, which means that we can use them without blowing up older installations.
* Merge branch 'feature/2.7.x/7157-automatic-non-zero-exit-codes' into 2.7.xDaniel Pittman2011-04-2236-203/+234
|\
| * (#7157) Return a non-zero exit code on face failure.Daniel Pittman2011-04-223-12/+79
| | | | | | | | | | | | | | | | When a face or action fails we should exit non-zero on the CLI to signal this to our caller. "Fails" is defined as "raises an exception"; we don't treat any return value as a significant failure. Reviewed-By: Jesse Wolf <jesse@puppetlabs.com>
| * maint: use the exit_with helper everywhere...Daniel Pittman2011-04-2218-190/+90
| | | | | | | | | | | | | | Now we have the exit_with matcher, we should use it everywhere that we previously stubbed, expected, or caught the exit status in an ad-hoc way. Reviewed-By: Jesse Wolf <jesse@puppetlabs.com>
| * maint: add an "exit was called" matcher for rspec.Daniel Pittman2011-04-221-0/+22
| | | | | | | | | | | | | | | | | | We have a bunch of places that want to test if exit was called in a block of code or not, which we did in a whole pile of ad-hoc ways. Instead, better to have a custom matcher that tests specifically for the correct exit exception being thrown, and the right error code in it. Reviewed-By: Jesse Wolf <jesse@puppetlabs.com>
| * maint: clean up test headers on face spec files.Daniel Pittman2011-04-2215-1/+43
|/ | | | | | | | A whole pile of spec files for faces were not pulling in the regular spec_helper, or the puppet/face library before they used it. This worked fine by coincidence when they ran together, but blew up if run separately. Reviewed-By: Jesse Wolf <jesse@puppetlabs.com>
* Merge branch 'ticket/2.7.x/7080-reverts' into 2.7.xMax Martin2011-04-216-266/+16
|\ | | | | | | | | | | | | * ticket/2.7.x/7080-reverts: Revert "Fixing Facts pson methods more resilient" Revert "(7080) Adding json support to Indirector Request" Revert "Adding json support to Puppet::Node"
| * Revert "Fixing Facts pson methods more resilient"Max Martin2011-04-212-36/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 07a7a68a25eb9b21189751c27f90f972224ea533. The JSON patch series has caused problems with the inventory service, and further discussion is needed to decide how to serialize objects to PSON with regards to future compatibility. Conflicts: spec/unit/node/facts_spec.rb Paired-with:Matt Robinson <matt@puppetlabs.com>
| * Revert "(7080) Adding json support to Indirector Request"Max Martin2011-04-212-144/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e0615cbc1eea67ef8caf4edbc8b7b3d3ce618f4d. The JSON patch series has caused problems with the inventory service, and further discussion is needed to decide how to serialize objects to PSON with regards to future compatibility. Conflicts: spec/unit/indirector/request_spec.rb Paired-with:Matt Robinson <matt@puppetlabs.com>
| * Revert "Adding json support to Puppet::Node"Max Martin2011-04-212-86/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d3c94e62386ec03617015f6e6269b1de805954ea. The JSON patch series has caused problems with the inventory service, and further discussion is needed to decide how to serialize objects to PSON with regards to future compatibility. Conflicts (Manually resolved): spec/unit/node_spec.rb Paired-with: Matt Robinson <matt@puppetlabs.com>
* | Merge branch 'ticket/2.7.x/7084' into 2.7.xJesse Wolfe2011-04-215-18/+41
|\ \
| * | Fix #7084 Make the log messages produced by whits less confusingJesse Wolfe2011-04-215-18/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the logging behavior of Whits so that instead of talking about whits directly, we refer to the Class, Stage, or recursive resource that they are sentinals for. In the case where a "completion" Whit is notified by a resource, getting a notification at all is counterinutitive, so I've changed the output to a "debug"-priority message that describes what's happening. Reviewed-By: Nick Lewis <nick@puppetlabs.com>
* | | Merge branch ↵Daniel Pittman2011-04-212-3/+24
|\ \ \ | | | | | | | | | | | | 'bug/2.7.x/7121-the-'configurer'-face-should-download-plugins-and-send-reports' into 2.7.x
| * | | (#7121) Download plugins and upload reports in secret agent!Daniel Pittman2011-04-212-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a plugin face, able to download plugins, and wires both that and the report face in to upload the result of the catalog run. This fills out the standard, boring agent behaviour and makes this a semi-credible replacement. Reviewed-By: Max Martin <max@puppetlabs.com>
* | | | maint: fix a race in catalog compilation versioning.Daniel Pittman2011-04-211-0/+7
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation has a whole pile of time dependencies in our comparisons, we had a whole pile of races across the code. We could try and fix the comparisons to work better, but that is actually harder than it sounds thanks to the architecture. Instead, freeze time for each test, ensuring that we consistently get the result expected.
* | | Merge remote-tracking branch ↵Daniel Pittman2011-04-2118-17/+67
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'remotes/lak/tickets/next/7118-summaries_for_all_faces' into 2.7.x Fix conflicts due to version drift in: lib/puppet/face/certificate.rb lib/puppet/face/facts.rb lib/puppet/face/node.rb lib/puppet/face/secret_agent.rb spec/lib/puppet/face/basetest.rb spec/unit/face/help_spec.rb Reviewed-By: Markus Roberts <markus@puppetlabs.com>
| * | | (7118) Adding summaries for all facesLuke Kanies2011-04-1418-18/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's usually just a one-liner, but when I saw an obvious opportunity for longer docs, I've added a @longdocs variable that can be converted to longer forms when ready. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* | | | Merge branch 'feature/2.7.x/7181-rename-configurer-face' into 2.7.xDaniel Pittman2011-04-214-9/+7
|\ \ \ \ | |_|_|/ |/| | |
| * | | (#7181) Rename configurer face to secret_agent.Daniel Pittman2011-04-214-9/+7
|/ / / | | | | | | | | | | | | | | | | | | | | | This is a much more useful public name, especially given the code is aimed to eventually replace the agent entirely. Until then this is pleasant enough to talk about. Reviewed-By: Nick Lewis <nick@puppetlabs.com>
* | | Merge branch 'bug/2.7.x/6928-backport-symbol-to_proc' into 2.7.xDaniel Pittman2011-04-211-6/+4
|\ \ \
| * | | (#6928) Don't blow up when the method is undefined...Daniel Pittman2011-04-211-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | Use the same model for testing instance methods as the rest of the code. Reviewed-By: Max Martin <max@puppetlabs.com>
* | | | Merge branch 'bug/2.7.x/6928-backport-symbol-to_proc' into 2.7.xDaniel Pittman2011-04-211-0/+9
|\| | |
| * | | (#6928) backport Symbol#to_proc for Ruby < 1.8.7Daniel Pittman2011-04-211-0/+9
|/ / / | | | | | | | | | | | | | | | | | | | | | We use the &:foo symbol-to-proc syntax in some of our code, so to avoid problems on Ruby earlier than 1.8.7 we should backport the support in our monkey-patch file. Reviewed-By: Max Martin <max@puppetlabs.com>
* | | Merge branch ↵Daniel Pittman2011-04-217-75/+125
|\ \ \ | | | | | | | | | | | | 'feature/2.7.x/7183-implement-invisible-glob-version-matching-for-faces' into 2.7.x
| * | | (#7183) Implement "invisible glob" version matching for facesDaniel Pittman2011-04-215-47/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Invisible glob", or "prefix", version matching means that when you specify a version string to use you can specify as little as one version number out of the semantic versioning spec. Matching is done on the prefix; an omitted number is treated as "anything" in that slot, and we return the highest matching versioned face by that spec. For example, given the set of versions: 1.0.0, 1.0.1, 1.1.0, 1.1.1, 2.0.0 The following would be matched: input matched 1 1.1.1 1.0 1.0.1 1.0.1 1.0.1 1.0.2 fail - no match 1.1 1.1.1 1.1.1 1.1.1 1.2 fail - no match
| * | | maint: better disabling of Signal#trap in our tests.Daniel Pittman2011-04-212-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We tried to stub out the trap method on signal to stop our application level signal handlers getting in the way, but it kept not sticking. Now, instead, we just stub it out globally at the module level in our spec helper. Less fun, but more effective. Until rspec starts installing a signal handler, at least. :)
| * | | maint: more robust listing of valid faces.Daniel Pittman2011-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to treat anything with a top level key in the faces hash as a valid face; it makes more sense to filter that only to things that have at least one implementation. Previously we had to be super-careful not to accidentally touch the top level for an invalid face, which set us up for future failure when someone wasn't careful enough; now we can cope with that. Paired-With: Max Martin <max@puppetlabs.com>
| * | | maint: clean up testing code a fraction...Daniel Pittman2011-04-201-22/+10
| | | | | | | | | | | | | | | | | | | | This rewrites a block of identical tests down to a little table, then applies the test over that.
| * | | maint: better error report for a missing version of a face.Daniel Pittman2011-04-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We would report this: Could not find version 1.0.0 of Puppet::Face[:version_matching, "2.0.0"] That is not actually so helpful, not least because people wonder why it reports a version number they didn't ask for. Instead, we just report the requested name now.