web/build_site.rb in rubyvis-0.2.0 vs web/build_site.rb in rubyvis-0.2.1
- old
+ new
@@ -19,11 +19,12 @@
# Store prev and next element
pages={}
prev_page=nil
next_page=nil
-Dir.glob(File.dirname(__FILE__)+"/../examples/**/*.rb") do |f|
+files=Dir.glob(File.dirname(__FILE__)+"/../examples/**/*.rb").sort{|a,b| puts "#{a}, #{b}"; a<=>b}
+files.each do |f|
next if f.include? "_data.rb"
fn=get_base(f)
unless prev_page.nil?
pages[prev_page].next_ex = fn
@@ -82,10 +83,10 @@
page.svg_width=width.to_f.ceil
page.svg_height=height.to_f.ceil
end
-pages.each do |name,page|
+pages.each do |name, page|
html_file="examples/#{page.name}.html"
File.open(html_file,"w") {|fp|
fp.write(haml_template.render(page, :pages=>pages))
}