synvert-core 1.17.0 → 1.18.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd4c09ec590b3d1bce36465a50c319c4530aa2d28c08906fa008f33e72cccc55
4
- data.tar.gz: 5591fd4d4a992ac99d5d523b958d7aa4e2caf56deaa5203dc8cf4ad537c3be32
3
+ metadata.gz: 32daaff5e515783785e74b94839328eb08fc1a0c48e6bae047079f0575bba411
4
+ data.tar.gz: fde8c7b9081f4a32e6f63e9ee9e6ced1878debf41541f822da788e26b756233f
5
5
  SHA512:
6
- metadata.gz: 5c24a6a380ad2b418639b834818100c8ebcb19255e33c78a19b99b299d2cf6ad24024a0e6d4543d205bee939f53646f3180db257cad05c96bb011334849e79ec
7
- data.tar.gz: 1025d6ebfab92f0a04d939aa57b5e2170e957fec465d7996b36abc5f4e334996f615e5cfc5b7db0b9a9ae076de2eac3108fa6e7a7446640b5de1fd4929fc48a5
6
+ metadata.gz: 8608a8c3576c5ce5f778c8547a74dfefa99ff166b0137a758972fa910cf7ffa9a7ed4642b8724c6789cf8b203cccd06315ee956451053c577c54899a299405dd
7
+ data.tar.gz: d400c921693d29c5ffded99b0874514724f29604e974aee1c69fb551c0f2cf25b09b3230bcb816fed6b1e9903965d01feb2d9912fe4fcd0d4bc86cf3df03f9f8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.18.0 (2023-02-01)
4
+
5
+ * Remove `todo` dsl
6
+ * Update `parser_node_ext` to 0.9.0
7
+
3
8
  ## 1.17.0 (2023-01-21)
4
9
 
5
10
  * Add `add_action` dsl
data/Gemfile.lock CHANGED
@@ -1,19 +1,19 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- synvert-core (1.17.0)
4
+ synvert-core (1.18.0)
5
5
  activesupport (< 7.0.0)
6
6
  erubis
7
7
  node_mutation (>= 1.8.2)
8
8
  node_query (>= 1.12.0)
9
9
  parallel
10
10
  parser
11
- parser_node_ext (>= 0.6.1)
11
+ parser_node_ext (>= 0.9.0)
12
12
 
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
- activesupport (6.1.7.1)
16
+ activesupport (6.1.7.2)
17
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
18
  i18n (>= 1.6, < 2)
19
19
  minitest (>= 5.1)
@@ -21,7 +21,7 @@ GEM
21
21
  zeitwerk (~> 2.3)
22
22
  ast (2.4.2)
23
23
  coderay (1.1.3)
24
- concurrent-ruby (1.1.10)
24
+ concurrent-ruby (1.2.0)
25
25
  diff-lcs (1.5.0)
26
26
  erubis (2.7.0)
27
27
  fakefs (1.8.0)
@@ -59,7 +59,7 @@ GEM
59
59
  parallel (1.22.1)
60
60
  parser (3.2.0.0)
61
61
  ast (~> 2.4.1)
62
- parser_node_ext (0.6.1)
62
+ parser_node_ext (0.9.0)
63
63
  parser
64
64
  pry (0.14.1)
65
65
  coderay (~> 1.1)
@@ -83,7 +83,7 @@ GEM
83
83
  rspec-support (3.10.3)
84
84
  shellany (0.0.1)
85
85
  thor (1.2.1)
86
- tzinfo (2.0.5)
86
+ tzinfo (2.0.6)
87
87
  concurrent-ruby (~> 1.0)
88
88
  zeitwerk (2.6.6)
89
89
 
data/README.md CHANGED
@@ -69,7 +69,6 @@ DSLs are as follows
69
69
  * [remove_file](https://xinminlabs.github.io/synvert-core-ruby/Synvert/Core/Rewriter.html#remove_file-instance_method) - remove a file
70
70
  * [helper_method](https://xinminlabs.github.io/synvert-core-ruby/Synvert/Core/Rewriter.html#helper_method-instance_method) - define a helper method
71
71
  * [add_snippet](https://xinminlabs.github.io/synvert-core-ruby/Synvert/Core/Rewriter.html#add_snippet-instance_method) - call another rewriter
72
- * [todo](https://xinminlabs.github.io/synvert-core-ruby/Synvert/Core/Rewriter.html#todo-instance_method) - set todo
73
72
  * [redo_until_no_change](https://xinminlabs.github.io/synvert-core-ruby/Synvert/Core/Rewriter.html#redo_until_no_change-instance_method) - run the snippet until no change
74
73
 
75
74
  Scopes:
@@ -93,7 +92,8 @@ Actions:
93
92
  * [insert_after](https://xinminlabs.github.io/synvert-core-ruby/Synvert/Core/Rewriter/Instance.html#insert_after-instance_method) - insert the code next to the current node
94
93
  * [insert_before](https://xinminlabs.github.io/synvert-core-ruby/Synvert/Core/Rewriter/Instance.html#insert_before-instance_method) - insert the code previous to the current node
95
94
  * [replace](https://xinminlabs.github.io/synvert-core-ruby/Synvert/Core/Rewriter/Instance.html#replace-instance_method) - replace the code of specified child nodes
96
- * [delete](https://xinminlabs.github.io/synvert-core-ruby/Synvert/Core/Rewriter/Instance.html#delete-instance_method) - delete the code specified child nodes
95
+ * [delete](https://xinminlabs.github.io/synvert-core-ruby/Synvert/Core/Rewriter/Instance.html#delete-instance_method) - delete the code in specified child nodes
96
+ * [remove](https://xinminlabs.github.io/synvert-core-ruby/Synvert/Core/Rewriter/Instance.html#remove-instance_method) - remove the whole code of current node
97
97
  * [wrap](https://xinminlabs.github.io/synvert-core-ruby/Synvert/Core/Rewriter/Instance.html#wrap-instance_method) - wrap the current node with code
98
98
  * [replace_with](https://xinminlabs.github.io/synvert-core-ruby/Synvert/Core/Rewriter/Instance.html#replace_with-instance_method) - replace the whole code of current node
99
99
  * [warn](https://xinminlabs.github.io/synvert-core-ruby/Synvert/Core/Rewriter/Instance.html#warn-instance_method) - warn message
@@ -330,28 +330,6 @@ module Synvert::Core
330
330
  @helpers << { name: name, block: block }
331
331
  end
332
332
 
333
- # It sets todo of the rewriter.
334
- # Or get todo.
335
- # @example
336
- # Synvert::Rewriter.new 'rails', 'upgrade_3_2_to_4_0' do
337
- # todo <<~EOS
338
- # 1. Rails 4.0 no longer supports loading plugins from vendor/plugins. You must replace any plugins by extracting them to gems and adding them to your Gemfile. If you choose not to make them gems, you can move them into, say, lib/my_plugin/* and add an appropriate initializer in config/initializers/my_plugin.rb.
339
- # 2. Make the following changes to your Gemfile.
340
- # gem 'sass-rails', '~> 4.0.0'
341
- # gem 'coffee-rails', '~> 4.0.0'
342
- # gem 'uglifier', '>= 1.3.0'
343
- # EOS
344
- # end
345
- # @param todo [String] rewriter todo.
346
- # @return [String] rewriter todo.
347
- def todo(todo = nil)
348
- if todo
349
- @todo = todo
350
- else
351
- @todo
352
- end
353
- end
354
-
355
333
  # Rerun the snippet until no change.
356
334
  # @example
357
335
  # Synvert::Rewriter.new 'ruby', 'nested_class_definition' do
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Synvert
4
4
  module Core
5
- VERSION = '1.17.0'
5
+ VERSION = '1.18.0'
6
6
  end
7
7
  end
@@ -256,15 +256,6 @@ module Synvert::Core
256
256
  expect(instance.dynamic_helper('arg1', 'arg2')).to eq 'dynamic result'
257
257
  end
258
258
 
259
- it 'parses todo' do
260
- rewriter =
261
- Rewriter.new 'group', 'name' do
262
- todo "this rewriter doesn't do blah blah blah"
263
- end
264
- rewriter.process
265
- expect(rewriter.todo).to eq "this rewriter doesn't do blah blah blah"
266
- end
267
-
268
259
  it 'parses redo_until_no_change' do
269
260
  rewriter =
270
261
  Rewriter.new 'group', 'name' do
@@ -24,6 +24,6 @@ Gem::Specification.new do |spec|
24
24
  spec.add_runtime_dependency "node_query", ">= 1.12.0"
25
25
  spec.add_runtime_dependency "node_mutation", ">= 1.8.2"
26
26
  spec.add_runtime_dependency "parser"
27
- spec.add_runtime_dependency "parser_node_ext", ">= 0.6.1"
27
+ spec.add_runtime_dependency "parser_node_ext", ">= 0.9.0"
28
28
  spec.add_runtime_dependency "parallel"
29
29
  end
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.17.0
4
+ version: 1.18.0
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-01-21 00:00:00.000000000 Z
11
+ date: 2023-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 0.6.1
89
+ version: 0.9.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: 0.6.1
96
+ version: 0.9.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: parallel
99
99
  requirement: !ruby/object:Gem::Requirement