tasks/website.rake in capitate-0.1.8 vs tasks/website.rake in capitate-0.1.9
- old
+ new
@@ -1,18 +1,15 @@
desc 'Generate website files'
task :website_generate => :ruby_env do
- (Dir['website/**/*.txt'] - Dir['website/version*.txt']).each do |txt|
- sh %{ #{RUBY_APP} script/txt2html #{txt} > #{txt.gsub(/txt$/,'html')} }
- end
+ template = File.join(File.dirname(__FILE__), '/../website/template.rhtml')
+ sh %{ #{RUBY_APP} script/txt2html "website/**/*.txt" #{template} website }
# Clean and re-create
FileUtils.rm_rf("website/recipes")
FileUtils.mkdir_p("website/recipes")
sh "cap docs:recipes"
template = File.join(File.dirname(__FILE__), '/../website/template_recipe.rhtml')
- Dir['docs/recipes/**/*.txt'].each do |txt|
- sh %{ #{RUBY_APP} script/txt2html #{txt} #{template} > website/recipes/#{txt.split("/").last.gsub(/txt$/,'html')} }
- end
+ sh %{ #{RUBY_APP} script/txt2html "docs/recipes/**/*.txt" #{template} website/recipes }
end
desc 'Upload website files to rubyforge'
task :website_upload do
host = "#{rubyforge_username}@rubyforge.org"