Skip to content
Browse files

Adding sdoc support

  • Loading branch information...
1 parent e8a612a commit 5c49808533bc6370f2f1bb188d5f9a9427b0b020 @spicycode spicycode committed
Showing with 11 additions and 10 deletions.
  1. +11 −10 Rakefile
View
21 Rakefile
@@ -12,7 +12,7 @@ begin
end
Jeweler::GemcutterTasks.new
rescue LoadError
- puts "Jeweler not available. Install it with: sudo gem install jeweler"
+ puts "Jeweler not available. Install it with: gem install jeweler"
end
begin
@@ -31,21 +31,22 @@ begin
task :default => [:check_dependencies, :rcov]
rescue LoadError => e
- puts "Micronaut not available to run tests. Install it with: sudo gem install spicycode-micronaut -s http://gems.github.com"
+ puts "Micronaut not available to run tests. Install it with: gem install micronaut"
puts e
puts e.backtrace
end
+begin
+ %w{sdoc sdoc-helpers rdiscount}.each { |name| gem name }
+ require 'sdoc_helpers'
+rescue LoadError => ex
+ puts "sdoc support not enabled:"
+ puts ex.inspect
+end
+
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
- if File.exist?('VERSION.yml')
- require 'yaml'
- config = YAML.load(File.read('VERSION.yml'))
- version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
- else
- version = ""
- end
-
+ version = File.exist?('VERSION') ? File.read('VERSION') : ''
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "log_buddy #{version}"
rdoc.rdoc_files.include('README*')

0 comments on commit 5c49808

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