synvert 1.10.0 → 1.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/publish_docker_image.yml +1 -2
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +11 -11
- data/README.md +11 -11
- data/lib/synvert/cli.rb +1 -1
- data/lib/synvert/command.rb +4 -4
- data/lib/synvert/version.rb +1 -1
- data/spec/synvert/command_spec.rb +1 -1
- data/synvert-ruby.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4368b21f1815b972669f66b090b5d7d206ae7162c26b1b060fd2c825681b422
|
4
|
+
data.tar.gz: a9d5f31e26192d01ebe8fa360534b7bc39c90a6b18f187593ddc0fd9b35fab4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d09024c9ef0f1894733c7fe7419e951dd411767c8e99e4d0aa2b8bd8a07a2d4ed8605a955d35174f187624752fa01998bf72b62dece006f8def5f0a066e102c
|
7
|
+
data.tar.gz: aa6735ba14cf74fa1a4b27d2b5123a89423aa528c87ea5421a2423a50c2e70c3243e4681d4d3241e8e575b42d26124cb7cb8bfedcc3bc9d232cb7b089e61d501
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 1.10.2 (2024-04-07)
|
4
|
+
|
5
|
+
* Update `synvert-core` to 1.35.0
|
6
|
+
|
7
|
+
## 1.10.1 (2024-03-06)
|
8
|
+
|
9
|
+
* Fix undefined `plain_output?`
|
10
|
+
* Update `synvert-core` to 1.34.0
|
11
|
+
|
3
12
|
## 1.10.0 (2024-02-24)
|
4
13
|
|
5
14
|
* Add `--check-bundle-gems` flag to check code in all bundle gems
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
synvert (1.10.
|
4
|
+
synvert (1.10.2)
|
5
5
|
synvert-core (>= 1.33.2)
|
6
6
|
|
7
7
|
GEM
|
@@ -33,17 +33,17 @@ GEM
|
|
33
33
|
guard (~> 2.1)
|
34
34
|
guard-compat (~> 1.1)
|
35
35
|
rspec (>= 2.99.0, < 4.0)
|
36
|
-
i18n (1.14.
|
36
|
+
i18n (1.14.4)
|
37
37
|
concurrent-ruby (~> 1.0)
|
38
38
|
listen (3.8.0)
|
39
39
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
40
40
|
rb-inotify (~> 0.9, >= 0.9.10)
|
41
41
|
lumberjack (1.2.9)
|
42
42
|
method_source (1.0.0)
|
43
|
-
minitest (5.22.
|
43
|
+
minitest (5.22.3)
|
44
44
|
nenv (0.3.0)
|
45
|
-
node_mutation (1.
|
46
|
-
node_query (1.15.
|
45
|
+
node_mutation (1.24.3)
|
46
|
+
node_query (1.15.2)
|
47
47
|
notiffany (0.1.3)
|
48
48
|
nenv (~> 0.1)
|
49
49
|
shellany (~> 0.0)
|
@@ -51,11 +51,11 @@ GEM
|
|
51
51
|
parser (3.3.0.5)
|
52
52
|
ast (~> 2.4.1)
|
53
53
|
racc
|
54
|
-
parser_node_ext (1.
|
54
|
+
parser_node_ext (1.3.0)
|
55
55
|
parser
|
56
56
|
prettier_print (1.2.1)
|
57
|
-
prism (0.
|
58
|
-
prism_ext (0.
|
57
|
+
prism (0.25.0)
|
58
|
+
prism_ext (0.3.0)
|
59
59
|
prism
|
60
60
|
pry (0.14.2)
|
61
61
|
coderay (~> 1.1)
|
@@ -81,11 +81,11 @@ GEM
|
|
81
81
|
shellany (0.0.1)
|
82
82
|
syntax_tree (6.2.0)
|
83
83
|
prettier_print (>= 1.2.0)
|
84
|
-
syntax_tree_ext (0.
|
84
|
+
syntax_tree_ext (0.8.1)
|
85
85
|
syntax_tree
|
86
|
-
synvert-core (1.
|
86
|
+
synvert-core (1.35.0)
|
87
87
|
activesupport (< 7.0.0)
|
88
|
-
node_mutation (>= 1.
|
88
|
+
node_mutation (>= 1.24.1)
|
89
89
|
node_query (>= 1.15.1)
|
90
90
|
parallel
|
91
91
|
parser
|
data/README.md
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
|
3
3
|
<img src="https://synvert.net/img/logo_96.png" alt="logo" width="32" height="32" />
|
4
4
|
|
5
|
-
[![AwesomeCode Status for
|
6
|
-
![
|
5
|
+
[![AwesomeCode Status for synvert-hq/synvert-ruby](https://awesomecode.io/projects/47cd9805-171c-4c61-b927-baa46cd4020a/status)](https://awesomecode.io/repos/synvert-hq/synvert-ruby)
|
6
|
+
[![Build Status](https://github.com/synvert-hq/synvert-ruby/actions/workflows/main.yml/badge.svg)](https://github.com/synvert-hq/synvert-ruby/actions/workflows/main.yml)
|
7
7
|
[![Gem Version](https://badge.fury.io/rb/synvert.svg)](http://badge.fury.io/rb/synvert)
|
8
8
|
|
9
9
|
`synvert-ruby` is a command tool to rewrite ruby code automatically, it depends on `synvert-core-ruby` and `synvert-snippets-ruby`.
|
10
10
|
|
11
|
-
[synvert-core-ruby](https://github.com/
|
11
|
+
[synvert-core-ruby](https://github.com/synvert-hq/synvert-core-ruby) provides a set of DSLs to rewrite ruby code.
|
12
12
|
|
13
|
-
[synvert-snippets-ruby](https://github.com/
|
13
|
+
[synvert-snippets-ruby](https://github.com/synvert-hq/synvert-snippets-ruby) provides official snippets to rewrite ruby code.
|
14
14
|
|
15
15
|
## Installation
|
16
16
|
|
@@ -63,7 +63,7 @@ Usage: synvert-ruby [project_path]
|
|
63
63
|
|
64
64
|
### Sync snippets
|
65
65
|
|
66
|
-
[Official Snippets](https://github.com/
|
66
|
+
[Official Snippets](https://github.com/synvert-hq/synvert-snippets-ruby) are available on github,
|
67
67
|
you can sync them any time you want.
|
68
68
|
|
69
69
|
```
|
@@ -102,37 +102,37 @@ $ synvert-ruby -o factory_bot/use_short_syntax
|
|
102
102
|
Run a snippet, analyze and then rewrite code.
|
103
103
|
|
104
104
|
```
|
105
|
-
$ synvert-ruby -r factory_bot/use_short_syntax ~/Sites/
|
105
|
+
$ synvert-ruby -r factory_bot/use_short_syntax ~/Sites/synvert-hq/synvert-core-ruby
|
106
106
|
```
|
107
107
|
|
108
108
|
Run a snippet from remote url
|
109
109
|
|
110
110
|
```
|
111
|
-
$ synvert-ruby -r https://raw.githubusercontent.com/
|
111
|
+
$ synvert-ruby -r https://raw.githubusercontent.com/synvert-hq/synvert-snippets-ruby/master/lib/factory_bot/use_short_syntax.rb ~/sites/synvert-hq/synvert-core-ruby
|
112
112
|
```
|
113
113
|
|
114
114
|
Run a snippet from local path
|
115
115
|
|
116
116
|
```
|
117
|
-
$ synvert-ruby -r ~/.synvert-ruby/lib/factory_bot/use_short_syntax.rb ~/sites/
|
117
|
+
$ synvert-ruby -r ~/.synvert-ruby/lib/factory_bot/use_short_syntax.rb ~/sites/synvert-hq/synvert-core-ruby
|
118
118
|
```
|
119
119
|
|
120
120
|
Skip paths
|
121
121
|
|
122
122
|
```
|
123
|
-
$ synvert-ruby -r factory_bot/use_short_syntax --skip-paths vendor/ ~/sites/
|
123
|
+
$ synvert-ruby -r factory_bot/use_short_syntax --skip-paths vendor/ ~/sites/synvert-hq/synvert-core-ruby
|
124
124
|
```
|
125
125
|
|
126
126
|
Only paths
|
127
127
|
|
128
128
|
```
|
129
|
-
$ synvert-ruby -r factory_bot/use_short_syntax --only-paths app/models/ ~/sites/
|
129
|
+
$ synvert-ruby -r factory_bot/use_short_syntax --only-paths app/models/ ~/sites/synvert-hq/synvert-core-ruby
|
130
130
|
```
|
131
131
|
|
132
132
|
Show processing files when running a snippet.
|
133
133
|
|
134
134
|
```
|
135
|
-
$ synvert-ruby -r factory_bot/use_short_syntax --show-run-process ~/Sites/
|
135
|
+
$ synvert-ruby -r factory_bot/use_short_syntax --show-run-process ~/Sites/synvert-hq/synvert-core-ruby
|
136
136
|
```
|
137
137
|
|
138
138
|
### Generate a snippet
|
data/lib/synvert/cli.rb
CHANGED
@@ -163,7 +163,7 @@ module Synvert
|
|
163
163
|
@options[:command] = 'test_bundle_gems'
|
164
164
|
end
|
165
165
|
opts.on '-v', '--version', 'show this version' do
|
166
|
-
puts "#{VERSION} (with synvert-core #{Core::VERSION}
|
166
|
+
puts "#{VERSION} (with synvert-core #{Core::VERSION}"
|
167
167
|
exit
|
168
168
|
end
|
169
169
|
end
|
data/lib/synvert/command.rb
CHANGED
@@ -10,7 +10,7 @@ module Synvert
|
|
10
10
|
Kernel.system('git checkout . && git pull --rebase')
|
11
11
|
end
|
12
12
|
else
|
13
|
-
Kernel.system("git clone https://github.com/
|
13
|
+
Kernel.system("git clone https://github.com/synvert-hq/synvert-snippets-ruby.git #{default_snippets_home}")
|
14
14
|
end
|
15
15
|
puts 'synvert snippets are synced'
|
16
16
|
end
|
@@ -179,10 +179,10 @@ module Synvert
|
|
179
179
|
if ENV['DEBUG']
|
180
180
|
puts e.backtrace.join("\n")
|
181
181
|
end
|
182
|
-
if
|
183
|
-
puts "Error: #{e.message}"
|
184
|
-
else
|
182
|
+
if format == 'json'
|
185
183
|
puts({ error: e.message }.to_json)
|
184
|
+
else
|
185
|
+
puts "Error: #{e.message}"
|
186
186
|
end
|
187
187
|
raise
|
188
188
|
end
|
data/lib/synvert/version.rb
CHANGED
@@ -12,7 +12,7 @@ module Synvert
|
|
12
12
|
describe '.sync_snippets' do
|
13
13
|
it 'git clones snippets' do
|
14
14
|
expect(Kernel).to receive(:system).with(
|
15
|
-
"git clone https://github.com/
|
15
|
+
"git clone https://github.com/synvert-hq/synvert-snippets-ruby.git #{snippets_path}"
|
16
16
|
)
|
17
17
|
described_class.sync_snippets
|
18
18
|
end
|
data/synvert-ruby.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.email = ['flyerhzm@gmail.com']
|
12
12
|
spec.description = 'synvert is used to convert ruby code to better syntax.'
|
13
13
|
spec.summary = 'synvert = syntax + convert.'
|
14
|
-
spec.homepage = 'https://github.com/
|
14
|
+
spec.homepage = 'https://github.com/synvert-hq/synvert-ruby'
|
15
15
|
spec.license = 'MIT'
|
16
16
|
|
17
17
|
spec.files = `git ls-files`.split($/)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: synvert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.10.
|
4
|
+
version: 1.10.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: 2024-
|
11
|
+
date: 2024-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: synvert-core
|
@@ -52,7 +52,7 @@ files:
|
|
52
52
|
- spec/spec_helper.rb
|
53
53
|
- spec/synvert/command_spec.rb
|
54
54
|
- synvert-ruby.gemspec
|
55
|
-
homepage: https://github.com/
|
55
|
+
homepage: https://github.com/synvert-hq/synvert-ruby
|
56
56
|
licenses:
|
57
57
|
- MIT
|
58
58
|
metadata: {}
|