lib/ztk/rake/docs.rb in ztk-3.1.0 vs lib/ztk/rake/docs.rb in ztk-3.2.0
- old
+ new
@@ -1,16 +1,17 @@
+require 'redcarpet'
require 'yard'
require 'yard/rake/yardoc_task'
GEM_NAME = (ENV['GEM_NAME'] || File.basename(Dir.pwd))
VENDOR_PATH = File.expand_path(File.join(Dir.pwd, "vendor"))
DOC_PATH = File.join(VENDOR_PATH, "docs")
namespace :docs do
YARD::Rake::YardocTask.new(:generate) do |t|
- t.options = ['--verbose', '-o', DOC_PATH]
+ t.options = ['--markup-provider=redcarpet', '--markup=markdown', '--verbose', '-o', DOC_PATH]
end
namespace :ghpages do
desc "Clone GitHub pages under vendor"
@@ -38,11 +39,12 @@
commit_message = Array.new
commit_message << "Generated YARD Documentation for #{GEM_NAME.upcase.inspect} #{describe}\n\n"
commit_message << stats
Dir.chdir(DOC_PATH) do
+ FileUtils.touch('.nojekyll')
system(%(git add -Av))
- system(%(git commit -m"#{commit_message.join}"))
+ system(%(git commit -S -m"#{commit_message.join}"))
system(%(git push origin gh-pages))
end
end
end