Replace rdoc with yard

This commit is contained in:
Erik Michaels-Ober 2011-05-06 12:13:03 -07:00
parent 2e7f832b8c
commit 03ec0e6d32
4 changed files with 15 additions and 19 deletions

2
.gitignore vendored
View file

@ -1,7 +1,9 @@
*.rbc
.DS_Store
.bundle
.yardoc
Gemfile.lock
coverage
doc
pkg
rdoc

4
.yardopts Normal file
View file

@ -0,0 +1,4 @@
--markup markdown
-
HISTORY.md
LICENSE.md

View file

@ -12,24 +12,13 @@ end
task :default => :test
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
require File.expand_path('../lib/simple_oauth/version', __FILE__)
version = SimpleOAuth::Version::STRING
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "simple_oauth #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
def gemspec
@gemspec ||= begin
file = File.expand_path('../simple_oauth.gemspec', __FILE__)
eval(File.read(file), binding, file)
namespace :doc do
require 'yard'
YARD::Rake::YardocTask.new do |task|
task.files = ['README.md', 'LICENSE.md', 'lib/**/*.rb']
task.options = [
'--output-dir', 'doc/yard',
'--markup', 'markdown',
]
end
end
desc 'Validate the gemspec'
task :gemspec do
gemspec.validate
end

View file

@ -5,6 +5,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'mocha', '~> 0.9'
spec.add_development_dependency 'rake', '~> 0.8'
spec.add_development_dependency 'simplecov', '~> 0.4'
spec.add_development_dependency 'yard', '~> 0.6'
spec.authors = ['Steve Richert']
spec.description = 'Simply builds and verifies OAuth headers'
spec.email = ['steve.richert@gmail.com']