Sha256: 457f5eddd5004c156fb440d936c55269584992e03429fc6870e9ea2643d5bee8
Contents?: true
Size: 916 Bytes
Versions: 1
Compression:
Stored size: 916 Bytes
Contents
# -*- ruby -*- require 'rake' def get_base(f) f.sub(File.dirname(__FILE__)+"/../examples/","").gsub("/","_").gsub(".rb","") end directory "examples" EXAMPLES=Dir.glob(File.dirname(__FILE__)+"/../examples/**/*.rb").map {|v| [v,get_base(v)] }.find_all{|v| !v[0].include?"_data"} EXAMPLES_BASE=EXAMPLES.map {|v| v[1]} task :build_site do ruby "build_site.rb" end task :default=>["index.html"]+EXAMPLES_BASE.map {|v| "examples/#{v}.html"} file "index.html"=>["index.haml", :build_site]+EXAMPLES_BASE.map {|v| "examples/#{v}.png"} EXAMPLES.each do |v| e=v[1] file "examples/#{e}.html"=>["examples.haml", :build_site, v[0]] file "examples/#{e}.svg"=>[v[0]] do |t| system "ruby1.9 #{v[0]} > #{t.name}" end file "examples/#{e}.png"=>"examples/#{e}.svg" do |t| system "rsvg -w 200 -h 200 -f png examples/#{e}.svg #{t.name}" end end load 'upload_task.rb' if File.exists? "upload_task.rb"
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rubyvis-0.1.6 | web/Rakefile |