synvert 1.4.5 → 1.4.6

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: a942de5f8a6e4eec684585bf3bb37c1cadceeba0a0c580a3d94908e8ac73b584
4
+ data.tar.gz: 4414547d4d2bae57d34a3616bae182d450c14e0cf5dffc4a4c3e0d63f4b30dce
5
5
  SHA512:
6
- metadata.gz: d7da48a488d0bb87b0747a10a7f659e13353e95bc0262b64c4c08ea117ec2ec81ff0fc376f200d0ecd73ec60481232c5167c13ce82c9ceb3dbc8b93e7766fba1
7
- data.tar.gz: 33265e738ff7e0f1a3b75035845c5acc839019f4b28b51ef4f86b8c3a9d879b47b2f11bba10970db48cea9639e04ac629061ddad8bb53c22e0d37680e4db5aec
6
+ metadata.gz: 7555cf4ad97597997620a17ff843e53fffe7dec9e8dc8c7e48e0707a32105204a8fc651849d55c9784461a264aa6bb7eac180efc7bea6fa960b9eb8280d80a8f
7
+ data.tar.gz: dfd3b9c58df5508c651c99074f4399e90dc4aef1e188720c0d46bcfc4afdaa757847e6353e635cd7d5f19bb3a8095f8f92ab2602225644e36b4fe08d421c577e
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
- ## 1.4.5 (2024-07-01)
3
+ ## 1.4.6 (2023-07-03)
4
+
5
+ * Read helpers before execute/test/run a snippet
6
+
7
+ ## 1.4.5 (2023-07-01)
4
8
 
5
9
  * Explicitly require `parser`
6
10
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- synvert (1.4.5)
4
+ synvert (1.4.6)
5
5
  synvert-core (>= 1.28.0)
6
6
 
7
7
  GEM
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.6'
5
5
  end
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.6
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-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: synvert-core