Permalink
Browse files

guard against not being able to load rdoc tasks

  • Loading branch information...
1 parent 9a79b7b commit 12eb82d283cab148183c37c07e3f75a309969dec @bleything committed Aug 1, 2012
Showing with 19 additions and 14 deletions.
  1. +19 −14 Rakefile
View
33 Rakefile
@@ -15,7 +15,6 @@ require 'rake/testtask'
require 'rake/packagetask'
require 'rake/gempackagetask'
require 'rake/contrib/rubyforgepublisher'
-require 'rdoc/task'
$:.unshift(File.dirname(__FILE__) + "/lib")
require 'plist'
@@ -103,19 +102,25 @@ task :update_rdoc => [ :rdoc ] do
Rake::SshDirPublisher.new("#{RUBYFORGE_USER}@rubyforge.org", "/var/www/gforge-projects/#{RUBYFORGE_PROJECT}", "rdoc").upload
end
-# Genereate the RDoc documentation
-RDoc::Task.new do |rdoc|
- rdoc.title = "All-purpose Property List manipulation library"
- rdoc.main = "README.rdoc"
-
- rdoc.rdoc_dir = 'rdoc'
- rdoc.rdoc_files.include('README.rdoc', 'LICENSE', 'CHANGELOG')
- rdoc.rdoc_files.include('lib/**')
-
- rdoc.options = [
- '-H', # show hash marks on method names in comments
- '-N', # show line numbers
- ]
+begin
+ require 'rdoc/task'
+
+ # Generate the RDoc documentation
+ RDoc::Task.new do |rdoc|
+ rdoc.title = "All-purpose Property List manipulation library"
+ rdoc.main = "README.rdoc"
+
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.rdoc_files.include('README.rdoc', 'LICENSE', 'CHANGELOG')
+ rdoc.rdoc_files.include('lib/**')
+
+ rdoc.options = [
+ '-H', # show hash marks on method names in comments
+ '-N', # show line numbers
+ ]
+ end
+rescue LoadError
+ $stderr.puts "Could not load rdoc tasks"
end
# Create compressed packages

0 comments on commit 12eb82d

Please sign in to comment.