Skip to content

Commit

Permalink
Fixes #34563 - Drop rdoc from test dependencies
Browse files Browse the repository at this point in the history
By allowing the Rakefile to gracefully handle rdoc's absense it can be
dropped from the test dependencies.
  • Loading branch information
ekohl authored and lzap committed Mar 7, 2022
1 parent b22a681 commit 392f044
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
21 changes: 13 additions & 8 deletions Rakefile
@@ -1,6 +1,5 @@
require 'rake'
require 'rake/testtask'
require 'rdoc/task'
require 'fileutils'
require 'tmpdir'
require File.join(__dir__, 'extra/migrate_settings')
Expand All @@ -22,13 +21,19 @@ Rake::TestTask.new(:test) do |t|
t.ruby_opts = ["-W1"]
end

desc 'Generate documentation for the Foreman Proxy plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'Proxy'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README.md')
rdoc.rdoc_files.include('lib/**/*.rb')
begin
require 'rdoc/task'
rescue LoadError
# No rdoc
else
desc 'Generate documentation for the Foreman Proxy plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'Proxy'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README.md')
rdoc.rdoc_files.include('lib/**/*.rb')
end
end

desc 'Migrate configuration settings.'
Expand Down
1 change: 0 additions & 1 deletion bundler.d/test.rb
Expand Up @@ -7,7 +7,6 @@
gem 'rubocop', '~> 0.80.0'
gem 'rubocop-performance', '~> 1.5.2'
gem 'rack-test'
gem 'rdoc'
gem 'rake'
gem 'rubocop-checkstyle_formatter', '~> 0.2'
gem 'webmock'
Expand Down

0 comments on commit 392f044

Please sign in to comment.