summaryrefslogtreecommitdiff
path: root/rake_tasks
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2011-07-08 16:30:07 +0000
committermurphy <murphy@rubychan.de>2011-07-08 16:30:07 +0000
commit277db0fcac531d9f4776bafd05f8630a45520cac (patch)
tree47c79910ef8bf5c03aa7b98bacd48461657e18f1 /rake_tasks
parent0b46fc84bdbd80004eef0fb7e4aa25c4a073c37f (diff)
downloadcoderay-277db0fcac531d9f4776bafd05f8630a45520cac.tar.gz
minor support fixes for some Ruby engines and versions
Diffstat (limited to 'rake_tasks')
-rw-r--r--rake_tasks/documentation.rake8
-rw-r--r--rake_tasks/test.rake10
2 files changed, 14 insertions, 4 deletions
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