2828
2929def readme ( pattern = "%s" , &block )
3030 return readme ( pattern ) . each ( &block ) if block_given?
31- %w[ en de es fr hu ja zh ru ko pt-br pt-pt ] . map do |lang |
32- pattern % "README#{ lang == "en" ? "" : ".#{ lang } " } "
31+
32+ %w[
33+ README
34+ ] . map do |extension |
35+ pattern % extension
3336 end
3437end
3538
@@ -126,13 +129,13 @@ task :pull => ['pull:sinatra']
126129
127130directory "_sinatra" do
128131 puts 'Cloning sinatra repo'
129- sh "git clone git:// github.com/ sinatra/sinatra.git _sinatra"
132+ sh "git clone git@ github.com: sinatra/sinatra.git _sinatra"
130133end
131134
132135desc 'Pull in the latest from the sinatra repo'
133136task 'pull:sinatra' => "_sinatra" do
134137 puts 'Pulling sinatra.git'
135- sh "cd _sinatra && git pull &>/dev/null"
138+ sh "cd _sinatra && git pull &>/dev/null || true "
136139end
137140
138141readme ( "_sinatra/%s.md" ) { |fn | file fn => '_sinatra' }
@@ -193,7 +196,7 @@ protection do |fn|
193196 file_to_convert = File . read ( path_to_file + ".md" )
194197 end
195198
196- html = RDoc ::Markup ::ToHtml . new . convert ( file_to_convert )
199+ html = RDoc ::Markup ::ToHtml . new ( RDoc :: Options . new ) . convert ( file_to_convert )
197200 File . open ( f . name , 'wb' ) { |io | io . write html }
198201 end
199202end
@@ -216,7 +219,7 @@ contrib do |fn|
216219 file_to_convert = File . read ( path_to_file + ".md" )
217220 end
218221
219- html = RDoc ::Markup ::ToHtml . new . convert ( file_to_convert )
222+ html = RDoc ::Markup ::ToHtml . new ( RDoc :: Options . new ) . convert ( file_to_convert )
220223 File . open ( f . name , 'wb' ) { |io | io . write html }
221224 end
222225end
@@ -234,5 +237,5 @@ task :server do
234237 exec 'jekyll serve --watch'
235238end
236239
237- CLEAN . include '_site' , "_includes/*.html"
240+ CLEAN . include ( '_site' , "_includes/*.html" ) . exclude ( '_includes/navbar.html' , '_includes/head.html' )
238241CLOBBER . include "_sinatra/sinatra-contrib" , "_sinatra/rack-protection" , "_sinatra"
0 commit comments