Rakefile in euler-1.0.7 vs Rakefile in euler-1.0.8

- old
+ new

@@ -1,11 +1,54 @@ require 'rubygems' -require 'hoe' -require './lib/euler.rb' +require 'rake' -Hoe.new('euler', Euler::VERSION) do |p| - p.developer('Mike Skalnik', 'mike.skalnik@gmail.com') - p.remote_rdoc_dir = '' # Release to root - p.description = "A gem that provides a small library to help in removing the repetativeness of solving Project Euler problems." - p.summary = %q{A small library to help solve Projet Euler problems.} - p.url = "http://github.com/Oompa/euler" +begin + require 'jeweler' + Jeweler::Tasks.new do |gem| + gem.name = "euler" + gem.summary = %Q{A small library to help solve Projet Euler problems.} + gem.description = %Q{A gem that provides a small library to help in removing the repetativeness of solving Project Euler problems.} + gem.email = "mike.skalnik@gmail.com" + gem.homepage = "http://github.com/skalnik/euler" + gem.authors = ["Mike Skalnik"] + 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/tc_*.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 + +require 'rake/rdoctask' +Rake::RDocTask.new do |rdoc| + if File.exist?('VERSION') + version = File.read('VERSION') + else + version = "" + end + + rdoc.rdoc_dir = 'rdoc' + rdoc.title = "euler #{version}" + rdoc.rdoc_files.include('README*') + rdoc.rdoc_files.include('lib/**/*.rb') end