Rakefile in machinist-1.0.6 vs Rakefile in machinist-2.0.0.beta1

- old
+ new

@@ -1,37 +1,45 @@ +require 'rubygems' +require 'bundler' +Bundler.setup + require 'rake' +require 'rspec/core/rake_task' +require 'rake/rdoctask' begin require 'jeweler' Jeweler::Tasks.new do |gem| gem.name = "machinist" gem.summary = "Fixtures aren't fun. Machinist is." gem.email = "pete@notahat.com" gem.homepage = "http://github.com/notahat/machinist" gem.authors = ["Pete Yandell"] gem.has_rdoc = false - gem.add_development_dependency "rspec", ">= 1.2.8" end Jeweler::GemcutterTasks.new rescue LoadError - puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler" + puts "Jeweler not available. Install it with: gem install jeweler" end -require 'spec/rake/spectask' -desc 'Run the specs.' -Spec::Rake::SpecTask.new(:spec) do |spec| - spec.libs << 'lib' << 'spec' - spec.spec_files = FileList['spec/**/*_spec.rb'] -end +RSpec::Core::RakeTask.new -desc 'Run the specs with rcov.' -Spec::Rake::SpecTask.new(:rcov) do |spec| - spec.libs << 'lib' << 'spec' - spec.pattern = 'spec/**/*_spec.rb' +RSpec::Core::RakeTask.new(:rcov) do |spec| spec.rcov = true + spec.rcov_opts = ['--exclude', 'spec', '--exclude', '.rvm'] end -task :spec => :check_dependencies - desc 'Run the specs.' task :default => :spec + + +Rake::RDocTask.new(:rdoc) do |rdoc| + rdoc.rdoc_dir = 'doc' + rdoc.title = 'Machinist' + rdoc.options << '--line-numbers' << '--inline-source' + rdoc.rdoc_files.include('lib') +end + +task :notes do + system "grep -n -r 'FIXME\\|TODO' lib spec" +end