synvert 0.18.4 → 0.19.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a079cd4a1c2c5f630767b66bd735ab384013fb1175229d203e798d3d153ff41
4
- data.tar.gz: b8bd4802ac7208ef220e2795d17d67227f1db7d054aa816c081e07463f5c0f5f
3
+ metadata.gz: dbd02b0af5b4ba1837d80b3e32d58933e7ac124cf7764cf78bf0f110699d2aa1
4
+ data.tar.gz: 1806f02df03444ac9764aeb3d23556d1acceecf5e7ab8a483d935db3c9489686
5
5
  SHA512:
6
- metadata.gz: a9577c96364c76ff5e2ff4311a910f766e706c711a0b55e373eee1b97ca4c64ec35ab04b052420e9097c430d94c632d3dbf2b78d8aaee9c7167be09db3008e49
7
- data.tar.gz: 2eee7f569b9c8c7886c93d0cc675ddf090865d5c2545f0e575e0fc124399f3a8ec93641823dfee704523a9065bc7318acdec662788e0ed309bb4d9d93973a1a0
6
+ metadata.gz: eafaa98a0ed8f7097728a54d4f59b4ae51df0fd65aecffbdc835d41fdfd541cf39381a9f611b415861205a234b53b1860467fe45e2e7afa20048dcc7a608c8b4
7
+ data.tar.gz: 3895acb75e741e738ba53d15ef97ac1de2a2c435be27f0248743d585272b6f385d11c5bff3923ffc5088cdd835efd2761e0786430b4d99ba97878526055521a9
data/CHANGELOG.md CHANGED
@@ -1,20 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
- ## 0.18.4 (2021-08-22)
4
-
5
- * Deprecate synvert, use synvert-ruby instead
6
-
7
- ## 0.18.3 (2021-08-22)
8
-
9
- * Update synvert-snippets url
10
- * Deprecate synvert, use synvert-ruby instead
11
-
12
- ## 0.18.2 (2021-08-12)
13
-
14
- * Require `fileutils`
15
-
16
- ## 0.18.1 (2021-07-23)
3
+ ## 0.19.0 (2021-09-10)
17
4
 
5
+ * Add `--show-run-process` option
6
+ * Deprecate `synvert`, use `synvert-ruby` instead
7
+ * Update `synvert-snippets` url
18
8
  * Fix `affected_files` is Set
19
9
 
20
10
  ## 0.18.0 (2021-07-14)
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Synvert
2
2
 
3
- <img src="https://xinminlabs.github.io/synvert/img/logo_96.png" alt="logo" width="32" height="32" />
3
+ <img src="https://synvert.xinminlabs.com/img/logo_96.png" alt="logo" width="32" height="32" />
4
4
 
5
- ![Main workflow](https://github.com/xinminlabs/synvert/actions/workflows/main.yml/badge.svg)
5
+ ![Main workflow](https://github.com/xinminlabs/synvert-ruby/actions/workflows/main.yml/badge.svg)
6
6
  [![Coverage Status](https://coveralls.io/repos/xinminlabs/synvert/badge.svg?branch=master)](https://coveralls.io/r/xinminlabs/synvert)
7
7
  [![Gem Version](https://badge.fury.io/rb/synvert.svg)](http://badge.fury.io/rb/synvert)
8
8
 
@@ -53,7 +53,7 @@ $ synvert-ruby -r factory_girl/use_short_syntax,rails/upgrade_3_2_to_4_0 ~/Sites
53
53
 
54
54
  ## Documentation
55
55
 
56
- [https://xinminlabs.github.io/synvert/][3]
56
+ [https://synvert.xinminlabs.com][3]
57
57
 
58
58
  ## Contributing
59
59
 
@@ -65,4 +65,4 @@ $ synvert-ruby -r factory_girl/use_short_syntax,rails/upgrade_3_2_to_4_0 ~/Sites
65
65
 
66
66
  [1]: https://github.com/xinminlabs/synvert-core-ruby/
67
67
  [2]: https://github.com/xinminlabs/synvert-snippets-ruby/
68
- [3]: https://xinminlabs.github.io/synvert/
68
+ [3]: https://synvert.xinminlabs.com
data/lib/synvert/cli.rb CHANGED
@@ -34,7 +34,6 @@ module Synvert
34
34
  load_rewriters
35
35
  query_available_rewriters
36
36
  when 'show'
37
- load_rewriters
38
37
  show_rewriter
39
38
  when 'sync'
40
39
  sync_snippets
@@ -75,24 +74,24 @@ module Synvert
75
74
  opts.on '-l', '--list', 'list all available snippets' do
76
75
  @options[:command] = 'list'
77
76
  end
78
- opts.on '-o', '--open SNIPPET_NAME', 'Open a snippet' do |snippet_name|
79
- @options[:command] = 'open'
80
- @options[:snippet_name] = snippet_name
81
- end
82
77
  opts.on '-q', '--query QUERY', 'query specified snippets' do |query|
83
78
  @options[:command] = 'query'
84
79
  @options[:query] = query
85
80
  end
86
- opts.on '--skip FILE_PATTERNS',
87
- 'skip specified files or directories, separated by comma, e.g. app/models/post.rb,vendor/plugins/**/*.rb' do |file_patterns|
88
- @options[:skip_file_patterns] = file_patterns.split(',')
89
- end
90
81
  opts.on '-s',
91
82
  '--show SNIPPET_NAME',
92
83
  'show specified snippet description, SNIPPET_NAME is combined by group and name, e.g. ruby/new_hash_syntax' do |snippet_name|
93
84
  @options[:command] = 'show'
94
85
  @options[:snippet_name] = snippet_name
95
86
  end
87
+ opts.on '-o', '--open SNIPPET_NAME', 'Open a snippet' do |snippet_name|
88
+ @options[:command] = 'open'
89
+ @options[:snippet_name] = snippet_name
90
+ end
91
+ opts.on '-g', '--generate NEW_SNIPPET_NAME', 'generate a new snippet' do |name|
92
+ @options[:command] = 'generate'
93
+ @options[:snippet_name] = name
94
+ end
96
95
  opts.on '--sync', 'sync snippets' do
97
96
  @options[:command] = 'sync'
98
97
  end
@@ -102,9 +101,12 @@ module Synvert
102
101
  opts.on '-r', '--run SNIPPET_NAME', 'run specified snippet, e.g. ruby/new_hash_syntax' do |snippet_name|
103
102
  @options[:snippet_name] = snippet_name
104
103
  end
105
- opts.on '-g', '--generate NEW_SNIPPET_NAME', 'generate a new snippet' do |name|
106
- @options[:command] = 'generate'
107
- @options[:snippet_name] = name
104
+ opts.on '--show-run-process', 'show processing files when running a snippet' do
105
+ Core::Configuration.show_run_process = true
106
+ end
107
+ opts.on '--skip FILE_PATTERNS',
108
+ 'skip specified files or directories, separated by comma, e.g. app/models/post.rb,vendor/plugins/**/*.rb' do |file_patterns|
109
+ @options[:skip_file_patterns] = file_patterns.split(',')
108
110
  end
109
111
  opts.on '-f', '--format FORMAT', 'output format' do |format|
110
112
  @options[:format] = format
@@ -185,7 +187,7 @@ module Synvert
185
187
  return puts 'To open a synvert snippet, set $EDITOR or $SYNVERT_EDITOR' unless editor
186
188
 
187
189
  path = File.expand_path(File.join(default_snippets_home, "lib/#{@options[:snippet_name]}.rb"))
188
- if File.exist? path
190
+ if File.exist?(path)
189
191
  system editor, path
190
192
  else
191
193
  puts "Can't run #{editor} #{path}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Synvert
4
- VERSION = '0.18.4'
4
+ VERSION = '0.19.0'
5
5
  end
@@ -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/xinminlabs/synvert'
14
+ spec.homepage = 'https://github.com/xinminlabs/synvert-ruby'
15
15
  spec.license = 'MIT'
16
16
 
17
17
  spec.files = `git ls-files`.split($/)
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ['lib']
21
21
  spec.post_install_message = 'Please run `synvert-ruby --sync` first to sync snippets remotely.'
22
22
 
23
- spec.add_runtime_dependency 'synvert-core', '>= 0.53.0'
23
+ spec.add_runtime_dependency 'synvert-core', '>= 0.55.0'
24
24
 
25
25
  spec.add_development_dependency 'bundler'
26
26
  spec.add_development_dependency 'rake'
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: 0.18.4
4
+ version: 0.19.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: 2021-08-22 00:00:00.000000000 Z
11
+ date: 2021-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: synvert-core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.53.0
19
+ version: 0.55.0
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.53.0
26
+ version: 0.55.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -105,8 +105,8 @@ files:
105
105
  - lib/synvert/version.rb
106
106
  - spec/spec_helper.rb
107
107
  - spec/synvert/snippet_spec.rb
108
- - synvert.gemspec
109
- homepage: https://github.com/xinminlabs/synvert
108
+ - synvert-ruby.gemspec
109
+ homepage: https://github.com/xinminlabs/synvert-ruby
110
110
  licenses:
111
111
  - MIT
112
112
  metadata: {}