synvert-core 1.14.0 → 1.14.1

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: c463c762e05473bfe948bce32491283f192da99afd514d4a32d9e144e86562d8
4
- data.tar.gz: 142b810da918430620441d636e050c08b69abd84d6b1a14db9c76874fc4ce665
3
+ metadata.gz: bf1187899f9eb743b73e0295ebac08014131dae4acd6e4d17475f9eb3cc71657
4
+ data.tar.gz: fcafcb32987582fc9f52e2735ee3001fc9bc7110aeea9da3b7f91cd307ddb064
5
5
  SHA512:
6
- metadata.gz: 87953d43e4e0988a29197c708e6dc1a453de2fde0ebd1d3bd44dc7b8b191558bfd54e8637674a8bb8ce152eb2825a86c434737a5e889484e1654fb5aeef92417
7
- data.tar.gz: d1d43308e1f1afb0e1547aa79c14365e379376a666e83b0508fdd525aa00c9078cb780be671f43ed27597bc087e57a451494d603a33eaea19337008fdf846401
6
+ metadata.gz: 623cc353b1d7e4963de14dfee389ad6044711c8f9284e55e24c83e7d652dc65c236cf32c1acc2cb40a615b549cd418fcf5f8b290bb3f87bd6f90bbc9b2341161
7
+ data.tar.gz: 98ba68a0638b04d2d21405c194117c7cc98ca8159d362cf847e6f39fe78a865939f179798db6f76305571dd01fd53253ee8ffd29d4f822e9cb56d239ad86408e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.14.1 (2022-10-26)
4
+
5
+ * Abstract AnyValue to NodeQuery
6
+
3
7
  ## 1.14.0 (2022-10-25)
4
8
 
5
9
  * `insert_after` and `insert_before` accepts `to` option
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- synvert-core (1.14.0)
4
+ synvert-core (1.14.1)
5
5
  activesupport (< 7.0.0)
6
6
  erubis
7
7
  node_mutation
@@ -50,10 +50,10 @@ GEM
50
50
  method_source (1.0.0)
51
51
  minitest (5.16.3)
52
52
  nenv (0.3.0)
53
- node_mutation (1.7.0)
53
+ node_mutation (1.7.1)
54
54
  activesupport (< 7.0.0)
55
55
  erubis
56
- node_query (1.9.0)
56
+ node_query (1.10.0)
57
57
  activesupport (< 7.0.0)
58
58
  notiffany (0.1.3)
59
59
  nenv (~> 0.1)
@@ -356,9 +356,9 @@ module Synvert::Core
356
356
  # Match any value but nil.
357
357
  # @example
358
358
  # type: 'hash', nothing_value: 'true', status_value: any_value
359
- # @return [Synvert::Core::Rewriter::AnyValue]
359
+ # @return [NodeQuery::AnyValue]
360
360
  def any_value
361
- Rewriter::AnyValue.new
361
+ NodeQuery::AnyValue.new
362
362
  end
363
363
 
364
364
  private
@@ -30,8 +30,6 @@ module Synvert::Core
30
30
  autoload :RubyVersion, 'synvert/core/rewriter/ruby_version'
31
31
  autoload :GemSpec, 'synvert/core/rewriter/gem_spec'
32
32
 
33
- autoload :AnyValue, 'synvert/core/rewriter/any_value'
34
-
35
33
  class << self
36
34
  # Register a rewriter with its group and name.
37
35
  #
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Synvert
4
4
  module Core
5
- VERSION = '1.14.0'
5
+ VERSION = '1.14.1'
6
6
  end
7
7
  end
@@ -197,6 +197,10 @@ module Synvert::Core
197
197
  instance.warn 'foobar'
198
198
  end
199
199
 
200
+ it 'parses any_value' do
201
+ expect(instance.any_value).to be_instance_of NodeQuery::AnyValue
202
+ end
203
+
200
204
  describe '#process' do
201
205
  let(:rewriter) { Rewriter.new('foo', 'bar') }
202
206
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synvert-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.0
4
+ version: 1.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-25 00:00:00.000000000 Z
11
+ date: 2022-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -133,7 +133,6 @@ files:
133
133
  - lib/synvert/core/node_ext.rb
134
134
  - lib/synvert/core/rewriter.rb
135
135
  - lib/synvert/core/rewriter/action/replace_erb_stmt_with_expr_action.rb
136
- - lib/synvert/core/rewriter/any_value.rb
137
136
  - lib/synvert/core/rewriter/condition.rb
138
137
  - lib/synvert/core/rewriter/condition/if_exist_condition.rb
139
138
  - lib/synvert/core/rewriter/condition/if_only_exist_condition.rb
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Synvert::Core
4
- # A new type to match any value.
5
- class Rewriter::AnyValue
6
- end
7
- end