From 277db0fcac531d9f4776bafd05f8630a45520cac Mon Sep 17 00:00:00 2001 From: murphy Date: Fri, 8 Jul 2011 16:30:07 +0000 Subject: minor support fixes for some Ruby engines and versions --- rake_tasks/documentation.rake | 8 ++++++-- rake_tasks/test.rake | 10 ++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'rake_tasks') diff --git a/rake_tasks/documentation.rake b/rake_tasks/documentation.rake index 16142fd..796e281 100644 --- a/rake_tasks/documentation.rake +++ b/rake_tasks/documentation.rake @@ -1,5 +1,9 @@ -gem 'rdoc' if defined? gem -require 'rdoc/task' +if RUBY_VERSION >= '1.8.7' + gem 'rdoc' if defined? gem + require 'rdoc/task' +else + require 'rake/rdoctask' +end desc 'Generate documentation for CodeRay' Rake::RDocTask.new :doc do |rd| diff --git a/rake_tasks/test.rake b/rake_tasks/test.rake index 203bbf6..1140062 100644 --- a/rake_tasks/test.rake +++ b/rake_tasks/test.rake @@ -52,10 +52,16 @@ namespace :test do desc 'test the CodeRay executable' task :exe do - ruby './test/executable/suite.rb' + if RUBY_VERSION >= '1.8.7' + ruby './test/executable/suite.rb' + else + puts + puts "Can't run executable tests because shoulda-context requires Ruby 1.8.7+." + puts "Skipping." + end end end -task :test => %w( test:functional test:exe test:units ) +task :test => %w(test:functional test:units test:exe) task :samples => 'test:samples' \ No newline at end of file -- cgit v1.2.1