Rakefile in sanitize-rails-0.6.2 vs Rakefile in sanitize-rails-0.7.0

- old
+ new

@@ -1,40 +1,22 @@ -require 'rake' -require 'rdoc/task' - -require 'lib/sanitize/rails' - begin - require 'jeweler' - Jeweler::Tasks.new do |gemspec| - gemspec.name = 'sanitize-rails' - - gemspec.summary = 'A sanitizer bridge for Rails applications' - gemspec.authors = ['Marcello Barnaba'] - gemspec.email = 'vjt@openssl.it' - gemspec.homepage = 'http://github.com/vjt/sanitize-rails' - - gemspec.files = %w( README.md Rakefile rails/init.rb ) + Dir['lib/**/*'] - gemspec.extra_rdoc_files = %w( README.md ) - gemspec.has_rdoc = true - - gemspec.version = Sanitize::Rails::Version - gemspec.require_path = 'lib' - - gemspec.add_dependency('rails', '~> 3.0') - gemspec.add_dependency('sanitize') - end + require 'bundler/setup' rescue LoadError - puts 'Jeweler not available. Install it with: gem install jeweler' + puts 'You must `gem install bundler` and `bundle install` to run rake tasks' end -desc 'Generate the rdoc' -Rake::RDocTask.new do |rdoc| - rdoc.rdoc_files.add %w( README.md lib/**/*.rb ) +require 'rdoc/task' - rdoc.main = 'README.md' - rdoc.title = 'Sanitizer-Rails' +RDoc::Task.new(:rdoc) do |rdoc| + rdoc.rdoc_dir = 'doc' + rdoc.title = 'Sanitize-Rails' + rdoc.options << '--line-numbers' + + rdoc.rdoc_files.include 'README.md' + rdoc.rdoc_files.include 'lib/**/*.rb' end + +Bundler::GemHelper.install_tasks desc 'Will someone help write tests?' task :default do puts puts 'Can you help in writing tests? Please do :-)'