Rakefile in tracksperanto-1.3.1 vs Rakefile in tracksperanto-1.4.0
- old
+ new
@@ -1,16 +1,28 @@
require 'rubygems'
-require 'hoe'
require './lib/tracksperanto'
-
-# Disable spurious warnings when running tests, ActiveMagic cannot stand -w
-Hoe::RUBY_FLAGS.replace ENV['RUBY_FLAGS'] || "-I#{%w(lib test).join(File::PATH_SEPARATOR)}" +
- (Hoe::RUBY_DEBUG ? " #{RUBY_DEBUG}" : '')
+begin
+ require 'hoe'
+ # Disable spurious warnings when running tests, ActiveMagic cannot stand -w
+ Hoe::RUBY_FLAGS.replace ENV['RUBY_FLAGS'] || "-I#{%w(lib test).join(File::PATH_SEPARATOR)}" +
+ (Hoe::RUBY_DEBUG ? " #{RUBY_DEBUG}" : '')
-Hoe.spec('tracksperanto') do | p |
- p.version = Tracksperanto::VERSION
- p.extra_deps = {"flexmock" => ">=0"}
- p.rubyforge_name = 'guerilla-di'
- p.developer('Julik Tarkhanov', 'me@julik.nl')
- p.extra_rdoc_files = p.extra_rdoc_files.reject{|e| e =~ "samples\/"}
+ Hoe.spec('tracksperanto') do | p |
+ p.version = Tracksperanto::VERSION
+ p.extra_deps = {"flexmock" => ">=0"}
+ p.rubyforge_name = 'guerilla-di'
+ p.developer('Julik Tarkhanov', 'me@julik.nl')
+ p.extra_rdoc_files = p.extra_rdoc_files.reject{|e| e =~ "samples\/"}
+ end
+rescue LoadError
+ $stderr.puts "Meta-operations on this package require Hoe"
+ task :default => [ :test ]
+
+ require 'rake/testtask'
+ desc "Run all tests (requires BlueCloth, RedCloth and Rails for integration tests)"
+ Rake::TestTask.new("test") do |t|
+ t.libs << "test"
+ t.pattern = 'test/**/test_*.rb'
+ t.verbose = true
+ end
end
\ No newline at end of file