summaryrefslogtreecommitdiffstats
path: root/lib/puppet/interface/option_manager.rb
Commit message (Collapse)AuthorAgeFilesLines
* (#7699) Help command should only list options onceDan Bode2011-07-131-1/+2
| | | | | | | | The problem was caused by the fact that the options method returns a list of options that treated the aliases as seperate options. The fix is to only maintain a list of options and not add all aliases to the options list.
* Revert "Merge branch 'ticket/2.7.x/7699_fix_help_listing_options_twice' into ↵Jeff McCune2011-07-101-2/+1
| | | | | | | 2.7.x" This reverts commit b7ee0258ab40478329c20177eda9b250f27ede18, reversing changes made to 8fe2e555ac3d57f5b6503ffe1a5466db8d6e190a.
* (#7699) - Help should only show options onceDan Bode2011-07-101-1/+2
| | | | | | | | | | | | | puppet help was reprinting every option once for every alias that is had. This fix involves only storing the option.name in the @options instance var for both face and actions options. The @options_hash still maintains the list of options and aliases as its keys. Reviewed-by: Daniel Pittman (puppet-dev list)
* (#7289) Specify order for option decorations.Pieter van de Bruggen2011-04-291-9/+20
| | | | | | | | | | `before_action` decorations should always resolve in resolution order from most general (inherited from furthest away) to most specific (declared on the instance), and should always execute Face-level option decorations before action-level option decorations. `after_action` decorations should execute in the opposite order. Reviewed-By: Daniel Pittman
* (#6978) Add before and after decorators to actions from options.Daniel Pittman2011-04-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Options can now add before_action and after_action blocks; these are invoked before or after any action is invoked on the face. This allows these options to declare common behaviour and have it automatically applied to the actions invoked. Option hooks have no defined order of invocation: they will run in a completely random order. Where there are dependencies they should be on the value of the options hash passed to the invocation, not on side-effects of the other invocations. You are not able to influence the arguments, options, or calling of the action body in a before or after decorator. This is by design. The invocation passes to the hook: 1. The action object representing this action. 2. The arguments to the action, as an array. 3. The options for the action, as a hash. Paired-With: Max Martin <max@puppetlabs.com>
* (#7012) Split plumbing into Puppet::InterfaceDaniel Pittman2011-04-071-0/+56
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.