templette 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tasks/templette_tasks.rb +5 -1
- data/lib/templette/errors.rb +1 -1
- data/lib/templette/method_collector.rb +4 -2
- metadata +2 -2
@@ -1,6 +1,10 @@
|
|
1
1
|
desc "Build an HTML project from template files"
|
2
2
|
task(:build) do
|
3
|
-
|
3
|
+
if ENV['destination']
|
4
|
+
Templette::Generator.new(ENV['destination']).run
|
5
|
+
else
|
6
|
+
Templette::Generator.new.run
|
7
|
+
end
|
4
8
|
end
|
5
9
|
|
6
10
|
desc "Remove all generated files"
|
data/lib/templette/errors.rb
CHANGED
@@ -7,9 +7,11 @@ module Templette
|
|
7
7
|
include Templette::DataAccessors
|
8
8
|
|
9
9
|
def initialize(template = nil)
|
10
|
-
include_helpers(template.helpers) if template
|
11
10
|
@methods = {}
|
12
|
-
|
11
|
+
if template
|
12
|
+
include_helpers(template.helpers)
|
13
|
+
ERB.new(template.to_html, 0, "%<>").result(binding)
|
14
|
+
end
|
13
15
|
end
|
14
16
|
|
15
17
|
def method_missing(symbol)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: templette
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jacob Dunphy and Steve Holder
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-09-18 00:00:00 -07:00
|
13
13
|
default_executable: templette
|
14
14
|
dependencies: []
|
15
15
|
|