summaryrefslogtreecommitdiffstats
path: root/lib/puppet/face
diff options
context:
space:
mode:
authorDaniel Pittman <daniel@puppetlabs.com>2011-04-27 10:05:48 -0700
committerDaniel Pittman <daniel@puppetlabs.com>2011-04-27 10:10:20 -0700
commite8eb290a1681baa19ef0b035af7cf17daadc6069 (patch)
treee94d133c7a817be600fa38902fdc96cc304b3670 /lib/puppet/face
parent6e152ad1d0bb34f6d24fd818b2b020d5a8dd385b (diff)
(#6962) Finish documentation API on Face options.
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.
Diffstat (limited to 'lib/puppet/face')
-rw-r--r--lib/puppet/face/help.rb2
-rw-r--r--lib/puppet/face/help/action.erb3
-rw-r--r--lib/puppet/face/help/face.erb3
-rw-r--r--lib/puppet/face/indirector.rb6
4 files changed, 9 insertions, 5 deletions
diff --git a/lib/puppet/face/help.rb b/lib/puppet/face/help.rb
index ba64d2b54..07c3ed9b1 100644
--- a/lib/puppet/face/help.rb
+++ b/lib/puppet/face/help.rb
@@ -13,7 +13,7 @@ Puppet::Face.define(:help, '0.0.1') do
summary "Display help about faces and their actions."
option "--version VERSION" do
- desc "Which version of the interface to show help for"
+ summary "which version of the interface to show help for"
end
default
diff --git a/lib/puppet/face/help/action.erb b/lib/puppet/face/help/action.erb
index 7a9b87117..c26958a35 100644
--- a/lib/puppet/face/help/action.erb
+++ b/lib/puppet/face/help/action.erb
@@ -20,7 +20,8 @@ OPTIONS
% action.options.sort.each do |name|
% option = action.get_option name
<%= " " + option.optparse.join(" |" ) %>
-<%= option.desc and option.desc.gsub(/^/, ' ') %>
+<%= option.summary %>
+<%= option.description %>
% end
% end
diff --git a/lib/puppet/face/help/face.erb b/lib/puppet/face/help/face.erb
index 944f7a96b..b249981de 100644
--- a/lib/puppet/face/help/face.erb
+++ b/lib/puppet/face/help/face.erb
@@ -16,7 +16,8 @@ OPTIONS
% face.options.sort.each do |name|
% option = face.get_option name
<%= " " + option.optparse.join(" |" ) %>
-<%= option.desc and option.desc.gsub(/^/, ' ') %>
+<%= option.summary %>
+<%= option.description %>
% end
% end
diff --git a/lib/puppet/face/indirector.rb b/lib/puppet/face/indirector.rb
index 6c7708b51..a7ff7e1f0 100644
--- a/lib/puppet/face/indirector.rb
+++ b/lib/puppet/face/indirector.rb
@@ -3,8 +3,10 @@ require 'puppet/face'
class Puppet::Face::Indirector < Puppet::Face
option "--terminus TERMINUS" do
- desc "REVISIT: You can select a terminus, which has some bigger effect
-that we should describe in this file somehow."
+ description %q{
+REVISIT: You can select a terminus, which has some bigger effect
+that we should describe in this file somehow.
+}.strip
before_action do |action, args, options|
set_terminus(options[:terminus])