Rakefile in sphinx-0.9.10.2043 vs Rakefile in sphinx-0.9.10.2091
- old
+ new
@@ -1,8 +1,6 @@
require 'rake'
-require 'spec/rake/spectask'
-require 'rake/rdoctask'
begin
require 'jeweler'
Jeweler::Tasks.new do |gemspec|
gemspec.name = 'sphinx'
@@ -15,22 +13,33 @@
Jeweler::GemcutterTasks.new
rescue LoadError
puts 'Jeweler not available. Install it with: sudo gem install jeweler'
end
-desc 'Default: run specs'
-task :default => :spec
+begin
+ require 'spec/rake/spectask'
-desc 'Test the sphinx plugin'
-Spec::Rake::SpecTask.new(:spec) do |t|
- t.libs << 'lib'
- t.pattern = 'spec/*_spec.rb'
+ desc 'Default: run specs'
+ task :default => :spec
+
+ desc 'Test the sphinx plugin'
+ Spec::Rake::SpecTask.new do |t|
+ t.libs << 'lib'
+ t.pattern = 'spec/*_spec.rb'
+ end
+rescue LoadError
+ puts 'RSpec not available. Install it with: sudo gem install rspec'
end
-desc 'Generate documentation for the sphinx plugin'
-Rake::RDocTask.new(:rdoc) do |rdoc|
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = 'Sphinx Client API'
- rdoc.options << '--line-numbers' << '--inline-source'
- rdoc.rdoc_files.include('README.rdoc')
- rdoc.rdoc_files.include('lib/**/*.rb')
+begin
+ require 'yard'
+ YARD::Rake::YardocTask.new(:yard) do |t|
+ t.options = ['--title', 'Sphinx Client API Documentation']
+ if ENV['PRIVATE']
+ t.options.concat ['--protected', '--private']
+ else
+ t.options << '--no-private'
+ end
+ end
+rescue LoadError
+ puts 'Yard not available. Install it with: sudo gem install yard'
end