ice 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,8 +10,12 @@ module Ice
10
10
  end
11
11
 
12
12
  def to_ice
13
- cube_class = get_cube_class self.class
14
- cube_class.new self
13
+ begin
14
+ cube_class = get_cube_class self.class
15
+ cube_class.new self
16
+ rescue
17
+ raise "Cannot find Cube class for model that you are calling to_ice on."
18
+ end
15
19
  end
16
20
  end
17
21
  end
@@ -7,21 +7,21 @@ module Ice
7
7
 
8
8
  def self.convert_template(template_text, vars = {})
9
9
  V8::C::Locker() do
10
- context = V8::Context.new
11
- context.eval(open "#{File.dirname(__FILE__)}/../../../js/lib/path-helper.js")
10
+ context = V8::Context.new
11
+ context.eval(open "#{File.dirname(__FILE__)}/../../../js/lib/path-helper.js")
12
12
 
13
- IceJavascriptHelpers.each do |helper|
14
- context.eval(helper)
15
- end
16
- IceCoffeescriptHelpers.each do |helper|
17
- context.eval CoffeeScript.compile(helper, :bare => true)
18
- end
13
+ IceJavascriptHelpers.each do |helper|
14
+ context.eval(helper)
15
+ end
16
+ IceCoffeescriptHelpers.each do |helper|
17
+ context.eval CoffeeScript.compile(helper, :bare => true)
18
+ end
19
19
 
20
- context.eval CoffeeScript.compile(GeneratedHelpers.get_routes, :bare => true)
21
- context.eval(Eco::Source.combined_contents)
22
- template = context["eco"]["compile"].call(template_text)
20
+ context.eval CoffeeScript.compile(GeneratedHelpers.get_routes, :bare => true)
21
+ context.eval(Eco::Source.combined_contents)
22
+ template = context["eco"]["compile"].call(template_text)
23
23
 
24
- template.call(vars.to_ice)
24
+ template.call(vars.to_ice)
25
25
  end
26
26
  end
27
27
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: ice
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.3
5
+ version: 0.4.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Nate Kidwell
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-27 00:00:00 -04:00
13
+ date: 2011-06-29 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency