Rakefile in sphinx-0.9.9.2117 vs Rakefile in sphinx-0.9.10
- old
+ new
@@ -1,6 +1,8 @@
require 'rake'
+require 'spec/rake/spectask'
+require 'rake/rdoctask'
begin
require 'jeweler'
Jeweler::Tasks.new do |gemspec|
gemspec.name = 'sphinx'
@@ -13,33 +15,22 @@
Jeweler::GemcutterTasks.new
rescue LoadError
puts 'Jeweler not available. Install it with: sudo gem install jeweler'
end
-begin
- require 'spec/rake/spectask'
+desc 'Default: run specs'
+task :default => :spec
- 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'
+desc 'Test the sphinx plugin'
+Spec::Rake::SpecTask.new(:spec) do |t|
+ t.libs << 'lib'
+ t.pattern = 'spec/*_spec.rb'
end
-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'
+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_files.include('lib/**/*.rb')
end