Permalink
Browse files

Version bump to 0.0.2

  • Loading branch information...
1 parent 5224257 commit 53c28bbc08a6cf3595bea52b3e508e1147b4ac88 @akiradeveloper committed Apr 9, 2012
Showing with 24 additions and 6 deletions.
  1. +1 −1 VERSION
  2. +11 −2 lib/internal/erbt.rb
  3. +12 −3 test/Rakefile
View
@@ -1 +1 @@
-0.0.1
+0.0.2
View
@@ -1,4 +1,4 @@
-def erbt(path)
+def __erbt(path)
path = File.expand_path(path)
`touch #{path}`
template = path + '.template'
@@ -17,6 +17,15 @@ def erbt(path)
f.close
end
+def erbt(path)
+ path = File.expand_path(path)
+ file path => [path + '.template'] do
+ __erbt(path)
+ end
+ desc("erbt all")
+ task 'erbt' => [path]
+end
+
if __FILE__ == $0
- erbt('test1')
+ __erbt('test1')
end
View
@@ -1,10 +1,19 @@
require 'erbt'
+desc "test"
task 'test' do
- erbt("test1")
+ __erbt("test1")
print File.read("test1")
- erbt("test1")
+ __erbt("test1")
`echo "" > test1`
- erbt("test1")
+ __erbt("test1")
print File.read("test1")
end
+
+erbt "test1"
+
+desc "clean"
+task 'clean' do
+ `rm test1`
+ `rm test1.backup`
+end

0 comments on commit 53c28bb

Please sign in to comment.