synvert 1.10.1 → 1.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/publish_docker_image.yml +1 -2
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +11 -12
- data/README.md +11 -11
- data/lib/synvert/cli.rb +1 -1
- data/lib/synvert/command.rb +1 -1
- 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
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,18 +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
|
-
racc (~> 1.7)
|
|
39
38
|
listen (3.8.0)
|
|
40
39
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
41
40
|
rb-inotify (~> 0.9, >= 0.9.10)
|
|
42
41
|
lumberjack (1.2.9)
|
|
43
42
|
method_source (1.0.0)
|
|
44
|
-
minitest (5.22.
|
|
43
|
+
minitest (5.22.3)
|
|
45
44
|
nenv (0.3.0)
|
|
46
|
-
node_mutation (1.24.
|
|
47
|
-
node_query (1.15.
|
|
45
|
+
node_mutation (1.24.3)
|
|
46
|
+
node_query (1.15.2)
|
|
48
47
|
notiffany (0.1.3)
|
|
49
48
|
nenv (~> 0.1)
|
|
50
49
|
shellany (~> 0.0)
|
|
@@ -52,11 +51,11 @@ GEM
|
|
|
52
51
|
parser (3.3.0.5)
|
|
53
52
|
ast (~> 2.4.1)
|
|
54
53
|
racc
|
|
55
|
-
parser_node_ext (1.
|
|
54
|
+
parser_node_ext (1.3.0)
|
|
56
55
|
parser
|
|
57
56
|
prettier_print (1.2.1)
|
|
58
|
-
prism (0.
|
|
59
|
-
prism_ext (0.
|
|
57
|
+
prism (0.25.0)
|
|
58
|
+
prism_ext (0.3.0)
|
|
60
59
|
prism
|
|
61
60
|
pry (0.14.2)
|
|
62
61
|
coderay (~> 1.1)
|
|
@@ -82,11 +81,11 @@ GEM
|
|
|
82
81
|
shellany (0.0.1)
|
|
83
82
|
syntax_tree (6.2.0)
|
|
84
83
|
prettier_print (>= 1.2.0)
|
|
85
|
-
syntax_tree_ext (0.
|
|
84
|
+
syntax_tree_ext (0.8.1)
|
|
86
85
|
syntax_tree
|
|
87
|
-
synvert-core (1.
|
|
86
|
+
synvert-core (1.35.0)
|
|
88
87
|
activesupport (< 7.0.0)
|
|
89
|
-
node_mutation (>= 1.
|
|
88
|
+
node_mutation (>= 1.24.1)
|
|
90
89
|
node_query (>= 1.15.1)
|
|
91
90
|
parallel
|
|
92
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
|
-
[](https://awesomecode.io/repos/synvert-hq/synvert-ruby)
|
|
6
|
+
[](https://github.com/synvert-hq/synvert-ruby/actions/workflows/main.yml)
|
|
7
7
|
[](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
|
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: {}
|