Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added initial Rakefile

  • Loading branch information...
commit 07182ffa8d3b532307cc4eb50405a2b63a87fe64 1 parent c91275c
@clbustos authored
Showing with 40 additions and 0 deletions.
  1. +1 −0  .gitignore
  2. +39 −0 web/Rakefile
View
1  .gitignore
@@ -6,3 +6,4 @@ doc
.yardoc
examples/images/*
examples/*.html
+web/upload_task.rb
View
39 web/Rakefile
@@ -0,0 +1,39 @@
+# -*- ruby -*-
+require 'rake'
+require 'fileutils'
+directory "examples"
+
+def get_base(f)
+ f.sub(File.dirname(__FILE__)+"/../examples/","").gsub("/","_").gsub(".rb","")
+end
+
+
+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]}
+
+
+desc "Build all html, rtf and pdf files"
+task :build_site do
+ ruby "build_site.rb"
+end
+
+
+task :clean do
+ Dir.glob(File.dirname(__FILE__)+"/examples/*.pdf").each do |t|
+ FileUtils.rm t
+ end
+ Dir.glob(File.dirname(__FILE__)+"/examples/*.html").each do |t|
+ FileUtils.rm t
+ end
+ Dir.glob(File.dirname(__FILE__)+"/examples/*.rtf").each do |t|
+ FileUtils.rm t
+ end
+ Dir.glob(File.dirname(__FILE__)+"/examples/images/*.*").each do |t|
+ FileUtils.rm t
+ end
+end
+
+
+load 'upload_task.rb' if File.exists? "upload_task.rb"
Please sign in to comment.
Something went wrong with that request. Please try again.