synvert-core 0.61.1 → 0.61.2

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: f2496379cf2e2ab4bfd7df1466e0780965830a34601ce0e4dce0a8d23975e9a9
4
- data.tar.gz: a59a23e473d98e05415aeb053202a4334e0527c6055b9f5f32415c0e29b3224c
3
+ metadata.gz: 7f5de89db1e920d9a0f1f55543f5e68121daaadec9c28558438561a303e1ef52
4
+ data.tar.gz: b7b491df1978ab9a628b4230753332044b1fe6d4fd53426b80d4047c3da9fbf7
5
5
  SHA512:
6
- metadata.gz: 90a027ececec24e20efd6f9e35517e1557393f2f3d1831da52cac012cc953d1f387ab1cdbba779f559f48e73643d8774013b418da40d3c3ae5f33b8a361d4edc
7
- data.tar.gz: ffa1b43ec24296c9fd3f0b684b25f80de7459f0007dd3fb157df899ecc6610b4f22a83624ad2fc5da964a685bcaef3c697e28dade547587816b4d1b010b05149
6
+ metadata.gz: 0b5957ba9a2812b7efeb224d0aa8776cdde9c664f35a35b1247e2445fe294c2c803c83eb4d6b4c7be4bde98ea0a196982ac7ae8974fc3c90874bf396b15d7d1c
7
+ data.tar.gz: e8d838167caff111711f4fc61cb431b52eb53817a268f65c920f915e31c6a0fb785f1bbaa43f43210657b2c93db7d33656f4c9338e887d5f0afdc1a004eb7167
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.61.2 (2021-12-21)
4
+
5
+ * Restrict activesupport version to ~> 6
6
+
3
7
  ## 0.61.1 (2021-12-12)
4
8
 
5
9
  * Fix prepend action for def and defs nodes
@@ -81,11 +81,10 @@ module Synvert::Core
81
81
  def fetch(group, name)
82
82
  group = group.to_s
83
83
  name = name.to_s
84
- if rewriters[group] && rewriters[group][name]
85
- rewriters[group][name]
86
- else
87
- raise RewriterNotFound, "Rewriter #{group} #{name} not found"
88
- end
84
+ rewriter = rewriters.dig(group, name)
85
+ raise RewriterNotFound, "Rewriter #{group} #{name} not found" unless rewriter
86
+
87
+ rewriter
89
88
  end
90
89
 
91
90
  # Get a registered rewriter by group and name, then process that rewriter.
@@ -166,9 +165,8 @@ module Synvert::Core
166
165
  def process
167
166
  @affected_files = Set.new
168
167
  instance_eval(&@block)
169
- if !@affected_files.empty? && @redo_until_no_change
170
- process
171
- end
168
+
169
+ process if !@affected_files.empty? && @redo_until_no_change # redo
172
170
  end
173
171
 
174
172
  # Process rewriter with sandbox mode.
@@ -236,9 +234,10 @@ module Synvert::Core
236
234
  def within_files(file_patterns, &block)
237
235
  return if @sandbox
238
236
 
239
- if (!@ruby_version || @ruby_version.match?) && (!@gem_spec || @gem_spec.match?)
240
- Rewriter::Instance.new(self, Array(file_patterns), &block).process
241
- end
237
+ return if @ruby_version && !@ruby_version.match?
238
+ return if @gem_spec && !@gem_spec.match?
239
+
240
+ Rewriter::Instance.new(self, Array(file_patterns), &block).process
242
241
  end
243
242
 
244
243
  # Parse within_file dsl, it finds a specifiled file.
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Synvert
4
4
  module Core
5
- VERSION = '0.61.1'
5
+ VERSION = '0.61.2'
6
6
  end
7
7
  end
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_runtime_dependency "activesupport"
22
+ spec.add_runtime_dependency "activesupport", "~> 6"
23
23
  spec.add_runtime_dependency "erubis"
24
24
  spec.add_runtime_dependency "parser"
25
25
 
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synvert-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.61.1
4
+ version: 0.61.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-12 00:00:00.000000000 Z
11
+ date: 2021-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '6'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: erubis
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -218,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
218
  - !ruby/object:Gem::Version
219
219
  version: '0'
220
220
  requirements: []
221
- rubygems_version: 3.2.22
221
+ rubygems_version: 3.2.32
222
222
  signing_key:
223
223
  specification_version: 4
224
224
  summary: convert ruby code to better syntax.