summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-04-24 06:39:22 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-04-24 06:39:22 +0000
commit0ff37720f9af4ffbb34f63ab90d4901d4ddb9508 (patch)
tree59093220a9f38d0f1d14ca754321bfbd9283f9aa
parent1d036bb020b857b048cffe90346ddbbb73c2f59d (diff)
downloadpuppet-0ff37720f9af4ffbb34f63ab90d4901d4ddb9508.tar.gz
puppet-0ff37720f9af4ffbb34f63ab90d4901d4ddb9508.tar.xz
puppet-0ff37720f9af4ffbb34f63ab90d4901d4ddb9508.zip
Last modifications to rst conversion before bedtime
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2410 980ebf18-57e1-0310-9a29-db15c13687c0
-rwxr-xr-xbin/puppetdoc54
-rw-r--r--lib/puppet/metatype/metaparams.rb2
2 files changed, 35 insertions, 21 deletions
diff --git a/bin/puppetdoc b/bin/puppetdoc
index 2cc841a90..ceb210b77 100755
--- a/bin/puppetdoc
+++ b/bin/puppetdoc
@@ -101,7 +101,7 @@ TRACMAP = {
:configref => "ConfigurationReference",
:reports => "ReportReference",
:functions => "FunctionReference",
- :typedocs => "TypeReferenceTest"
+ :typedocs => "TypeReference"
}
HEADERS = {
@@ -259,6 +259,26 @@ def paramwrap(name, text, options = {})
return str
end
+def tracwrite(text, mode)
+ File.open("/tmp/puppetdoc.txt", "w") do |f|
+
+ f.puts "{{{
+#!rst\n
+#{text}
+}}}"
+ end
+ cmd = %{sudo trac-admin /export/svn/trac/puppet wiki import %s /tmp/puppetdoc.txt} % TRACMAP[mode]
+ output = %x{#{cmd}}
+ unless $? == 0
+ $stderr.puts "trac-admin failed"
+ $stderr.puts output
+ exit(1)
+ end
+ unless output =~ /^\s+/
+ $stderr.puts output
+ end
+end
+
# Print the docs for arguments
def self.configref
docs = {}
@@ -352,7 +372,7 @@ Available Metaparameters
Resource Types
--------------
-- *namevar* is the parameter used to uniquely identify a type instance.
+- The *namevar* is the parameter used to uniquely identify a type instance.
This is the parameter that gets assigned when a string is provided before
the colon in a type declaration. In general, only developers will need to
worry about which parameter is the ``namevar``.
@@ -369,12 +389,15 @@ Resource Types
dependency handling), and because ``path`` is the namevar for ``file``, that
string is assigned to the ``path`` parameter.
-- *parameters* determine the specific configuration of the instance. They either
+- *Features* are abilities that some providers might not support. You can use the list
+ of supported features to determine how a given provider can be used.
+
+- *Parameters* determine the specific configuration of the instance. They either
directly modify the system (internally, these are called properties) or they affect
how the instance behaves (e.g., adding a search path for ``exec`` instances
or determining recursion on ``file`` instances).
-- *providers* provide low-level functionality for a given resource type. This is
+- *Providers* provide low-level functionality for a given resource type. This is
usually in the form of calling out to external commands.
When required binaries are specified for providers, fully qualifed paths
@@ -482,23 +505,10 @@ text += "
text += "\n*This page autogenerated on %s*" % Time.now
if options[:trac]
- File.open("/tmp/puppetdoc.txt") do |f|
-
- f.puts "{{{
-#!rst\n
-#{text}
-}}}"
- end
- cmd = %{sudo trac-admin /export/svn/trac/puppet wiki import %s /tmp/puppetdoc.txt} % TRACMAP[mode]
- output = %x{#{cmd}}
- unless $? == 0
- $stderr.puts "trac-admin failed"
- $stderr.puts output
- exit(1)
- end
- unless output =~ /^\s+/
- $stderr.puts output
+ if options[:modes].length > 1
+ raise "Cannot write more than one mode to trac at once"
end
+ tracwrite(text, options[:modes][0])
else
# Replace the trac links, since they're invalid everywhere else
text.gsub!(/`\w+\s+([^`]+)`:trac/) { |m| $1 }
@@ -529,6 +539,10 @@ else
Dir.chdir("/tmp") do
%x{texi2pdf puppetdoc.tex >/dev/null 2>/dev/null}
end
+
+ if FileTest.exists?("/tmp/puppetdoc.pdf")
+ FileUtils.mv("/tmp/puppetdoc.pdf", "/export/apache/docroots/reductivelabs.com/htdocs/downloads/puppet/reference.pdf")
+ end
else
puts text
end
diff --git a/lib/puppet/metatype/metaparams.rb b/lib/puppet/metatype/metaparams.rb
index e407ece24..37a712c4d 100644
--- a/lib/puppet/metatype/metaparams.rb
+++ b/lib/puppet/metatype/metaparams.rb
@@ -218,7 +218,7 @@ class Puppet::Type
Tags are currently useful for things like applying a subset of a
host's configuration::
- puppetd --test --tag mytag
+ puppetd --test --tags mytag
This way, when you're testing a configuration you can run just the
portion you're testing."