From a5aa1e5eac12bc8007a4bc6af101c24bdc4a2b2e Mon Sep 17 00:00:00 2001 From: Jun Aruga Date: Fri, 2 Jun 2017 20:54:52 +0200 Subject: [PATCH] Fix errors at rake docs and whitespace. (#183) * Fix rake whitespace. Change the sed command format to run on GNU sed. * Change hanna to rdoc to generate rdoc document. Because hanna latest version 0.1.12 is using very old rake as runtime dependency. That causes install error. rdoc does not have any runtime dependency. It looks better. --- Rakefile | 6 +++--- rack-test.gemspec | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index 69f18bb7..5a0920c7 100644 --- a/Rakefile +++ b/Rakefile @@ -23,11 +23,11 @@ task :default => :spec desc "Generate RDoc" task :docs do FileUtils.rm_rf("doc") - require "rack/test" - system "hanna --title 'Rack::Test #{Rack::Test::VERSION} API Documentation'" + require "rack/test/version" + sh "rdoc --title 'Rack::Test #{Rack::Test::VERSION} API Documentation'" end desc 'Removes trailing whitespace' task :whitespace do - sh %{find . -name '*.rb' -exec sed -i '' 's/ *$//g' {} \\;} + sh %{find . -name '*.rb' -exec sed -i 's/ *$//g' {} \\;} end diff --git a/rack-test.gemspec b/rack-test.gemspec index 8d0d76ac..e43ef0f1 100644 --- a/rack-test.gemspec +++ b/rack-test.gemspec @@ -25,6 +25,7 @@ request helpers feature. s.add_development_dependency 'rake', '~> 12.0' s.add_development_dependency 'rspec', '~> 3.6' s.add_development_dependency 'sinatra', '>= 1.0', '< 3' + s.add_development_dependency 'rdoc', '~> 5.1' # Keep version < 1 to supress deprecated warning temporary. s.add_development_dependency 'codeclimate-test-reporter', '~> 0.6' # For Thorfile. Run "bundle exec thor help" to see the help.