[guides] Add :guides namespace and :html and :kindle tasks to Rakefile

This commit is contained in:
Rafael Magana 2012-05-26 14:29:47 -05:00
parent 2c2b0beaf4
commit e6d7eeaab0
1 changed files with 25 additions and 9 deletions

View File

@ -1,11 +1,27 @@
desc 'Generate guides (for authors), use ONLY=foo to process just "foo.textile"'
task :generate_guides do
ENV["WARN_BROKEN_LINKS"] = "1" # authors can't disable this
ruby "rails_guides.rb"
end
namespace :guides do
desc 'Generate guides (for authors), use ONLY=foo to process just "foo.textile"'
task :generate => 'generate:html'
namespace :generate do
desc "Generate HTML guides"
task :html do
ENV["WARN_BROKEN_LINKS"] = "1" # authors can't disable this
ruby "rails_guides.rb"
end
desc "Generate .mobi file"
task :kindle do
ENV['KINDLE'] = '1'
Rake::Task['guides:generate:html'].invoke
end
end
# Validate guides -------------------------------------------------------------------------
desc 'Validate guides, use ONLY=foo to process just "foo.html"'
task :validate do
ruby "w3c_validator.rb"
end
# Validate guides -------------------------------------------------------------------------
desc 'Validate guides, use ONLY=foo to process just "foo.html"'
task :validate_guides do
ruby "w3c_validator.rb"
end