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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/synvert/core/rewriter.rb +10 -11
- data/lib/synvert/core/version.rb +1 -1
- data/synvert-core-ruby.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f5de89db1e920d9a0f1f55543f5e68121daaadec9c28558438561a303e1ef52
|
4
|
+
data.tar.gz: b7b491df1978ab9a628b4230753332044b1fe6d4fd53426b80d4047c3da9fbf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b5957ba9a2812b7efeb224d0aa8776cdde9c664f35a35b1247e2445fe294c2c803c83eb4d6b4c7be4bde98ea0a196982ac7ae8974fc3c90874bf396b15d7d1c
|
7
|
+
data.tar.gz: e8d838167caff111711f4fc61cb431b52eb53817a268f65c920f915e31c6a0fb785f1bbaa43f43210657b2c93db7d33656f4c9338e887d5f0afdc1a004eb7167
|
data/CHANGELOG.md
CHANGED
@@ -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
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
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
|
-
|
170
|
-
|
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
|
240
|
-
|
241
|
-
|
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.
|
data/lib/synvert/core/version.rb
CHANGED
data/synvert-core-ruby.gemspec
CHANGED
@@ -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.
|
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-
|
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: '
|
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: '
|
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.
|
221
|
+
rubygems_version: 3.2.32
|
222
222
|
signing_key:
|
223
223
|
specification_version: 4
|
224
224
|
summary: convert ruby code to better syntax.
|