Fixed some remaining Reductive Labs references

Signed-off-by: James Turnbull <[email protected]>
---
 ext/nagios/naggen                          |    2 +-
 ext/puppet-test                            |    2 +-
 lib/puppet/application/doc.rb              |   10 ++-----
 lib/puppet/reference/configuration.rb      |    2 +-
 lib/puppet/reference/network.rb            |    2 +-
 lib/puppet/reference/providers.rb          |    2 +-
 lib/puppet/reference/type.rb               |    1 -
 lib/puppet/util/command_line/filebucket    |    2 +-
 lib/puppet/util/command_line/pi            |    2 +-
 lib/puppet/util/command_line/puppet        |    2 +-
 lib/puppet/util/command_line/puppetca      |    2 +-
 lib/puppet/util/command_line/puppetd       |    2 +-
 lib/puppet/util/command_line/puppetdoc     |    8 +++---
 lib/puppet/util/command_line/puppetmasterd |    2 +-
 lib/puppet/util/command_line/puppetqd      |    2 +-
 lib/puppet/util/command_line/puppetrun     |    2 +-
 lib/puppet/util/command_line/ralsh         |    2 +-
 lib/puppet/util/reference.rb               |   36 +--------------------------
 spec/unit/application/doc_spec.rb          |    4 +-
 test/test                                  |    2 +-
 20 files changed, 26 insertions(+), 63 deletions(-)

diff --git a/ext/nagios/naggen b/ext/nagios/naggen
index a9e04c4..c6ca15a 100755
--- a/ext/nagios/naggen
+++ b/ext/nagios/naggen
@@ -63,7 +63,7 @@
 #
 # = Copyright
 #
-# Copyright (c) 2009 Reductive Labs, LLC
+# Copyright (c) 2009 Puppet Labs, LLC
 # Licensed under the GPL 2
 
 require 'puppet'
diff --git a/ext/puppet-test b/ext/puppet-test
index 61397e7..f2648c9 100755
--- a/ext/puppet-test
+++ b/ext/puppet-test
@@ -90,7 +90,7 @@
 #
 # = Copyright
 #
-# Copyright (c) 2005, 2006 Reductive Labs, LLC
+# Copyright (c) 2005, 2006 Puppet Labs, LLC
 # Licensed under the GNU Public License
 
 # Do an initial trap, so that cancels don't get a stack trace.
diff --git a/lib/puppet/application/doc.rb b/lib/puppet/application/doc.rb
index 1f6c632..9d375a1 100644
--- a/lib/puppet/application/doc.rb
+++ b/lib/puppet/application/doc.rb
@@ -8,7 +8,7 @@ class Puppet::Application::Doc < Puppet::Application
   attr_accessor :unknown_args, :manifest
 
   def preinit
-    {:references => [], :mode => :text, :format => :to_rest }.each do 
|name,value|
+    {:references => [], :mode => :text, :format => :to_text }.each do 
|name,value|
       options[name] = value
     end
     @unknown_args = []
@@ -94,7 +94,6 @@ class Puppet::Application::Doc < Puppet::Application
 
   def other
     text = ""
-    with_contents = options[:references].length <= 1
     exit_code = 0
     require 'puppet/util/reference'
     options[:references].sort { |a,b| a.to_s <=> b.to_s }.each do |name|
@@ -102,7 +101,7 @@ class Puppet::Application::Doc < Puppet::Application
 
       begin
         # Add the per-section text, but with no ToC
-        text += section.send(options[:format], with_contents)
+        text += section.send(options[:format])
       rescue => detail
         puts detail.backtrace
         $stderr.puts "Could not generate reference #{name}: #{detail}"
@@ -111,10 +110,7 @@ class Puppet::Application::Doc < Puppet::Application
       end
     end
 
-    text += Puppet::Util::Reference.footer unless with_contents # We've only 
got one reference
-
-    # Replace the trac links, since they're invalid everywhere else
-    text.gsub!(/`\w+\s+([^`]+)`:trac:/) { |m| $1 }
+    text
 
     if options[:mode] == :pdf
       Puppet::Util::Reference.pdf(text)
diff --git a/lib/puppet/reference/configuration.rb 
b/lib/puppet/reference/configuration.rb
index e6a8dc2..ec22bc6 100644
--- a/lib/puppet/reference/configuration.rb
+++ b/lib/puppet/reference/configuration.rb
@@ -1,4 +1,4 @@
-config = Puppet::Util::Reference.newreference(:configuration, :depth => 1, 
:doc => "A reference for all configuration parameters") do
+config = Puppet::Util::Reference.newreference(:configuration, :doc => "A 
reference for all configuration parameters") do
   docs = {}
   Puppet.settings.each do |name, object|
     docs[name] = object
diff --git a/lib/puppet/reference/network.rb b/lib/puppet/reference/network.rb
index fda7931..b2dc3d7 100644
--- a/lib/puppet/reference/network.rb
+++ b/lib/puppet/reference/network.rb
@@ -1,6 +1,6 @@
 require 'puppet/network/handler'
 
-network = Puppet::Util::Reference.newreference :network, :depth => 2, :doc => 
"Available network handlers and clients" do
+network = Puppet::Util::Reference.newreference :network, :doc => "Available 
network handlers and clients" do
   ret = ""
   Puppet::Network::Handler.subclasses.sort { |a,b| a.to_s <=> b.to_s }.each do 
|name|
     handler = Puppet::Network::Handler.handler(name)
diff --git a/lib/puppet/reference/providers.rb 
b/lib/puppet/reference/providers.rb
index c85ad23..56fb3ef 100644
--- a/lib/puppet/reference/providers.rb
+++ b/lib/puppet/reference/providers.rb
@@ -1,5 +1,5 @@
 # This doesn't get stored in trac, since it changes every time.
-providers = Puppet::Util::Reference.newreference :providers, :title => 
"Provider Suitability Report", :depth => 1, :dynamic => true, :doc => "Which 
providers are valid for this machine" do
+providers = Puppet::Util::Reference.newreference :providers, :title => 
"Provider Suitability Report", :dynamic => true, :doc => "Which providers are 
valid for this machine" do
   types = []
   Puppet::Type.loadall
   Puppet::Type.eachtype do |klass|
diff --git a/lib/puppet/reference/type.rb b/lib/puppet/reference/type.rb
index b423387..7891898 100644
--- a/lib/puppet/reference/type.rb
+++ b/lib/puppet/reference/type.rb
@@ -96,7 +96,6 @@ type = Puppet::Util::Reference.newreference :type, :doc => 
"All Puppet resource
     type.parameters.sort { |a,b|
       a.to_s <=> b.to_s
     }.each { |name,param|
-      #docs[name] = indent(scrub(type.paramdoc(name)), $tab)
       docs[name] = scrub(type.paramdoc(name))
     }
 
diff --git a/lib/puppet/util/command_line/filebucket 
b/lib/puppet/util/command_line/filebucket
index 8302d7b..34b0150 100755
--- a/lib/puppet/util/command_line/filebucket
+++ b/lib/puppet/util/command_line/filebucket
@@ -91,7 +91,7 @@
 #
 # = Copyright
 #
-# Copyright (c) 2005 Reductive Labs, LLC
+# Copyright (c) 2005 Puppet Labs, LLC
 # Licensed under the GNU Public License
 
 #Puppet::Application[:filebucket].run
diff --git a/lib/puppet/util/command_line/pi b/lib/puppet/util/command_line/pi
index ae3c46e..3d80eea 100755
--- a/lib/puppet/util/command_line/pi
+++ b/lib/puppet/util/command_line/pi
@@ -42,7 +42,7 @@
 #
 # = Copyright
 #
-# Copyright (c) 2005 Reductive Labs, LLC
+# Copyright (c) 2005 Puppet Labs, LLC
 # Licensed under the GNU Public License
 
 #Puppet::Application[:describe].run
diff --git a/lib/puppet/util/command_line/puppet 
b/lib/puppet/util/command_line/puppet
index 7b6c0ae..e75b92a 100755
--- a/lib/puppet/util/command_line/puppet
+++ b/lib/puppet/util/command_line/puppet
@@ -63,7 +63,7 @@
 #
 # = Copyright
 #
-# Copyright (c) 2005 Reductive Labs, LLC
+# Copyright (c) 2005 Puppet Labs, LLC
 # Licensed under the GNU Public License
 
 #Puppet::Application[:apply].run
diff --git a/lib/puppet/util/command_line/puppetca 
b/lib/puppet/util/command_line/puppetca
index 4f1a88d..9aa7e90 100755
--- a/lib/puppet/util/command_line/puppetca
+++ b/lib/puppet/util/command_line/puppetca
@@ -104,7 +104,7 @@
 #
 # = Copyright
 #
-# Copyright (c) 2005 Reductive Labs, LLC
+# Copyright (c) 2005 Puppet Labs, LLC
 # Licensed under the GNU Public License
 
 #Puppet::Application[:cert].run
diff --git a/lib/puppet/util/command_line/puppetd 
b/lib/puppet/util/command_line/puppetd
index 571b154..cb8589c 100755
--- a/lib/puppet/util/command_line/puppetd
+++ b/lib/puppet/util/command_line/puppetd
@@ -180,7 +180,7 @@
 #
 # = Copyright
 #
-# Copyright (c) 2005, 2006 Reductive Labs, LLC
+# Copyright (c) 2005, 2006 Puppet Labs, LLC
 # Licensed under the GNU Public License
 
 #Puppet::Application[:agent].run
diff --git a/lib/puppet/util/command_line/puppetdoc 
b/lib/puppet/util/command_line/puppetdoc
index 0fa1830..e2b9958 100755
--- a/lib/puppet/util/command_line/puppetdoc
+++ b/lib/puppet/util/command_line/puppetdoc
@@ -3,10 +3,10 @@
 #
 # = Synopsis
 #
-# Generate a reference for all Puppet types.  Largely meant for internal 
Reductive
-# Labs use.
+# Produce documentation for manifests and modules.  Can also generate 
references
+# for Puppet covering types, configuration, etc.
 #
-# = Usage
+# Usage
 #
 #   puppet doc [-a|--all] [-h|--help] [-o|--outputdir <rdoc outputdir>] 
[-m|--mode <text|pdf|rdoc>]
 #              [-r|--reference <[type]|configuration|..>] [--charset CHARSET] 
[manifest-file]
@@ -61,7 +61,7 @@
 #
 # = Copyright
 #
-# Copyright (c) 2005-2007 Reductive Labs, LLC
+# Copyright (c) 2005-2007 Puppet Labs, LLC
 # Licensed under the GNU Public License
 
 #Puppet::Application[:doc].run
diff --git a/lib/puppet/util/command_line/puppetmasterd 
b/lib/puppet/util/command_line/puppetmasterd
index 74efb38..baf8a75 100755
--- a/lib/puppet/util/command_line/puppetmasterd
+++ b/lib/puppet/util/command_line/puppetmasterd
@@ -59,7 +59,7 @@
 #
 # = Copyright
 #
-# Copyright (c) 2005 Reductive Labs, LLC
+# Copyright (c) 2005 Puppet Labs, LLC
 # Licensed under the GNU Public License
 
 #Puppet::Application[:master].run
diff --git a/lib/puppet/util/command_line/puppetqd 
b/lib/puppet/util/command_line/puppetqd
index 48fc952..81963d5 100755
--- a/lib/puppet/util/command_line/puppetqd
+++ b/lib/puppet/util/command_line/puppetqd
@@ -47,7 +47,7 @@
 #
 # = Copyright
 #
-# Copyright (c) 2009 Reductive Labs, LLC
+# Copyright (c) 2009 Puppet Labs, LLC
 # Licensed under the GNU Public License
 
 #Puppet::Application[:queue].run
diff --git a/lib/puppet/util/command_line/puppetrun 
b/lib/puppet/util/command_line/puppetrun
index 27cd775..7eba3b2 100755
--- a/lib/puppet/util/command_line/puppetrun
+++ b/lib/puppet/util/command_line/puppetrun
@@ -120,7 +120,7 @@
 #
 # = Copyright
 #
-# Copyright (c) 2005 Reductive Labs, LLC
+# Copyright (c) 2005 Puppet Labs, LLC
 # Licensed under the GNU Public License
 
 #Puppet::Application[:kick].run
diff --git a/lib/puppet/util/command_line/ralsh 
b/lib/puppet/util/command_line/ralsh
index 83338fc..5c1f719 100755
--- a/lib/puppet/util/command_line/ralsh
+++ b/lib/puppet/util/command_line/ralsh
@@ -83,7 +83,7 @@
 #
 # = Copyright
 #
-# Copyright (c) 2005-2007 Reductive Labs, LLC
+# Copyright (c) 2005-2007 Puppet Labs, LLC
 # Licensed under the GNU Public License
 
 #Puppet::Application[:resource].run
diff --git a/lib/puppet/util/reference.rb b/lib/puppet/util/reference.rb
index ab201cd..c2a526c 100644
--- a/lib/puppet/util/reference.rb
+++ b/lib/puppet/util/reference.rb
@@ -10,10 +10,6 @@ class Puppet::Util::Reference
 
   instance_load(:reference, 'puppet/reference')
 
-  def self.footer
-    "\n\n----------------\n\n*This page autogenerated on #{Time.now}*\n"
-  end
-
   def self.modes
     %w{pdf text}
   end
@@ -25,15 +21,6 @@ class Puppet::Util::Reference
     ref
   end
 
-  def self.page(*sections)
-    depth = 4
-    # Use the minimum depth
-    sections.each do |name|
-      section = reference(name) or raise "Could not find section #{name}"
-      depth = section.depth if section.depth < depth
-    end
-  end
-
   def self.pdf(text)
     puts "creating pdf"
     Puppet::Util.secure_open("/tmp/puppetdoc.txt", "w") do |f|
@@ -73,7 +60,7 @@ class Puppet::Util::Reference
 
   HEADER_LEVELS = [nil, "#", "##", "###", "####", "#####"]
 
-  attr_accessor :page, :depth, :header, :title, :dynamic
+  attr_accessor :page, :header, :title, :dynamic
   attr_writer :doc
 
   def doc
@@ -103,54 +90,35 @@ class Puppet::Util::Reference
     # Now handle the defaults
     @title ||= "#[email protected]_s.capitalize} Reference"
     @page ||= @title.gsub(/\s+/, '')
-    @depth ||= 2
     @header ||= ""
   end
 
-  # Indent every line in the chunk except those which begin with '..'.
-  def indent(text, tab)
-    text.gsub(/(^|\A)/, tab).gsub(/^ +\.\./, "..")
-  end
-
   def option(name, value)
     ":#{name.to_s.capitalize}: #{value}\n"
   end
 
   def paramwrap(name, text, options = {})
     options[:level] ||= 5
-    #str = "#{name} : "
     str = h(name, options[:level])
     str += "- **namevar**\n\n" if options[:namevar]
     str += text
-    #str += text.gsub(/\n/, "\n    ")
 
     str += "\n\n"
   end
 
-  # Remove all trac links.
-  def strip_trac(text)
-    text.gsub(/`\w+\s+([^`]+)`:trac:/) { |m| $1 }
-  end
-
   def text
     puts output
   end
 
-  def to_rest(withcontents = true)
+  def to_text
     # First the header
     text = h(@title, 1)
-    text += "\n\n**This page is autogenerated; any changes will get 
overwritten** *(last generated on #{Time.now.to_s})*\n\n"
 
     text += @header
 
     text += generate
 
-    text += self.class.footer if withcontents
-
     text
   end
 
-  def to_text(withcontents = true)
-    strip_trac(to_rest(withcontents))
-  end
 end
diff --git a/spec/unit/application/doc_spec.rb 
b/spec/unit/application/doc_spec.rb
index 55da5e3..a1774ca 100755
--- a/spec/unit/application/doc_spec.rb
+++ b/spec/unit/application/doc_spec.rb
@@ -48,10 +48,10 @@ describe Puppet::Application::Doc do
       @doc.options[:mode].should == :text
     end
 
-    it "should init format to to_rest" do
+    it "should init format to to_text" do
       @doc.preinit
 
-      @doc.options[:format].should == :to_rest
+      @doc.options[:format].should == :to_text
     end
   end
 
diff --git a/test/test b/test/test
index 0978857..c8b9b08 100755
--- a/test/test
+++ b/test/test
@@ -68,7 +68,7 @@
 #
 # = Copyright
 #
-# Copyright (c) 2005 Reductive Labs, LLC
+# Copyright (c) 2005 Puppet Labs, LLC
 # Licensed under the GNU Public License
 
 require 'find'
-- 
1.7.2.3

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to