require 'rubygems' require 'rake' begin require 'jeweler' Jeweler::Tasks.new do |gem| gem.name = "provisional" gem.summary = "Automation for new Rails Projects" gem.description = "Provisional creates a new Rails project, using a standard Rails 2.3 application template, and checks it into a new SCM repository." gem.email = "mark@viget.com" gem.homepage = "http://github.com/vigetlabs/provisional" gem.authors = ["Mark Cornick"] gem.rubyforge_project = "viget" gem.add_dependency 'trollop', '>= 1.10.2' gem.add_dependency 'rails', '>= 2.3.0' gem.add_dependency 'git', '>= 1.0.5' gem.add_dependency 'builder', '>= 2.1.2' # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings end Jeweler::RubyforgeTasks.new do |rubyforge| rubyforge.doc_task = "yardoc" end rescue LoadError puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler" end require 'rake/testtask' Rake::TestTask.new(:test) do |test| test.libs << 'lib' << 'test' test.pattern = 'test/**/*_test.rb' test.verbose = true end begin require 'rcov/rcovtask' Rcov::RcovTask.new do |test| test.libs << 'test' test.pattern = 'test/**/*_test.rb' test.verbose = true test.rcov_opts << '-x gems' end rescue LoadError task :rcov do abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov" end end begin require 'reek/rake_task' Reek::RakeTask.new do |t| t.fail_on_error = true t.verbose = false t.source_files = 'lib/**/*.rb' end rescue LoadError task :reek do abort "Reek is not available. In order to run reek, you must: sudo gem install reek" end end begin require 'roodi' require 'roodi_task' RoodiTask.new do |t| t.verbose = false end rescue LoadError task :roodi do abort "Roodi is not available. In order to run roodi, you must: sudo gem install roodi" end end task :default => :test begin require 'yard' YARD::Rake::YardocTask.new rescue LoadError task :yardoc do abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov" end end