templette 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,10 @@
1
1
  desc "Build an HTML project from template files"
2
2
  task(:build) do
3
- Templette::Generator.new(ENV['destination']).run
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"
@@ -1,5 +1,5 @@
1
1
  module Templette
2
- class TempletteError < Exception
2
+ class TempletteError < StandardError
3
3
 
4
4
  def initialize(error_source, message = nil)
5
5
  @error_source = error_source
@@ -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
- ERB.new(template.to_html, 0, "%<>").result(binding) if template
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.0
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-08-26 00:00:00 -07:00
12
+ date: 2008-09-18 00:00:00 -07:00
13
13
  default_executable: templette
14
14
  dependencies: []
15
15