summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
| * Fixing #1447 -- Replacing Puppet::PackageError with Puppet::Error.Luke Kanies2008-08-122-4/+4
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
| * Added tests for TemplateWrapper's use of Scope#to_hash.Luke Kanies2008-08-091-11/+10
| | | | | | | | | | | | We should deprecate the method_missing stuff in 0.25. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Fixed #1457 - removed confine warningJames Turnbull2008-08-061-1/+1
| |
| * Fixed #1441 - Updated console coloursJames Turnbull2008-08-011-14/+22
| |
| * Expose all puppet variables as instance member variables of the template ↵Daniel Pittman2008-08-012-13/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wrapper. This helps resolve redmine #1427, by providing a safe mechanism to access variables. * Implement Puppet::Parser::Scope#to_hash, which returns a hash containing all the variable bindings in the current and, optionally, parent scope. * Use that to set instance member variables into Puppet::Parser::Templatewrapper * Report the time taken for variable binding at debug level, to help identify any performance regression that is encountered in the real world. * Rename the @scope and @file members of the template wrapper, to avoid clashing with a scope variable exposed within puppet. Signed-off-by: Daniel Pittman <daniel@rimspace.net> (cherry picked from commit ba220b41e4f509f2632e2664d332e49b20a70ea7)
| * Ensure that we consistently use either string #{} interpolation or String.%Daniel Pittman2008-08-016-16/+23
| | | | | | | | | | | | | | interpolation, not both, to avoid issues where a #{} interpolated value contains a % character. Signed-off-by: Daniel Pittman <daniel@rimspace.net>
| * Added a search method to the YAML indirector.AJ Christensen2008-08-011-1/+10
| | | | | | | | This performs a glob on the YAML directory, and instances everything it finds
| * Fixes #1417 - whitespace in ssh_auth_key providerJames Turnbull2008-07-301-1/+1
| |
| * Feature #1241 : Improve performance of group lookupsJames Turnbull2008-07-291-14/+67
| |
| * Bug #1448: Puppet CA incorrectly writes out all certs to inventory .txt on ↵Nigel Kersten2008-07-291-2/+3
| | | | | | | | each certificate signing
| * Incremented versionsJames Turnbull2008-07-221-1/+1
| |
| * Fixes #1445 and #1426James Turnbull2008-07-221-1/+6
| |
* | Adding 'require' statements as necessary for Puppet::SSL to work.Luke Kanies2008-08-072-0/+3
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing the SSL::Host#waitforcert method.Luke Kanies2008-08-071-10/+26
| | | | | | | | | | | | | | It now works the way puppetd needs it to, rather than the way I thought it would need to work. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding logging when files are removed.Luke Kanies2008-08-072-0/+2
| | | | | | | | | | | | This is currently mostly useful for puppetca. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Removing now-obsolete the wait-for-cert module.Luke Kanies2008-08-071-77/+0
| | | | | | | | | | | | This functionality has moved into the SSL::Host class. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Certificates now work over REST.Luke Kanies2008-08-075-7/+31
| | | | | | | | | | | | | | | | | | All of the format work is done, they all support plaintext successfully, and I've got integration tests that demonstrate that it actually works. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Caching the SSL store for the SSL Host.Luke Kanies2008-08-071-8/+11
| | | | | | | | | | | | | | | | | | We were creating a new SSL store every time, which caused problems during testing -- it created an infinite loop when trying to create the store while looking up the CRL. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Enhancing formatting errors with class and format.Luke Kanies2008-08-041-4/+4
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Making all certificates only support the plaintext format.Luke Kanies2008-08-044-0/+24
| | | | | | | | | | | | | | None of them actually support yaml or marshal by default, and plaintext is easiest anyway. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding wait_for_cert functionality to the ssl host class.Luke Kanies2008-08-041-0/+19
| | | | | | | | | | | | This essentially deprecates the CertHandler module. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding a plaintext network format.Luke Kanies2008-08-041-2/+22
| | | | | | | | | | | | Certs don't seem to support yaml, for some reason. Signed-off-by: Luke Kanies <luke@madstop.com>
* | lazy load latest package definitions with yumhelper 2.2Marcel Haerry2008-08-011-17/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have to admit that the version 2.1 one of this patch was not good tested from my side and it simply didn't work. I'm very sorry for that. However I did now extensive (manual) testing and it works the way it should for me. I can confirm that yumhelper isn't called if there is no latest ensure and it is called if there is at least one. So correct commit message: After discussion on the list, this is the new version for lazy loading yum latest package versions. It is implemented mainly in the way that Luke proposed. However it stores the latest informations in the variable latest_info so the latest method didn't get too hackish and could nearly be left like it was before. + fixed copy&paste regression, so :latest_info is not anymore on the class side + fixed package iteration and ensure usage.
* | Correctly handling when REST searches return nothing.Luke Kanies2008-07-302-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We return a 404, which the client can correctly handle. That wasn't the actual problem causing failing tests, of course -- the problem was that one side of our stub was autodetecting marshal, and the other side was forcing yaml, which strangely didn't work. It was only happening with searching, though, not finding et al. The 'search returning nil' problem was a bit of a red herring but needed to be fixed, too. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Removing an obsolete method from the rest indirectorLuke Kanies2008-07-301-4/+0
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | The REST formats are now fully functional, with yaml and marshal support.Luke Kanies2008-07-302-14/+52
| | | | | | | | | | | | | | | | This is the last of the REST plumbing. The only flaw right now is that the formats are managed by name rather than by mimetype, which I'll fix next. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding some support for case insensivity in format names.Luke Kanies2008-07-302-5/+9
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Moving validation from FormatHandler to Format.Luke Kanies2008-07-302-9/+2
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Moving functionality out of the FormatHandler into the Format class.Luke Kanies2008-07-302-17/+66
| | | | | | | | | | | | | | The Format class now takes care of deciding whether it's supported, and it also does method dispatch to classes and instances as necessary. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Searching again works over REST, including full content-type translation.Luke Kanies2008-07-292-5/+9
| | | | | | | | | | | | | | | | | | The format management is a bit clunky right now, though, so I need to fix how they're managed. Some of these tests fail, but 99% of the remaining work is in other classes so I wanted this as a discrete commit. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding rudimentary support for directly managing formats.Luke Kanies2008-07-293-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | We have a simple Format class, and the FormatHandler module is responsible for managing its instances, including providing access by mime type or name. It will soon replace some of the testing functionality in the FormatHandler module, but for now, it's just there as a name => mimetype converter, which makes it seem a lot like overkill. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding support for rendering and converting multiple instances.Luke Kanies2008-07-291-0/+16
| | | | | | | | | | | | | | It's a touch hackish in terms of design, but it should work, and it's the last major piece of plumbing necessary for REST support. Signed-off-by: Luke Kanies <luke@madstop.com>
* | All error and format handling works over REST except searching.Luke Kanies2008-07-295-17/+46
| | | | | | | | | | | | | | | | | | Searching operates on multiple instances, and I have not yet figured out how we should handle converting multiple instances to a given format -- we can't use the instance method (e.g., to_yaml), because it would be on Array instead of the class we're operating on. That would work for yaml, but not, for instance, for xml.
* | Drastically simplifying the REST implementation tests.Luke Kanies2008-07-292-10/+25
| | | | | | | | | | | | | | | | | | Nearly all of the tests are now written just once, in the Handler module. The Mongrel and Webrick tests just validate that they provide the interface and how they do so. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Removing an apparently-obsolete hook from the handlerLuke Kanies2008-07-291-4/+0
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding explicit tests for the HTTP::Handler module.Luke Kanies2008-07-291-23/+67
| | | | | | | | | | | | | | | | | | | | | | This will help to remove a ton of duplication among the Mongrel and Webrick tests, and it also helps make the interface between the servers and the handler more explicit, and thus more maintainable. I still need to switch all of the servers over. Signed-off-by: Luke Kanies <luke@madstop.com>
* | The REST terminus now uses the content-type and http result codes.Luke Kanies2008-07-293-38/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Things are currently broken -- this is a checkpoint commit so that it's safe to make mistakes and will probably be removed. Signed-off-by: Luke Kanies <luke@madstop.com> The REST terminus now completely does error handling and serialization. The Integration tests are still completely broken. Signed-off-by: Luke Kanies <luke@madstop.com> The Mongrel and Webrick rest handlers no longer yaml-encode exceptions. They just store the exceptions in plain text in the message body. They also set the status to 400, rather than 404. Signed-off-by: Luke Kanies <luke@madstop.com>
* | The REST terminus now provides an Accept header with supported formats.Luke Kanies2008-07-291-3/+8
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Using the FormatHandler in indirected classes automatically.Luke Kanies2008-07-292-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com> Changing the FormatHandler#render method to render_to Signed-off-by: Luke Kanies <luke@madstop.com> Adding the ability for the format handler to query supported formats. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding a FormatHandler module for managing format conversions.Luke Kanies2008-07-291-0/+33
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Merge branch '0.24.x' into mergingLuke Kanies2008-07-2917-90/+122
|\ \ | | | | | | | | | | | | | | | Conflicts: test/ral/type/filesources.rb
| * | Fixes #1445 and #1426James Turnbull2008-07-221-1/+5
| |/
| * Fixing the renaming code to skip missing directories.Luke Kanies2008-07-211-1/+4
| | | | | | | | | | | | | | | | I couldn't get this to fail in a targeted regression test, but if it's not working, it causes a failure in the webrick tests. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Fixing a cert test to pass on Darwin.Luke Kanies2008-07-211-0/+1
| | | | | | | | | | | | | | Darwin has a case-insensitive FS, so the test was failing because it was specifically testing case sensitivity. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Revert "Merging fsweetser's selinux patch against 0.24.4"James Turnbull2008-07-206-366/+0
| | | | | | | | This reverts commit f16da4250c16aeab932a81a349df059c69d7ee23.
| * Merging fsweetser's selinux patch against 0.24.4Brett Lentz2008-07-206-0/+366
| |
| * Fixed all of the fileserving termini so they use indirection requests.Luke Kanies2008-07-184-33/+33
| | | | | | | | | | | | | | | | This looks like a much larger commit than it is -- it doesn't change any behaviour at all, it just adds some integration tests (which expose the problem) and then switches from an ad-hoc api to a request-based api. Signed-off-by: Luke Kanies <luke@madstop.com>
| * You can now select the encoding format when transferring the catalog,Luke Kanies2008-07-183-12/+22
| | | | | | | | | | | | | | | | | | | | with 'yaml' still being the default but 'marshal' being an option. This is because testing has shown drastic performance differences between the two, with up to 70% of compile time being spent in YAML code. Use the 'catalog_format' setting to choose your format, and the setting must be set on the client. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Revert "Fixed #1201 - all external node attributes are converted to strings."Luke Kanies2008-07-181-7/+0
| | | | | | | | | | | | | | This reverts commit ac7f59618a80b6a4aac777f6184e7fa6a0614079. The reason for this revert is that the problem never really existed; Ruby's true and false are always used unless you quote them.
| * The mongrel-related tests now run without mongrel.Luke Kanies2008-07-171-6/+8
| | | | | | | | | | | | | | | | | | | | | | Here were the main changes necessary: * Fixed the class loader so it only loads mongrel if it's available. * Fixed the test runner to skip example groups contained in non-runnable example groups. * Fixed the Mongrel tests to use quoted class names instead of constants, since the constants themselves would be absent. Signed-off-by: Luke Kanies <luke@madstop.com>