[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5
Jesse Wolfe
jes5199 at gmail.com
Tue May 10 08:04:01 UTC 2011
The following commit has been merged in the experimental branch:
commit e1191f33defcaffec5900c7122a89ca75d3a9673
Author: Jesse Wolfe <jes5199 at gmail.com>
Date: Thu Feb 3 16:10:49 2011 -0800
Maint: remove rdoc/usage dependency
diff --git a/lib/puppet/application.rb b/lib/puppet/application.rb
index c3d7355..7ef71bc 100644
--- a/lib/puppet/application.rb
+++ b/lib/puppet/application.rb
@@ -250,7 +250,8 @@ class Application
# Every app responds to --help
option("--help", "-h") do |v|
- help
+ puts help
+ exit
end
def should_parse_config?
@@ -385,23 +386,7 @@ class Application
end
def help
- if Puppet.features.usage?
- # RH:FIXME: My goodness, this is ugly.
- ::RDoc.const_set("PuppetSourceFile", name)
- #:stopdoc: # Issue #4161
- def (::RDoc).caller
- docfile = `grep -l 'Puppet::Application\\[:#{::RDoc::PuppetSourceFile}\\]' #{DOCPATTERN}`.chomp
- super << "#{docfile}:0"
- end
- #:startdoc:
- ::RDoc::usage && exit
- else
- puts "No help available unless you have RDoc::usage installed"
- exit
- end
- rescue Errno::ENOENT
- puts "No help available for puppet #{name}"
- exit
+ "No help available for puppet #{name}"
end
private
diff --git a/spec/unit/application_spec.rb b/spec/unit/application_spec.rb
index 5a52c2d..1446535 100755
--- a/spec/unit/application_spec.rb
+++ b/spec/unit/application_spec.rb
@@ -283,11 +283,10 @@ describe Puppet::Application do
@app.parse_options
end
- describe "when using --help", :if => Puppet.features.usage? do
+ describe "when using --help" do
- it "should call RDoc::usage and exit" do
+ it "should call exit" do
@app.expects(:exit)
- RDoc.expects(:usage).returns(true)
@app.handle_help(nil)
end
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list