summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | | * | | | | | | (#7012) Split plumbing into Puppet::InterfaceDaniel Pittman2011-04-0725-270/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This splits out the plumbing into the Puppet::Interface namespace, and uses Puppet::Faces for all the public-facing code. The fault line is "what you care about if you are using or writing a face", which is public, against "what you care about to enable either of those two", which is the plumbing.
| | | * | | | | | | (#7012) Update references in code to use face(s)Daniel Pittman2011-04-0756-398/+398
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The codebase is now using the new name, faces, uniformly to reference the objects contained. All tests pass.
| | | * | | | | | | (#7012) global rename of strings to faces.Daniel Pittman2011-04-0749-0/+0
| | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This just changes filenames and directories; files are exact copies rather than having additional modifications to make clearer each step of this process. This does leave a currently broken build. :/
| | * | | | | | | Merge branch 'bug/master/7006-missing-require'Daniel Pittman2011-04-071-0/+2
| | |\ \ \ \ \ \ \
| | | * | | | | | | (#7006) Add a missing require to puppet/string/option.rbDaniel Pittman2011-04-071-0/+2
| | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was causing failure in some cases, based on load order; we should always satisfy our external dependencies. Reviewed-By: Dan Bode <dan@puppetlabs.com>
| | * | | | | | | Merge branch ↵Daniel Pittman2011-04-067-25/+93
| | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'bug/master/6972-setting-CA-location-for-cert-string-no-longer-works'
| | | * | | | | | | (#6983) mark test pending until string is fixed...Daniel Pittman2011-04-062-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The certificate string is broken, and won't allow you to either search or save certificates. Given that, mark the test on it broken until that is completed. Reviewed-By: Dan Bode <dan@puppetlabs.com>
| | | * | | | | | | (#6972) Handle ca-location in the certificate string.Daniel Pittman2011-04-064-21/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ports the existing certificate location configuration to be a string option, and then uses that to change the configuration. This will leak state between calls, which is somewhat unavoidable, but should at least get the basic stuff right for the CLI. We eventually need the CA string to be supported by a stateless internal CA implementation that allows us to do the right thing overall. Reviewed-By: Dan Bode <dan@puppetlabs.com>
| | | * | | | | | | (#6972) Recognize puppet global options in pre-parse.Daniel Pittman2011-04-062-1/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This extends the CLI pre-parse phase to identify both string *and* global options out of the Puppet settings/defaults system. This makes the regular CLI support for setting Puppet configuration globals work as expected. This moves us along the line of supporting these options more fully. Reviewed-By: Dan Bode <dan@puppetlabs.com>
| | | * | | | | | | (#6972) Clean up OptParse name extraction a little.Daniel Pittman2011-04-061-2/+2
| | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During testing, an obvious cleanup showed up for the name extraction here, so we implement it. This extends the regexp to better extract the data we want rather than hacking it up post-match and having to do extra validation to make sure it actually worked. Reviewed-By: Dan Bode <dan@puppetlabs.com>
| | * | | | | | | Merge branch 'bug/master/6995-current-is-not-always-calculated-correctly'Daniel Pittman2011-04-064-78/+135
| | |\ \ \ \ \ \ \
| | | * | | | | | | (#6995) Fix indexing of :current on string load.Daniel Pittman2011-04-063-52/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do this by implementing a standard mechanism for finding the current version out of the default file, and only supporting that one file. This implements our decision to lazy-evaluate the extra version support stuff as much as possible. Reviewed-By: Dan Bode <dan@puppetlabs.com>
| | | * | | | | | | maint: add `write_scratch_string` helper for testing...Daniel Pittman2011-04-061-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had a pattern where we wanted to routinely write scratch strings to disk, on the load path, so we could reference them later. This extracts that into a helper, and starts to use it in tests that should follow that pattern. Reviewed-By: Dan Bode <dan@puppetlabs.com>
| | | * | | | | | | maint: whitespace cleanup for spec_helper.Daniel Pittman2011-04-061-17/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had some incorrect indentation in the file; we fix that up now before we make any substantive changes. Paired-With: Dan Bode <dan@puppetlabs.com>
| | | * | | | | | | (#6995) more robust testing of string loadingDaniel Pittman2011-04-061-15/+19
| | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were flushing loaded string versions in the test suite, but were not clearing out the $" array used to determine if we had previously loaded that file. This lead to situations where tests cross-polluted because require though the code was in memory, but the effects of loading that code had all been rolled back. Reviewed-By: Dan Bode <dan@puppetlabs.com>
| | * | | | | | | Merge branch 'tickets/master/6982'Pieter van de Bruggen2011-04-051-1/+3
| | |\ \ \ \ \ \ \
| | | * | | | | | | (#6982) Patch the Certificate String against (#5528).Pieter van de Bruggen2011-04-051-1/+3
| | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-By: Matt Robinson
| | * | | | | | | Merge branch 'feature/master/6749-actions-need-to-support-options'Daniel Pittman2011-04-042-6/+14
| | |\ \ \ \ \ \ \
| | | * | | | | | | (#6949) Fix passing positional arguments to actions.Daniel Pittman2011-04-042-6/+14
| | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had a logic failure that didn't pass positional arguments at all, but which our testing didn't verify. This entirely broke things. Now fixed, and a test added to ensure we don't bug out further... Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | * | | | | | | Merge branch 'refactor/master/6964-when_invoked-rather-than-invoke-in-actions'Daniel Pittman2011-04-0416-56/+57
| | |\ \ \ \ \ \ \
| | | * | | | | | | (#6964) use 'when_invoked' rather than 'invoke' for actions.Daniel Pittman2011-04-0416-56/+57
| | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the DSL we want to use 'when_invoked do' because it reads much more naturally for users. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | * | | | | | | maint: added testing to ensure we inherit options correctly.Daniel Pittman2011-04-041-0/+16
| | | | | | | | |
| | * | | | | | | Merge branch 'feature/master/6749-actions-need-to-support-options'Daniel Pittman2011-04-0433-180/+1013
| | |\ \ \ \ \ \ \
| | | * | | | | | | (#6749) Handle options with inline arguments.Daniel Pittman2011-04-042-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We didn't correctly handle '--foo=bar' as having supplied an argument during the pre-parse phase. Now we have a test for it, and a fix in the code. Reviewed-By: Nick Lewis <nick@puppetlabs.com>
| | | * | | | | | | (#6749) Extract the action from the arguments cleanly.Daniel Pittman2011-04-042-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a test to verify that we are correctly removing the action name from the set of arguments passed to the string action, then cleans up the previous code so we don't need to mutilate the command line arguments: we can just extract it from the resultant set of information. Reviewed-By: Nick Lewis <nick@puppetlabs.com>
| | | * | | | | | | (#6749) Fix optional vs mandatory argument handling.Daniel Pittman2011-04-043-16/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | optparse will treat '--foo --bar' as "foo with the argument --bar" when foo takes a mandatory argument. We need to emulate that behaviour in our pre-parse of the command line. Incidentally, fix up a bug in boolean options, and improve our testing. Reviewed-By: Nick Lewis <nick@puppetlabs.com>
| | | * | | | | | | (#6749) Polish the CLI option pre-parse implementationDaniel Pittman2011-04-042-60/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This improves handling of the pre-parse of the command line to be non-destructive, which cuts down the volume of garbage generated in the process. It also improves testing to verify that we get the darn thing right... Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | | | | (#6749) clean up various testing bits...Daniel Pittman2011-04-042-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This cleans up a whole bunch of bits of the testing code around the place; nothing revolutionary, just nicer and more robust code. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | | | | (#6760) set terminus in indirector string base class.Daniel Pittman2011-04-043-21/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now accept a terminus option to each invocation, and set the terminus based on that call. This is probably incomplete, because it only sets the terminus when given, and doesn't try to reset it to the default afterwards. This also resets the terminus class after every invocation, to stop it leaking state across calls. This make, sadly, have some effects if you are not just using the strings to invoke the terminus, but it beats having the strings broken as well... Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | | | | (#6749) add a shim around the action implementation.Daniel Pittman2011-04-042-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To present a pleasant Ruby API to folks invoking actions we want to have default values for the trailing 'options' argument, and to be able to pass a block to the code to allow yield to work. Given limitations of Ruby 1.8 regarding blocks, we can't use either of those because the block slot is bound at declaration time, and you can't give optional arguments. To work around this we inject, using eval, a full regular Ruby method into the final block of code. This can provide the default argument at the end in an intelligent way (albeit by emulating what the interpreter would do). This doesn't solve the yield problem, but the same method can pass the block explicitly, and allows other hooks to be injected, which makes it easier to do smarter things in future... Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | | | | (#6749) Start porting existing strings to the options API.Daniel Pittman2011-04-0415-22/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides a solid test of the new code, by migrating the existing strings to match. This also gives us a chance to determine any weak points in the code as written. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | | | | (#6749) code and test cleanup of Application/StringBase.Daniel Pittman2011-04-042-17/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes dead code now we have terminus in the base string, and disables some tests on StringBase app until they can be rewritten. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | | | | (#6749) base indirector string should fail on invalid terminus.Daniel Pittman2011-04-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to generate an info-level message, then carry on, which typically resulted in raising because 'nil' doesn't implement the expected method that we immediately try to call. So, instead, raise a clear error at the time we fail to load, which gives a pleasant rather than confusing error to the user. Which at least means they know why things have gone wrong... Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | | | | (#6749) disable Action#invoke for this release.Daniel Pittman2011-04-041-3/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So, we have Action#invoke, but it binds to the declaring class, not to the correct instance. Solving all the subtle issues around threads, global state, and bindings without causing us too much pain is actually pretty hard, so instead we pull the feature. It can be enabled again in a future release and, being a strict extension feature, we can do that without overly hurting anyone. We still have full access to the invocation through a marginally less pleasant syntax, but one that people MUST be able to arrange to allow invoke to work, so on that front we are clean. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | | | | (#6749) Remove "save does not work" language from strings.Daniel Pittman2011-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we are pushing into production we can eliminate this language, which was a legacy from the prototype that is no longer relevant globally. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | | | | (#6749) string cli base: implement preinit CLI parsingDaniel Pittman2011-04-044-49/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to identify the full set of options we need to know the action that is being invoked; that actually requires a pre-processing step to identify that out of the global options. Notably, our spec is that options can be to the right of their declaration point, but not to the left: that means that we can now extract the full set of options, and interact with the standard Puppet option handling code, resulting in at least vaguely saner behaviour... Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | | | | (#6749) detect duplicate aliases in a single option statement.Daniel Pittman2011-04-042-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that an option declaration that shadows itself is found, and reported to the user, rather than silently eating one of the two. This could have actually lost, for example, the distinction between an argument-requiring and an argument-missing variant of the same thing. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | | | | (#6749) fix an inheritance bug in ActionManagerDaniel Pittman2011-04-042-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we wrote class inheritance of actions for strings we didn't implement method (ahem, action) lookup correctly. This changes that, by providing the implementation to our standards, along with appropriate tests. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | | | | (#6749) implementing option handling in CLI string wrapperDaniel Pittman2011-04-0416-204/+377
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of this is to adapt the generic option support in our strings to the command line; we adapt the generic option information to optparse, and establish our environment early in the process to ensure that we can play nice with Puppet::Application for the moment. In the process we ensure that we detect, and report, conflicts in option naming across the board. Additionally, when an option is declared with multiple aliases, we insist that either all, or none, of them take an argument. To support this we support introspecting options having an optional argument, as well as documentation and all. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | | | | (#6749) Implement support for options on strings and actions.Daniel Pittman2011-04-0412-20/+458
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to support both strings and actions specifying options, to support generic wrappers that present strings to the user across multiple distinct front-ends. At the moment we focus on implementation of a generic CLI providing full control to all the strings, but we aim to support other programmatic interfaces including Ruby and RPC invocation as part of the overall change. We also detect, at the time they are declared, duplicate options. They are reported, like any duplicate, with an error thrown. Specifically: It is illegal to declare a duplicate option in the same scope, such as within the same string, or within the same action. This is unchanged. It is illegal to declare an option in an action that duplicates an option in the string, or vice-versa. This is reported when the duplicate is declared, so may report on either the string or action depending on sequence. It remains legal to duplicate the same option across multiple actions, with different meanings. There is no conflict, as the same option can't be passed to both simultaneously. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | | | | MAINT: nicer to_s for actions, for user-focused rendering.Daniel Pittman2011-04-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible for us to just print the Action object directly and get a human-focused output string. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | | | | (#6758) Pass options as an argument to string actions.Daniel Pittman2011-04-024-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier in their implementation the String prototype would set global state on a String object to reflect options set on the command line. As we move strings away from a CLI-only prototype, this becomes troublesome because we can easily have, for example, HTTP access to a string, which means load balancers can really make this confusing. It also encourages global state pollution, where one invocation can adversely influence another. A better approach is that we pass options to the string action invocation directly; this makes the interaction stateless. Changes required to your code to adapt to the new world: - action(:foo) do |some, args| + action(:foo) do |some, args, options={}| if options[:whatever] then Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | | | | MAINT: fix error reporting when you set terminus incorrectly.Daniel Pittman2011-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we tried to invoke a class method on an instance, and threw another exception, which wasn't the most helpful behaviour. This fixes that to correctly report the array of available terminus classes to the user. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | | | | MAINT: delete a test that can't work on 2.6.Daniel Pittman2011-04-021-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The methods being tested are not available in the 2.6 series, and the test itself is relatively weak, so rather than try to fix it we eliminate it in favour of other testing of the same behaviour. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | | | | MAINT: implement a pending test for code we wrote...Daniel Pittman2011-04-021-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had an outstanding pending test for code we wrote, and which we were not actually testing stand-alone. This implements the test for that. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | | | | MAINT: use a table for table-style tests...Daniel Pittman2011-04-021-14/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had a series of tests that vary only on one input, and which wanted to validate that the same failure happened after every instance; reducing this to a set of input data lets us reduce code duplication in the tests. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | * | | | | | | MAINT: fix up tests that depend on the LoadError message to work.Daniel Pittman2011-04-021-3/+7
| | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We depend on require throwing about a specific file on disk, rather than just generically, to ensure that we don't consume load errors from existing files. This means our tests need to be updated to reflect that, by raising with appropriate text when they stub require. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
| | * | | | | | | (Maint) Bugfix for failing requires inside Puppet Strings.Pieter van de Bruggen2011-03-301-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Paired-With: Matt Robinson
| | * | | | | | | Merge branch 'maint/master/use-bracket-notation-in-specs'Nick Lewis2011-03-2914-13/+13
| | |\ \ \ \ \ \ \
| | | * | | | | | | maint: Use bracket notation instead of define in specsNick Lewis2011-03-2914-13/+13
| | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The intent of these specs is to find the String rather than to actually define it. Thus, the bracket notation is more semantically accurate than using Puppet::String#define. Reviewed-By: Pieter van de Bruggen