summaryrefslogtreecommitdiffstats
path: root/lib/puppet/face/parser.rb
diff options
context:
space:
mode:
authorDaniel Pittman <daniel@puppetlabs.com>2011-04-21 16:33:59 -0700
committerDaniel Pittman <daniel@puppetlabs.com>2011-04-21 16:33:59 -0700
commit3c22e770625f3cc788b0d138c8101e259a534736 (patch)
treea5421861cc9472412d034f66e94b30dbe60a7705 /lib/puppet/face/parser.rb
parent681edda370ec3d33aca0ca61864ec4352cafe567 (diff)
parentff08ba2abc8a59caa2bae0cde0a84ded99337e1c (diff)
downloadpuppet-3c22e770625f3cc788b0d138c8101e259a534736.tar.gz
puppet-3c22e770625f3cc788b0d138c8101e259a534736.tar.xz
puppet-3c22e770625f3cc788b0d138c8101e259a534736.zip
Merge remote-tracking branch '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>
Diffstat (limited to 'lib/puppet/face/parser.rb')
-rw-r--r--lib/puppet/face/parser.rb32
1 files changed, 17 insertions, 15 deletions
diff --git a/lib/puppet/face/parser.rb b/lib/puppet/face/parser.rb
index d4aaaf043..bea146f81 100644
--- a/lib/puppet/face/parser.rb
+++ b/lib/puppet/face/parser.rb
@@ -2,19 +2,21 @@ require 'puppet/face'
require 'puppet/parser'
Puppet::Face.define(:parser, '0.0.1') do
- action :validate do
- when_invoked do |*args|
- args.pop
- files = args
- if files.empty?
- files << Puppet[:manifest]
- Puppet.notice "No manifest specified. Validating the default manifest #{Puppet[:manifest]}"
- end
- files.each do |file|
- Puppet[:manifest] = file
- Puppet::Node::Environment.new(Puppet[:environment]).known_resource_types.clear
- end
- nil
- end
- end
+ summary "Interact directly with the parser"
+
+ action :validate do
+ when_invoked do |*args|
+ args.pop
+ files = args
+ if files.empty?
+ files << Puppet[:manifest]
+ Puppet.notice "No manifest specified. Validating the default manifest #{Puppet[:manifest]}"
+ end
+ files.each do |file|
+ Puppet[:manifest] = file
+ Puppet::Node::Environment.new(Puppet[:environment]).known_resource_types.clear
+ end
+ nil
+ end
+ end
end