synvert-core 1.23.0 → 1.23.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 +5 -0
- data/Gemfile.lock +3 -3
- data/lib/synvert/core/rewriter/scope/goto_scope.rb +1 -1
- data/lib/synvert/core/version.rb +1 -1
- data/spec/synvert/core/rewriter/scope/goto_scope_spec.rb +15 -1
- data/synvert-core-ruby.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 862649a82e2cd9d14454b65b9c3e146c2c6adff96a03441624cca7d83f42a8f5
|
4
|
+
data.tar.gz: 167e5ee0a3ae617888af58dd40ee582d3427012a5e0daea881f13ffd51a07b8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbf9a15e4e795edf0bedcb690b163b088ca00236545881744ef8ac004c68059cf90654d3804626e29e8b3ce4a9e3ccb3e9e7cf6d82ea05c98c941f6e59c77b8c
|
7
|
+
data.tar.gz: 916953fc304f4a2054b3722197ec0d194a958b2f502d5ea379411b1de970fc9691aaa3caf68c3458f99281a92d7c316bb084fe3deaba7af0fd03e0df7cbd31c9
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
synvert-core (1.23.
|
4
|
+
synvert-core (1.23.1)
|
5
5
|
activesupport (< 7.0.0)
|
6
6
|
node_mutation (>= 1.14.0)
|
7
|
-
node_query (>= 1.12.
|
7
|
+
node_query (>= 1.12.1)
|
8
8
|
parallel
|
9
9
|
parser
|
10
10
|
parser_node_ext (>= 1.0.0)
|
@@ -49,7 +49,7 @@ GEM
|
|
49
49
|
minitest (5.18.0)
|
50
50
|
nenv (0.3.0)
|
51
51
|
node_mutation (1.14.0)
|
52
|
-
node_query (1.12.
|
52
|
+
node_query (1.12.1)
|
53
53
|
notiffany (0.1.3)
|
54
54
|
nenv (~> 0.1)
|
55
55
|
shellany (~> 0.0)
|
@@ -20,7 +20,7 @@ module Synvert::Core
|
|
20
20
|
|
21
21
|
child_node = current_node
|
22
22
|
@child_node_name.to_s.split('.').each do |child_node_name|
|
23
|
-
child_node =
|
23
|
+
child_node = child_node.is_a?(Array) && child_node_name =~ /-?\d+/ ? child_node[child_node_name.to_i] : child_node.send(child_node_name)
|
24
24
|
end
|
25
25
|
if child_node.is_a?(Array)
|
26
26
|
child_node.each do |child_child_node|
|
data/lib/synvert/core/version.rb
CHANGED
@@ -33,7 +33,21 @@ module Synvert::Core
|
|
33
33
|
expect(instance.current_node.type).to eq :block
|
34
34
|
end
|
35
35
|
|
36
|
-
it '
|
36
|
+
it 'call block with child node in array' do
|
37
|
+
run = false
|
38
|
+
type_in_scope = nil
|
39
|
+
scope =
|
40
|
+
Rewriter::GotoScope.new instance, 'body.1' do
|
41
|
+
run = true
|
42
|
+
type_in_scope = node.type
|
43
|
+
end
|
44
|
+
scope.process
|
45
|
+
expect(run).to be_truthy
|
46
|
+
expect(type_in_scope).to eq :send
|
47
|
+
expect(instance.current_node.type).to eq :block
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'calls block multiple times with block body' do
|
37
51
|
count = 0
|
38
52
|
scope =
|
39
53
|
Rewriter::GotoScope.new instance, 'body' do
|
data/synvert-core-ruby.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
22
|
spec.add_runtime_dependency "activesupport", "< 7.0.0"
|
23
|
-
spec.add_runtime_dependency "node_query", ">= 1.12.
|
23
|
+
spec.add_runtime_dependency "node_query", ">= 1.12.1"
|
24
24
|
spec.add_runtime_dependency "node_mutation", ">= 1.14.0"
|
25
25
|
spec.add_runtime_dependency "parser"
|
26
26
|
spec.add_runtime_dependency "parser_node_ext", ">= 1.0.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: synvert-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.23.
|
4
|
+
version: 1.23.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Huang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.12.
|
33
|
+
version: 1.12.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.12.
|
40
|
+
version: 1.12.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: node_mutation
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
176
|
- !ruby/object:Gem::Version
|
177
177
|
version: '0'
|
178
178
|
requirements: []
|
179
|
-
rubygems_version: 3.4.
|
179
|
+
rubygems_version: 3.4.10
|
180
180
|
signing_key:
|
181
181
|
specification_version: 4
|
182
182
|
summary: convert ruby code to better syntax.
|