Rakefile in nanoc-2.1.4 vs Rakefile in nanoc-2.1.5
- old
+ new
@@ -1,14 +1,33 @@
##### Requirements
+# Rake etc
require 'rake'
-
require 'rake/clean'
require 'rake/gempackagetask'
-require 'rake/rdoctask'
require 'rake/testtask'
+# Rdoc
+begin
+ require 'hanna/rdoctask'
+rescue LoadError
+ warn "Tried loading hanna but failed; falling back to the normal RDoc template"
+ require 'rake/rdoctask'
+end
+
+# nanoc itself
require File.dirname(__FILE__) + '/lib/nanoc.rb'
+
+##### Test Ruby 1.9
+
+if RUBY_VERSION >= '1.9'
+ # Check presence of vendor/mocha
+ unless File.directory?('vendor/mocha')
+ warn "You appear to be running Ruby 1.9. Please make sure that, before " +
+ "running the tests, you have a version of mocha that is " +
+ "compatible with Ruby 1.9."
+ end
+end
##### General details
NAME = 'nanoc'
VERS = Nanoc::VERSION