synvert 1.4.5 → 1.4.7

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: 16df08fdeea4180bc57f618b3647a324ad3273711f680e1fe16eed46b30a51de
4
- data.tar.gz: 38d1c795e9a7d6f1126c7f55e61e726b94fbdf3d9b516cdd2f574fb2ba49314f
3
+ metadata.gz: 6eade43328f9d5aba7b9d9449dfb5dc15486a6f873de4d3b218bdd15ee641f36
4
+ data.tar.gz: 7bf99ac9fe64b3735d546cc4cc008fdcaf3a6bcbea683c619b5bdaeaf710a5c0
5
5
  SHA512:
6
- metadata.gz: d7da48a488d0bb87b0747a10a7f659e13353e95bc0262b64c4c08ea117ec2ec81ff0fc376f200d0ecd73ec60481232c5167c13ce82c9ceb3dbc8b93e7766fba1
7
- data.tar.gz: 33265e738ff7e0f1a3b75035845c5acc839019f4b28b51ef4f86b8c3a9d879b47b2f11bba10970db48cea9639e04ac629061ddad8bb53c22e0d37680e4db5aec
6
+ metadata.gz: 07bac2ce5407c8de8547fbb1b6ab19beec293d024ae6b85369baa4b9737754aa24ab7f1ea6738bb170a5cb4390ae2c85a52a7dd844415211511c6e8f4fa4b9ce
7
+ data.tar.gz: ffda87151ed06cd72cee9d48236d8b29f2e4dba26d1bb56083b3df04705471aa99f0aa8a9c0407514500dc8069f1e7ea65fb494417fddf49d7ca79c4928c43ca
data/CHANGELOG.md CHANGED
@@ -1,6 +1,14 @@
1
1
  # CHANGELOG
2
2
 
3
- ## 1.4.5 (2024-07-01)
3
+ ## 1.4.5 (2023-07-03)
4
+
5
+ * Update `synvert-core` to 1.28.3
6
+
7
+ ## 1.4.6 (2023-07-03)
8
+
9
+ * Read helpers before execute/test/run a snippet
10
+
11
+ ## 1.4.5 (2023-07-01)
4
12
 
5
13
  * Explicitly require `parser`
6
14
 
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- synvert (1.4.5)
5
- synvert-core (>= 1.28.0)
4
+ synvert (1.4.7)
5
+ synvert-core (>= 1.28.3)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -32,12 +32,12 @@ GEM
32
32
  concurrent-ruby (~> 1.0)
33
33
  json (2.5.1)
34
34
  minitest (5.18.0)
35
- node_mutation (1.18.3)
36
- node_query (1.13.2)
35
+ node_mutation (1.19.3)
36
+ node_query (1.13.8)
37
37
  parallel (1.22.1)
38
38
  parser (3.2.1.1)
39
39
  ast (~> 2.4.1)
40
- parser_node_ext (1.1.1)
40
+ parser_node_ext (1.2.0)
41
41
  parser
42
42
  prettier_print (1.2.1)
43
43
  public_suffix (4.0.6)
@@ -64,17 +64,17 @@ GEM
64
64
  sync (0.5.0)
65
65
  syntax_tree (6.1.1)
66
66
  prettier_print (>= 1.2.0)
67
- syntax_tree_ext (0.3.1)
67
+ syntax_tree_ext (0.6.3)
68
68
  syntax_tree
69
- synvert-core (1.28.0)
69
+ synvert-core (1.28.3)
70
70
  activesupport (< 7.0.0)
71
- node_mutation (>= 1.18.2)
72
- node_query (>= 1.13.2)
71
+ node_mutation (>= 1.19.1)
72
+ node_query (>= 1.13.5)
73
73
  parallel
74
74
  parser
75
- parser_node_ext (>= 1.1.1)
75
+ parser_node_ext (>= 1.2.0)
76
76
  syntax_tree
77
- syntax_tree_ext (>= 0.3.1)
77
+ syntax_tree_ext (>= 0.6.0)
78
78
  term-ansicolor (1.7.1)
79
79
  tins (~> 1.0)
80
80
  thor (1.1.0)
data/lib/synvert/cli.rb CHANGED
@@ -42,11 +42,14 @@ module Synvert
42
42
  when 'generate'
43
43
  generate_snippet
44
44
  when 'execute'
45
+ read_helpers
45
46
  execute_snippet(@options[:execute_command])
46
47
  when 'test'
48
+ read_helpers
47
49
  rewriter = Synvert::Core::Utils.eval_snippet(@options[:snippet_name])
48
50
  test_snippet(rewriter)
49
51
  when 'run'
52
+ read_helpers
50
53
  rewriter = Synvert::Core::Utils.eval_snippet(@options[:snippet_name])
51
54
  run_snippet(rewriter)
52
55
  else
@@ -155,6 +158,11 @@ module Synvert
155
158
  Dir.glob(File.join(default_snippets_home, 'lib/**/*.rb')).each { |file| require file }
156
159
  end
157
160
 
161
+ # read all helpers.
162
+ def read_helpers
163
+ Dir.glob(File.join(default_snippets_home, 'lib/helpers/**/*.rb')).each { |file| require file }
164
+ end
165
+
158
166
  # List and print all available rewriters.
159
167
  def list_available_rewriters
160
168
  if Core::Rewriter.availables.empty?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Synvert
4
- VERSION = '1.4.5'
4
+ VERSION = '1.4.7'
5
5
  end
data/synvert-ruby.gemspec CHANGED
@@ -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', '>= 1.28.0'
23
+ spec.add_runtime_dependency 'synvert-core', '>= 1.28.3'
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: 1.4.5
4
+ version: 1.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-30 00:00:00.000000000 Z
11
+ date: 2023-07-03 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: 1.28.0
19
+ version: 1.28.3
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: 1.28.0
26
+ version: 1.28.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement