Resolved deprecation issues with RDoc task.
This commit is contained in:
parent
8b6a103bbf
commit
a989f9ad51
|
@ -1,12 +1,19 @@
|
||||||
require 'rake/rdoctask'
|
require 'rubygems'
|
||||||
|
begin
|
||||||
|
# We prefer to use the RDoc gem over the site version.
|
||||||
|
gem 'rdoc'
|
||||||
|
rescue Gem::LoadError
|
||||||
|
end unless defined?(RDoc)
|
||||||
|
|
||||||
|
require 'rdoc/task'
|
||||||
|
|
||||||
namespace :doc do
|
namespace :doc do
|
||||||
desc 'Generate RDoc documentation'
|
desc 'Generate RDoc documentation'
|
||||||
Rake::RDocTask.new do |rdoc|
|
RDoc::Task.new do |rdoc|
|
||||||
rdoc.rdoc_dir = 'doc'
|
rdoc.rdoc_dir = 'doc'
|
||||||
rdoc.title = "#{PKG_NAME}-#{PKG_VERSION} Documentation"
|
rdoc.title = "#{PKG_NAME}-#{PKG_VERSION} Documentation"
|
||||||
rdoc.options << '--line-numbers' << '--inline-source' <<
|
rdoc.options << '--line-numbers' << 'cattr_accessor=object' <<
|
||||||
'--accessor' << 'cattr_accessor=object' << '--charset' << 'utf-8'
|
'--charset' << 'utf-8'
|
||||||
rdoc.template = "#{ENV['template']}.rb" if ENV['template']
|
rdoc.template = "#{ENV['template']}.rb" if ENV['template']
|
||||||
rdoc.rdoc_files.include('README.md', 'CHANGELOG', 'LICENSE')
|
rdoc.rdoc_files.include('README.md', 'CHANGELOG', 'LICENSE')
|
||||||
rdoc.rdoc_files.include('lib/**/*.rb')
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
||||||
|
|
Loading…
Reference in New Issue