ice 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ice/cubeable.rb +6 -2
- data/lib/ice/eco_template/base.rb +12 -12
- metadata +2 -2
data/lib/ice/cubeable.rb
CHANGED
@@ -10,8 +10,12 @@ module Ice
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def to_ice
|
13
|
-
|
14
|
-
|
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
|
-
|
11
|
-
|
10
|
+
context = V8::Context.new
|
11
|
+
context.eval(open "#{File.dirname(__FILE__)}/../../../js/lib/path-helper.js")
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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
|
-
|
21
|
-
|
22
|
-
|
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
|
-
|
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.
|
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-
|
13
|
+
date: 2011-06-29 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|