synvert-core 1.22.0 → 1.22.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/instance.rb +2 -2
- data/lib/synvert/core/version.rb +1 -1
- data/spec/synvert/core/rewriter/instance_spec.rb +4 -4
- data/synvert-core-ruby.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80a767738290801342257194e72b784fa8d1849f5a7a2098dabf5776cc33735b
|
4
|
+
data.tar.gz: 7e6a0b109c9c281a3ead5e623107c30417288dc4ca694d0bdafcd71ccac67fc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7abe8e7fbe261f1739974eb51b70cbf86a4a674bcdd8c2fcadce42962deb0a2be2532d28bdb808a211dd4e86c8bbd7150fb6d8def0ac263e9fcceba491f4b240
|
7
|
+
data.tar.gz: 906b75c024ca0464d60bdadaf8dcf761f2e18d3df2704d66423eefcf1bdf98cae57804b368358ac0838053f76fee4a36c4989f774b630489291aaf5e05933f4a
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
synvert-core (1.22.
|
4
|
+
synvert-core (1.22.1)
|
5
5
|
activesupport (< 7.0.0)
|
6
|
-
node_mutation (>= 1.
|
6
|
+
node_mutation (>= 1.13.0)
|
7
7
|
node_query (>= 1.12.0)
|
8
8
|
parallel
|
9
9
|
parser
|
@@ -49,7 +49,7 @@ GEM
|
|
49
49
|
method_source (1.0.0)
|
50
50
|
minitest (5.18.0)
|
51
51
|
nenv (0.3.0)
|
52
|
-
node_mutation (1.
|
52
|
+
node_mutation (1.13.0)
|
53
53
|
erubis
|
54
54
|
node_query (1.12.0)
|
55
55
|
notiffany (0.1.3)
|
@@ -268,7 +268,7 @@ module Synvert::Core
|
|
268
268
|
# @param to [String] where to insert, if it is nil, will insert to current node.
|
269
269
|
# @param and_comma [Boolean] insert extra comma.
|
270
270
|
def insert_after(code, to: nil, and_comma: false)
|
271
|
-
column = ' ' * NodeMutation.adapter.get_start_loc(@current_node).column
|
271
|
+
column = ' ' * NodeMutation.adapter.get_start_loc(@current_node, to).column
|
272
272
|
@current_mutation.insert(@current_node, "\n#{column}#{code}", at: 'end', to: to, and_comma: and_comma)
|
273
273
|
end
|
274
274
|
|
@@ -285,7 +285,7 @@ module Synvert::Core
|
|
285
285
|
# @param to [String] where to insert, if it is nil, will insert to current node.
|
286
286
|
# @param and_comma [Boolean] insert extra comma.
|
287
287
|
def insert_before(code, to: nil, and_comma: false)
|
288
|
-
column = ' ' * NodeMutation.adapter.get_start_loc(@current_node).column
|
288
|
+
column = ' ' * NodeMutation.adapter.get_start_loc(@current_node, to).column
|
289
289
|
@current_mutation.insert(@current_node, "#{code}\n#{column}", at: 'beginning', to: to, and_comma: and_comma)
|
290
290
|
end
|
291
291
|
|
data/lib/synvert/core/version.rb
CHANGED
@@ -155,10 +155,10 @@ module Synvert::Core
|
|
155
155
|
instance.current_node,
|
156
156
|
"\n Foobar",
|
157
157
|
at: 'end',
|
158
|
-
to:
|
158
|
+
to: 'caller',
|
159
159
|
and_comma: false
|
160
160
|
)
|
161
|
-
instance.insert_after 'Foobar'
|
161
|
+
instance.insert_after 'Foobar', to: 'caller'
|
162
162
|
end
|
163
163
|
|
164
164
|
it 'parses insert_before' do
|
@@ -169,10 +169,10 @@ module Synvert::Core
|
|
169
169
|
instance.current_node,
|
170
170
|
"Foobar\n ",
|
171
171
|
at: 'beginning',
|
172
|
-
to:
|
172
|
+
to: 'caller',
|
173
173
|
and_comma: false
|
174
174
|
)
|
175
|
-
instance.insert_before 'Foobar'
|
175
|
+
instance.insert_before 'Foobar', to: 'caller'
|
176
176
|
end
|
177
177
|
|
178
178
|
it 'parses replace_erb_stmt_with_expr' do
|
data/synvert-core-ruby.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
|
22
22
|
spec.add_runtime_dependency "activesupport", "< 7.0.0"
|
23
23
|
spec.add_runtime_dependency "node_query", ">= 1.12.0"
|
24
|
-
spec.add_runtime_dependency "node_mutation", ">= 1.
|
24
|
+
spec.add_runtime_dependency "node_mutation", ">= 1.13.0"
|
25
25
|
spec.add_runtime_dependency "parser"
|
26
26
|
spec.add_runtime_dependency "parser_node_ext", ">= 1.0.0"
|
27
27
|
spec.add_runtime_dependency "parallel"
|
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.22.
|
4
|
+
version: 1.22.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-03-
|
11
|
+
date: 2023-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.13.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.13.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: parser
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|