summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/puppetdoc18
-rw-r--r--lib/puppet/reference/node_source.rb9
-rw-r--r--lib/puppet/reference/report.rb21
3 files changed, 14 insertions, 34 deletions
diff --git a/bin/puppetdoc b/bin/puppetdoc
index be86cc618..82e4c076b 100755
--- a/bin/puppetdoc
+++ b/bin/puppetdoc
@@ -128,11 +128,19 @@ else
else
with_contents = true
end
+ exit_code = 0
options[:references].sort { |a,b| a.to_s <=> b.to_s }.each do |name|
- section = Puppet::Util::Reference.reference(name)
-
- # Add the per-section text, but with no ToC
- text += section.send(options[:format], with_contents)
+ raise "Could not find reference %s" % name unless section = Puppet::Util::Reference.reference(name)
+
+ begin
+ # Add the per-section text, but with no ToC
+ text += section.send(options[:format], with_contents)
+ rescue => detail
+ puts detail.backtrace
+ $stderr.puts "Could not generate reference %s: %s" % [name, detail]
+ exit_code = 1
+ next
+ end
end
unless with_contents # We've only got one reference
@@ -147,6 +155,8 @@ else
else
puts text
end
+
+ exit exit_code
end
diff --git a/lib/puppet/reference/node_source.rb b/lib/puppet/reference/node_source.rb
deleted file mode 100644
index 29a01f850..000000000
--- a/lib/puppet/reference/node_source.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-require 'puppet/node'
-
-noderef = Puppet::Util::Reference.newreference :node_source, :doc => "Sources of node configuration information" do
- Puppet::Network::Handler.node.docs
-end
-
-noderef.header = "
-Nodes can be searched for in different locations. This document describes those different locations.
-"
diff --git a/lib/puppet/reference/report.rb b/lib/puppet/reference/report.rb
deleted file mode 100644
index a8086f8bc..000000000
--- a/lib/puppet/reference/report.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-report = Puppet::Util::Reference.newreference :report, :doc => "All available transaction reports" do
- Puppet::Network::Handler.report.reportdocs
-end
-
-report.header = "
-Puppet clients can report back to the server after each transaction. This
-transaction report is sent as a YAML dump of the
-``Puppet::Transaction::Report`` class and includes every log message that was
-generated during the transaction along with as many metrics as Puppet knows how
-to collect. See `ReportsAndReporting Reports and Reporting`:trac:
-for more information on how to use reports.
-
-Currently, clients default to not sending in reports; you can enable reporting
-by setting the ``report`` parameter to true.
-
-To use a report, set the ``reports`` parameter on the server; multiple
-reports must be comma-separated. You can also specify ``none`` to disable
-reports entirely.
-
-Puppet provides multiple report handlers that will process client reports:
-"