Rakefile 685 B

123456789101112131415161718192021222324252627282930313233
  1. require "rubygems"
  2. require 'rspec/core'
  3. require "rspec/core/rake_task"
  4. RSpec::Core::RakeTask.new do |t|
  5. t.pattern = "./**/*_spec.rb"
  6. t.ruby_opts = "-w"
  7. end
  8. task :default => :spec
  9. # desc "Run all specs in spec directory with RCov"
  10. # RSpec::Core::RakeTask.new(:rcov) do |t|
  11. # t.libs << 'lib'
  12. # t.libs << 'spec'
  13. # t.warning = true
  14. # t.rcov = true
  15. # t.rcov_opts = ['-x spec']
  16. # end
  17. desc "Generate RDoc"
  18. task :docs do
  19. FileUtils.rm_rf("doc")
  20. require "rack/test"
  21. system "hanna --title 'Rack::Test #{Rack::Test::VERSION} API Documentation'"
  22. end
  23. desc 'Removes trailing whitespace'
  24. task :whitespace do
  25. sh %{find . -name '*.rb' -exec sed -i '' 's/ *$//g' {} \\;}
  26. end