Rakefile in vacuum_cleaner-0.5.0 vs Rakefile in vacuum_cleaner-1.0.0

- old
+ new

@@ -1,26 +1,17 @@ require 'rake' require 'rake/testtask' require File.join(File.dirname(__FILE__), 'lib', 'vacuum_cleaner') -task :default => :test - -desc 'Test the vacuum_cleaner plugin.' -Rake::TestTask.new(:test) do |t| - t.libs << 'lib' - t.libs << 'test' - t.pattern = 'test/**/*_test.rb' - t.verbose = true -end - begin require 'yard' desc 'Generate documentation for vacuum_cleaner. (requires yard)' YARD::Rake::YardocTask.new(:doc) do |t| t.files = ['lib/**/*.rb'] t.options = [ + "--no-private", "--readme", "README.md", "--title", "vacuum_cleaner (v#{VacuumCleaner::VERSION}) API Documentation" ] end rescue LoadError @@ -40,11 +31,10 @@ gemspec.authors = ["Lukas Westermann"] gemspec.licenses = %w{LICENSE} gemspec.extra_rdoc_files = %w{README.md} gemspec.add_development_dependency('shoulda', '>= 2.10.2') - gemspec.add_development_dependency('rr', '>= 0.10.5') gemspec.add_development_dependency('activesupport', '>= 2.3.5') gemspec.files.reject! { |file| file =~ /\.gemspec$/ } # kinda redundant end Jeweler::GemcutterTasks.new @@ -56,9 +46,27 @@ task :clean do |t| FileUtils.rm_rf "doc" FileUtils.rm_rf "pkg" FileUtils.rm_rf ".yardoc" end + +namespace :test do + desc 'Test the vacuum_cleaner plugin.' + Rake::TestTask.new(:unit) do |t| + t.libs << 'test' + t.pattern = 'test/unit/**/*_test.rb' + t.verbose = true + end + + desc 'Run integration tests for the vacuum_cleaner plugin.' + Rake::TestTask.new(:integration) do |t| + t.libs << 'test' + t.pattern = 'test/integration/**/*_test.rb' + t.verbose = true + end + + task :all => [:'test:unit', :'test:integration'] +end namespace :metrics do desc 'Report all metrics, i.e. stats and code coverage.' task :all => [:stats, :coverage]