Permalink
Browse files

Add sdoc as a proper dependency; clean up its rake task

  • Loading branch information...
1 parent dfe50fe commit 1550dacf6137d841baa5205e1c67c0b7fe72fdbf @chrisk committed May 14, 2013
Showing with 11 additions and 15 deletions.
  1. +9 −15 Rakefile
  2. +2 −0 fakeweb.gemspec
View
@@ -59,25 +59,19 @@ task :default => :test
desc "Remove build/test/release artifacts"
task :clean do
- paths = %w(.rbx/ coverage/ Gemfile.lock log/ pkg/)
+ paths = %w(.rbx/ coverage/ doc/ Gemfile.lock log/ pkg/)
paths.each do |path|
rm_rf File.join(File.dirname(__FILE__), path)
end
end
-begin
- require 'sdoc'
- require 'rdoc/task'
- Rake::RDocTask.new do |rdoc|
- rdoc.main = "README.rdoc"
- rdoc.rdoc_files.include("README.rdoc", "CHANGELOG", "LICENSE.txt", "lib/*.rb")
- rdoc.title = "FakeWeb 1.3.0 API Documentation"
- rdoc.rdoc_dir = "doc"
- rdoc.template = "sdoc"
- rdoc.options << "--format" << "sdoc"
- rdoc.options << "--line-numbers" << "--show-hash" << "--charset=utf-8"
- end
-rescue LoadError
- warn "SDoc (or a dependency) not available. Install it with: gem install sdoc"
+require 'sdoc'
+require 'rdoc/task'
+Rake::RDocTask.new do |rdoc|
+ rdoc.title = "FakeWeb 1.3.0 API Documentation"
+ rdoc.main = "README.rdoc"
+ rdoc.rdoc_dir = "doc"
+ rdoc.options += %w(--format sdoc --show-hash --charset utf-8 --github)
+ rdoc.rdoc_files.include("README.rdoc", "CHANGELOG", "LICENSE.txt", "lib/*.rb")
end
View
@@ -50,6 +50,8 @@ Gem::Specification.new do |s|
s.add_development_dependency "ZenTest", ["~> 4.9"]
end
+ s.add_development_dependency "sdoc"
+
if RUBY_VERSION >= "1.9.0"
s.add_development_dependency "simplecov", ["~> 0.7"]
s.add_development_dependency "simplecov-console", ["~> 0.1"]

0 comments on commit 1550dac

Please sign in to comment.