Rakefile in magiclabs-userstamp-2.1.0 vs Rakefile in magiclabs-userstamp-3.0
- old
+ new
@@ -1,9 +1,17 @@
-require 'rake'
+#!/usr/bin/env rake
+
require 'rake/testtask'
-require 'rake/rdoctask'
+begin
+ require 'rdoc/task'
+rescue LoadError
+ require 'rdoc/rdoc'
+ require 'rake/rdoctask'
+ RDoc::Task = Rake::RDocTask
+end
+
desc 'Default: run unit tests.'
task :default => :test
desc 'Test the userstamp plugin.'
Rake::TestTask.new(:test) do |t|
@@ -11,10 +19,10 @@
t.pattern = 'test/**/*_test.rb'
t.verbose = true
end
desc 'Generate documentation for the userstamp plugin.'
-Rake::RDocTask.new(:rdoc) do |rdoc|
+RDoc::Task.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'Userstamp'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('Readme.rdoc', 'CHANGELOG', 'LICENSE')
rdoc.rdoc_files.include('lib/**/*.rb')