Permalink
Browse files

Merge branch '1.3'

  • Loading branch information...
2 parents 924bbc6 + 1ec2916 commit b3f873af1dd6ccb62d3a953566d75589b41a4b84 @rkh rkh committed Oct 1, 2011
Showing with 5,989 additions and 2,740 deletions.
  1. +1 −0 .gitignore
  2. +53 −3 Rakefile
  3. +846 −548 _includes/README.de.html
  4. +712 −455 _includes/README.es.html
  5. +892 −656 _includes/README.fr.html
  6. +667 −437 _includes/README.html
  7. +2 −2 _includes/README.hu.html
  8. +20 −3 _includes/README.jp.html
  9. +2 −2 _includes/README.pt-br.html
  10. +2 −2 _includes/README.pt-pt.html
  11. +1,505 −625 _includes/README.ru.html
  12. +24 −7 _includes/README.zh.html
  13. +106 −0 _includes/sinatra-config-file.html
  14. +63 −0 _includes/sinatra-content-for.html
  15. +58 −0 _includes/sinatra-cookies.html
  16. +43 −0 _includes/sinatra-decompile.html
  17. +50 −0 _includes/sinatra-extension.html
  18. +99 −0 _includes/sinatra-json.html
  19. +57 −0 _includes/sinatra-link-header.html
  20. +55 −0 _includes/sinatra-multi-route.html
  21. +121 −0 _includes/sinatra-namespace.html
  22. +73 −0 _includes/sinatra-reloader.html
  23. +104 −0 _includes/sinatra-respond-with.html
  24. +98 −0 _includes/sinatra-streaming.html
  25. +139 −0 _posts/2011-09-30-sinatra-1.3.0.markdown
  26. +6 −0 contrib/config_file.html
  27. +6 −0 contrib/content_for.html
  28. +6 −0 contrib/cookies.markdown
  29. +6 −0 contrib/decompile.html
  30. +6 −0 contrib/extension.markdown
  31. +116 −0 contrib/index.markdown
  32. +6 −0 contrib/json.markdown
  33. +6 −0 contrib/link_header.markdown
  34. +6 −0 contrib/multi_route.html
  35. +6 −0 contrib/namespace.markdown
  36. +6 −0 contrib/reloader.markdown
  37. +6 −0 contrib/respond_with.markdown
  38. +6 −0 contrib/streaming.markdown
  39. +9 −0 documentation.markdown
View
@@ -1,3 +1,4 @@
_site
_book
+_contrib
_sinatra
View
@@ -9,6 +9,27 @@ def readme(pattern = "%s", &block)
end
end
+def contrib(pattern = "%s", &block)
+ return contrib(pattern).each(&block) if block_given?
+
+ %w[
+ sinatra-config-file
+ sinatra-multi-route
+ sinatra-content-for
+ sinatra-namespace
+ sinatra-cookies
+ sinatra-reloader
+ sinatra-decompile
+ sinatra-respond-with
+ sinatra-extension
+ sinatra-streaming
+ sinatra-json
+ sinatra-link-header
+ ].map do |extension|
+ pattern % extension
+ end
+end
+
# generates Table of Contents
def with_toc(src)
toc = "<div class='toc'>\n"
@@ -32,7 +53,7 @@ desc "Build outdated static files and API docs"
task :build => ['build:static']
desc "Build outdated static files"
-task 'build:static' => readme("_includes/%s.html")
+task 'build:static' => readme("_includes/%s.html") + contrib("_includes/%s.html")
desc "Build anything that's outdated and stage changes for next commit"
task :regen => [:build] do
@@ -41,8 +62,8 @@ task :regen => [:build] do
puts " git commit -m 'Regen prebuilt files'"
end
-desc 'Pull in the latest from the sinatra and sinatra-book repos'
-task :pull => ['pull:sinatra']
+desc 'Pull in the latest from the sinatra and sinatra-contrib repos'
+task :pull => ['pull:sinatra', 'pull:contrib']
desc 'Pull in the latest from the sinatra repo'
task 'pull:sinatra' do
@@ -72,6 +93,35 @@ readme do |fn|
CLEAN.include "_includes/#{fn}.html"
end
+desc 'Pull in the latest from the sinatra-contrib repo'
+task 'pull:contrib' do
+ if File.directory?("_contrib")
+ puts 'Pulling sinatra-contrib.git'
+ sh "cd _contrib && git pull &>/dev/null"
+ touch '_contrib', :verbose => false
+ else
+ puts 'Cloning sinatra-contrib repo'
+ sh "git clone git://github.com/sinatra/sinatra-contrib.git _contrib"
+ end
+ puts 'Building sinatra-contrib docs'
+ sh "cd _contrib && rake doc &>/dev/null"
+end
+
+file('_contrib') { Rake::Task['pull:contrib'].invoke }
+CLOBBER.include '_contrib'
+
+contrib("_contrib/doc/%s.rdoc") { |fn| file fn => '_contrib' }
+
+contrib do |fn|
+ file "_includes/#{fn}.html" => ["_contrib/doc/#{fn}.rdoc", "Rakefile"] do |f|
+ html =
+ RDoc::Markup::ToHtml.new.
+ convert(File.read("_contrib/doc/#{fn}.rdoc"))
+ File.open(f.name, 'wb') { |io| io.write html }
+ end
+ CLEAN.include "_includes/#{fn}.html"
+end
+
desc 'Rebuild site under _site with Jekyll'
task :jekyll do
rm_rf '_site'
Oops, something went wrong.

0 comments on commit b3f873a

Please sign in to comment.