node_mutation 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/node_mutation/parser_adapter.rb +4 -4
- data/lib/node_mutation/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44339bec6d4624f5f7cf60b9253e701c7215f2b5bae0094b0532bf86e4c6cf91
|
4
|
+
data.tar.gz: 4878c3c9f61830b728d6ea21424588d62c039e42aa5a029b1786844a1c7b74db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d0b12e168a2a8aa7a8019484125bd0edcdb159846216de1d1822e1a75f1b47e1f57f87b5de0cb94a0ebec45e950b2f32c9349c76294ac6156d0d382be85d52e
|
7
|
+
data.tar.gz: deb03d485ddf7ca91797cafbe28526ea5e91b7f862c71173e801587d727ced13680f7ff4dc3d4f2d563e8830c52622e5ce44dc4f02d84ddc6f26f572941db6d5
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -8,7 +8,7 @@ class NodeMutation::ParserAdapter < NodeMutation::Adapter
|
|
8
8
|
def rewritten_source(node, code)
|
9
9
|
code.gsub(/{{(.+?)}}/m) do
|
10
10
|
old_code = Regexp.last_match(1)
|
11
|
-
|
11
|
+
begin
|
12
12
|
evaluated = child_node_by_name(node, old_code)
|
13
13
|
case evaluated
|
14
14
|
when Parser::AST::Node
|
@@ -38,10 +38,10 @@ class NodeMutation::ParserAdapter < NodeMutation::Adapter
|
|
38
38
|
when NilClass
|
39
39
|
'nil'
|
40
40
|
else
|
41
|
-
raise
|
41
|
+
raise "rewritten_source is not handled for #{evaluated.inspect}"
|
42
42
|
end
|
43
|
-
|
44
|
-
"
|
43
|
+
rescue StandardError => e
|
44
|
+
raise "can not parse \"#{code}\""
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: node_mutation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Huang
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|