Permalink
Browse files

Always run md-ruby-eval when generating YARD

  • Loading branch information...
pitr-ch committed Feb 23, 2017
1 parent 9def842 commit ae1e138b6c854c3a42154e6e943afe1a6f310e0d
Showing with 12 additions and 14 deletions.
  1. +12 −14 tasks/update_doc.rake
View
@@ -1,6 +1,7 @@
require 'yard'
require 'md_ruby_eval'
+# TODO (pitr-ch 23-Feb-2017): find a proper place
module YARD
module Templates::Helpers
# The helper module for HTML templates.
@@ -38,23 +39,20 @@ end
root = File.expand_path File.join(File.dirname(__FILE__), '..')
-task yard: %w(yard:preprocess yard:doc)
-
-namespace :yard do
-
- YARD::Rake::YardocTask.new(:doc)
+cmd = lambda do |command|
+ puts ">> executing: #{command}"
+ puts ">> in: #{Dir.pwd}"
+ system command or raise "#{command} failed"
+end
- cmd = lambda do |command|
- puts ">> executing: #{command}"
- puts ">> in: #{Dir.pwd}"
- system command or raise "#{command} failed"
+yard_doc = YARD::Rake::YardocTask.new(:yard)
+yard_doc.before = -> do
+ Dir.chdir File.join(__dir__, '..', 'doc') do
+ cmd.call 'bundle exec md-ruby-eval --auto' or raise
end
+end
- task :preprocess do
- Dir.chdir File.join(__dir__, '..', 'doc') do
- cmd.call 'bundle exec md-ruby-eval --auto' or raise
- end
- end
+namespace :yard do
desc 'Pushes generated documentation to github pages: http://ruby-concurrency.github.io/concurrent-ruby/'
task :push => [:setup, :yard] do

0 comments on commit ae1e138

Please sign in to comment.