Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add generating and publish task for yardoc, mark gem as yard-based

  • Loading branch information...
commit 263496e292ab5cf0e0f45fb94e0ef733be4e03a0 1 parent 872573d
@larskanis authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 Rakefile
View
15 Rakefile
@@ -34,6 +34,7 @@ hoe = Hoe.spec 'pkcs11' do
spec_extras[:files] << 'ext/pk11_const_def.inc'
spec_extras[:files] << 'ext/pk11_thread_funcs.h'
spec_extras[:files] << 'ext/pk11_thread_funcs.c'
+ spec_extras[:has_rdoc] = 'yard'
end
ENV['RUBY_CC_VERSION'] = '1.8.6:1.9.2'
@@ -58,6 +59,20 @@ end
file 'ext/pk11_thread_funcs.c' => 'ext/pk11_thread_funcs.h'
file 'ext/pk11.h' => 'ext/pk11_thread_funcs.h'
+desc "Generate static HTML documentation with YARD"
+task :yardoc do
+ sh "yardoc"
+end
+
+desc "Publish YARD to wherever you want."
+task :publish_yard => [:yardoc] do
+ rdoc_locations = hoe.rdoc_locations
+ warn "no rdoc_location values" if rdoc_locations.empty?
+ rdoc_locations.each do |dest|
+ sh %{rsync -av --delete doc/ #{dest}}
+ end
+end
+
# RDoc-upload task for github (currently on rubyforge)
#
# require 'grancher/task'
Please sign in to comment.
Something went wrong with that request. Please try again.