diff --git a/rack-protection/Rakefile b/rack-protection/Rakefile index 221d9eec..5bab1699 100644 --- a/rack-protection/Rakefile +++ b/rack-protection/Rakefile @@ -24,7 +24,15 @@ namespace :doc do end end - task :all => [:readmes] + task :index do + doc = File.read("README.md") + file = "doc/rack-protection-readme.md" + Dir.mkdir "doc" unless File.directory? "doc" + puts "writing #{file}" + File.open(file, "w") { |f| f << doc } + end + + task :all => [:readmes, :index] end desc "generate documentation" diff --git a/sinatra-contrib/Rakefile b/sinatra-contrib/Rakefile index 861bb7f2..dfe92354 100644 --- a/sinatra-contrib/Rakefile +++ b/sinatra-contrib/Rakefile @@ -21,7 +21,15 @@ namespace :doc do end end - task :all => [:readmes] + task :index do + doc = File.read("README.md") + file = "doc/sinatra-contrib-readme.md" + Dir.mkdir "doc" unless File.directory? "doc" + puts "writing #{file}" + File.open(file, "w") { |f| f << doc } + end + + task :all => [:readmes, :index] end desc "generate documentation"