Skip to content

Commit af46b4a

Browse files
committed
Remove rdoc and ri options from install.rb
Since 584652c the build_rdoc and build_ri methods have been commented out meaning these options never did anything.
1 parent 9f73d01 commit af46b4a

File tree

1 file changed

+1
-65
lines changed

1 file changed

+1
-65
lines changed

install.rb

Lines changed: 1 addition & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,6 @@
3636
require 'optparse'
3737
require 'ostruct'
3838

39-
begin
40-
require 'rdoc/rdoc'
41-
$haverdoc = true
42-
rescue LoadError
43-
puts "Missing rdoc; skipping documentation"
44-
$haverdoc = false
45-
end
46-
4739
PREREQS = %w{openssl facter cgi}
4840
MIN_FACTER_VERSION = 1.5
4941

@@ -140,25 +132,9 @@ def prepare_installation
140132
InstallOptions.check_prereqs = true
141133
InstallOptions.batch_files = true
142134

143-
# Only try to do docs if we're sure they have rdoc
144-
if $haverdoc
145-
InstallOptions.rdoc = true
146-
InstallOptions.ri = true
147-
else
148-
InstallOptions.rdoc = false
149-
InstallOptions.ri = false
150-
end
151-
152-
153135
ARGV.options do |opts|
154136
opts.banner = "Usage: #{File.basename($0)} [options]"
155137
opts.separator ""
156-
opts.on('--[no-]rdoc', 'Prevents the creation of RDoc output.', 'Default on.') do |onrdoc|
157-
InstallOptions.rdoc = onrdoc
158-
end
159-
opts.on('--[no-]ri', 'Prevents the creation of RI output.', 'Default off on mswin32.') do |onri|
160-
InstallOptions.ri = onri
161-
end
162138
opts.on('--[no-]configs', 'Prevents the installation of config files', 'Default off.') do |ontest|
163139
InstallOptions.configs = ontest
164140
end
@@ -205,14 +181,8 @@ def prepare_installation
205181
InstallOptions.batch_files = false
206182
end
207183
opts.on('--quick', 'Performs a quick installation. Only the', 'installation is done.') do |quick|
208-
InstallOptions.rdoc = false
209-
InstallOptions.ri = false
210-
InstallOptions.configs = true
211-
end
212-
opts.on('--full', 'Performs a full installation. All', 'optional installation steps are run.') do |full|
213-
InstallOptions.rdoc = true
214-
InstallOptions.ri = true
215184
InstallOptions.configs = true
185+
warn "--quick is deprecated. Use --configs"
216186
end
217187
opts.separator("")
218188
opts.on_tail('--help', "Shows this help text.") do
@@ -381,36 +351,6 @@ def join(basedir, dir)
381351
"#{basedir}#{dir}"
382352
end
383353

384-
##
385-
# Build the rdoc documentation. Also, try to build the RI documentation.
386-
#
387-
def build_rdoc(files)
388-
return unless $haverdoc
389-
begin
390-
r = RDoc::RDoc.new
391-
r.document(["--main", "README", "--title", "Puppet -- Site Configuration Management", "--line-numbers"] + files)
392-
rescue RDoc::RDocError => e
393-
$stderr.puts e.message
394-
rescue Exception => e
395-
$stderr.puts "Couldn't build RDoc documentation\n#{e.message}"
396-
end
397-
end
398-
399-
def build_ri(files)
400-
return unless $haverdoc
401-
return if $osname == "windows"
402-
begin
403-
ri = RDoc::RDoc.new
404-
#ri.document(["--ri-site", "--merge"] + files)
405-
ri.document(["--ri-site"] + files)
406-
rescue RDoc::RDocError => e
407-
$stderr.puts e.message
408-
rescue Exception => e
409-
$stderr.puts "Couldn't build Ri documentation\n#{e.message}"
410-
$stderr.puts "Continuing with install..."
411-
end
412-
end
413-
414354
##
415355
# Install file(s) from ./bin to RbConfig::CONFIG['bindir']. Patch it on the way
416356
# to insert a #! line; on a Unix install, the command is named as expected
@@ -476,8 +416,6 @@ def install_binfile(from, op_file, target)
476416
# Set these values to what you want installed.
477417
configs = glob(%w{conf/puppet.conf conf/hiera.yaml})
478418
bins = glob(%w{bin/*})
479-
#rdoc = glob(%w{bin/* lib/**/*.rb README* }).reject { |e| e=~ /\.(bat|cmd)$/ }
480-
#ri = glob(%w{bin/*.rb lib/**/*.rb}).reject { |e| e=~ /\.(bat|cmd)$/ }
481419
man = glob(%w{man/man[0-9]/*})
482420
libs = glob(%w{lib/**/*})
483421
locales = glob(%w{locales/**/*})
@@ -488,8 +426,6 @@ def install_binfile(from, op_file, target)
488426
windows_bins = glob(%w{ext/windows/*bat})
489427
end
490428

491-
#build_rdoc(rdoc) if InstallOptions.rdoc
492-
#build_ri(ri) if InstallOptions.ri
493429
do_configs(configs, InstallOptions.config_dir) if InstallOptions.configs
494430
do_bins(bins, InstallOptions.bin_dir)
495431
do_bins(windows_bins, InstallOptions.bin_dir, 'ext/windows/') if $osname == "windows" && InstallOptions.batch_files

0 commit comments

Comments
 (0)