Rakefile in fake_arel-0.9.9 vs Rakefile in fake_arel-1.0.0.a

- old
+ new

@@ -1,24 +1,54 @@ -require 'rubygems' -gem 'hoe', '>= 2.1.0' -require 'hoe' -require 'fileutils' -require './lib/fake_arel' - -Hoe.plugin :newgem -# Hoe.plugin :website -# Hoe.plugin :cucumberfeatures - -# Generate all the Rake tasks -# Run 'rake -T' to see list of generated tasks (from gem root directory) -$hoe = Hoe.spec 'fake_arel' do - self.developer 'Grant Ammons', 'grant@pipelinedealsco.com' - self.rubyforge_name = self.name # TODO this is default value - self.extra_deps = [['activerecord','>= 2.3.5']] -end - -require 'newgem/tasks' -Dir['tasks/**/*.rake'].each { |t| load t } - -# TODO - want other tests/tasks run by default? Add them to the list -remove_task :default -task :default => :spec +# encoding: utf-8 + +require 'rubygems' +require 'bundler' +begin + Bundler.setup(:default, :development) +rescue Bundler::BundlerError => e + $stderr.puts e.message + $stderr.puts "Run `bundle install` to install missing gems" + exit e.status_code +end +require 'rake' + +require 'jeweler' +Jeweler::Tasks.new do |gem| + # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options + gem.name = "fake_arel" + gem.homepage = "http://github.com/gammons/fake_arel" + gem.license = "MIT" + gem.summary = %Q{fake_arel: a Rails 3 query interface to Rails 2} + gem.description = %Q{fake_arel will simulate rails 3 arel syntax for Rails 2.} + gem.email = "grant@pipelinedealsco.com" + gem.authors = ["Grant Ammons"] + # dependencies defined in Gemfile +end +Jeweler::RubygemsDotOrgTasks.new + +require 'rake/testtask' +Rake::TestTask.new(:test) do |test| + test.libs << 'lib' << 'test' + test.pattern = 'test/**/test_*.rb' + test.verbose = true +end + +require 'rcov/rcovtask' +Rcov::RcovTask.new do |test| + test.libs << 'test' + test.pattern = 'test/**/test_*.rb' + test.verbose = true + test.rcov_opts << '--exclude "gems/*"' +end + +Dir['tasks/**/*.rake'].each { |t| load t } +task :default => :spec + +require 'rake/rdoctask' +Rake::RDocTask.new do |rdoc| + version = File.exist?('VERSION') ? File.read('VERSION') : "" + + rdoc.rdoc_dir = 'rdoc' + rdoc.title = "fake_arel_2 #{version}" + rdoc.rdoc_files.include('README*') + rdoc.rdoc_files.include('lib/**/*.rb') +end