Rakefile in addresslogic-1.1.2 vs Rakefile in addresslogic-1.1.3

- old
+ new

@@ -1,20 +1,41 @@ -ENV['RDOCOPT'] = "-S -f html -T hanna" +require 'rubygems' +require 'rake' -require "rubygems" -require "hoe" -require File.dirname(__FILE__) << "/lib/addresslogic/version" +begin + require 'jeweler' + Jeweler::Tasks.new do |gem| + gem.name = "addresslogic" + gem.summary = "Creates a meaningful array of address parts for easy displaying." + gem.email = "bjohnson@binarylogic.com" + gem.homepage = "http://github.com/binarylogic/addresslogic" + gem.authors = ["Ben Johnson of Binary Logic"] + gem.rubyforge_project = "addresslogic" + end + Jeweler::RubyforgeTasks.new +rescue LoadError + puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler" +end -Hoe.new("Addresslogic", Addresslogic::Version::STRING) do |p| - p.name = "addresslogic" - p.rubyforge_name = "addresslogic" - p.author = "Ben Johnson of Binary Logic" - p.email = 'bjohnson@binarylogic.com' - p.summary = "Easily display addresses." - p.description = "Easily display addresses." - p.url = "http://github.com/binarylogic/addresslogic" - p.history_file = "CHANGELOG.rdoc" - p.readme_file = "README.rdoc" - p.extra_rdoc_files = ["CHANGELOG.rdoc", "README.rdoc"] - p.remote_rdoc_dir = '' - p.test_globs = ["test/*/test_*.rb", "test/*_test.rb", "test/*/*_test.rb"] -end \ No newline at end of file +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 + 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 + +task :test => :check_dependencies + +task :default => :test