Skip to content
This repository
Browse code

Cleanup rakefile

  • Loading branch information...
commit e89b2ab7a9a5dbe3962ed6d5c1743374338f790e 1 parent 1b7c70c
James Tucker authored January 25, 2012
21  Rakefile
... ...
@@ -1,10 +1,6 @@
1  
-require 'rubygems' unless defined?(Gem)
2  
-require 'rake'     unless defined?(Rake)
3  
-import  *Dir['tasks/*.rake']
  1
+require 'rubygems'
  2
+GEMSPEC = Gem::Specification.load('eventmachine.gemspec')
4 3
 
5  
-GEMSPEC = eval(File.read(File.expand_path('../eventmachine.gemspec', __FILE__)))
6  
-
7  
-require 'yard'
8 4
 require 'rake/clean'
9 5
 task :clobber => :clean
10 6
 
@@ -12,8 +8,13 @@ desc "Build eventmachine, then run tests."
12 8
 task :default => [:compile, :test]
13 9
 
14 10
 desc 'Generate documentation'
15  
-YARD::Rake::YardocTask.new do |t|
16  
-  t.files   = ['lib/**/*.rb', '-', 'docs/*.md']
17  
-  t.options = ['--main', 'README.md', '--no-private']
18  
-  t.options = ['--exclude', 'lib/jeventmachine', '--exclude', 'lib/pr_eventmachine']
  11
+begin
  12
+  require 'yard'
  13
+  YARD::Rake::YardocTask.new do |t|
  14
+    t.files   = ['lib/**/*.rb', '-', 'docs/*.md']
  15
+    t.options = ['--main', 'README.md', '--no-private']
  16
+    t.options = ['--exclude', 'lib/jeventmachine', '--exclude', 'lib/pr_eventmachine']
  17
+  end
  18
+rescue LoadError
  19
+  task :yard do puts "Please install yard first!"; end
19 20
 end
0  tasks/cpp.rake_example → rakelib/cpp.rake_example
File renamed without changes
0  tasks/package.rake → rakelib/package.rake
File renamed without changes
0  tasks/test.rake → rakelib/test.rake
File renamed without changes

0 notes on commit e89b2ab

Please sign in to comment.
Something went wrong with that request. Please try again.