marty 1.0.34 → 1.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/marty/script.rb +13 -8
- data/lib/marty/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3adb3fc7a00a1b5f8821771a2105ae9e2788d2af
|
4
|
+
data.tar.gz: 7e9faa47b3d14a1df9dab85c206031ec4dd0452f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ac9b7eb9d94c4fd78ab1869b6ebf8bde560a4d66f59a91e0c98c53a901b45ff3f745515a0e71dc7dc5839eb483b177e84fd82536b1b2d78b3dde3bb794c3f4f
|
7
|
+
data.tar.gz: 1f82684f46cea8a2ffc0a91dfe503c1d255c3c61c0cd44c6fa4d03c025c5373308cfd93bee258163630d6e77a0b1a7fde9be72a4c6e956b29037796d499dac7a
|
data/app/models/marty/script.rb
CHANGED
@@ -126,21 +126,26 @@ class Marty::Script < Marty::Base
|
|
126
126
|
|
127
127
|
delorean_fn :eval_to_hash, sig: 5 do
|
128
128
|
|dt, script, node, attrs, params|
|
129
|
-
tag = Marty::Tag.find_match(dt)
|
129
|
+
tag = Marty::Tag.find_match(dt) || raise("no tag found for #{dt}")
|
130
130
|
|
131
|
+
engine = Marty::ScriptSet.new(tag).get_engine(script)
|
131
132
|
# IMPORTANT: engine evals (e.g. eval_to_hash) modify the
|
132
133
|
# params. So, need to clone it.
|
133
|
-
|
134
|
-
|
135
|
-
raise "no tag found for #{dt}" unless tag
|
136
|
-
|
137
|
-
engine = Marty::ScriptSet.new(tag).get_engine(script)
|
138
|
-
res = engine.eval_to_hash(node, attrs, params)
|
134
|
+
engine.eval_to_hash(node, attrs, params.clone)
|
139
135
|
|
140
136
|
# FIXME: should sanitize res to make sure that no nodes are being
|
141
137
|
# passed back. It's likely that nodes which are not from the
|
142
138
|
# current tag can caused problems.
|
143
|
-
|
139
|
+
end
|
140
|
+
|
141
|
+
delorean_fn :evaluate, sig: 5 do
|
142
|
+
|dt, script, node, attr, params|
|
143
|
+
tag = Marty::Tag.find_match(dt) || raise("no tag found for #{dt}")
|
144
|
+
|
145
|
+
engine = Marty::ScriptSet.new(tag).get_engine(script)
|
146
|
+
# IMPORTANT: engine evals (e.g. eval_to_hash) modify the
|
147
|
+
# params. So, need to clone it.
|
148
|
+
engine.evaluate(node, attr, params.clone)
|
144
149
|
end
|
145
150
|
|
146
151
|
delorean_fn :pretty_print, sig: 1 do
|
data/lib/marty/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.35
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arman Bostani
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2017-
|
17
|
+
date: 2017-08-29 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: pg
|