synvert-core 0.19.0 → 0.21.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e1248f2c7c2721ea6135b6adb3a5d40afc95497c63d91e8b1b508febb6e7d4b1
4
- data.tar.gz: 9e7f64e254dc25e1bf9894559c7586eb6fb96f3aea07bedd09d71a17d930e0fc
3
+ metadata.gz: 2cb208eddfa8a9d304c434950ab7054f0836f52860bb6edaeebe0c421cf7647c
4
+ data.tar.gz: 3609ebb014a30b489761bdd27ce2a0236695636b4a51196eb7f7c122d59ff692
5
5
  SHA512:
6
- metadata.gz: a940b5ea3029c9cbc7b10034e3e6eca05370d4015a4c98af28a1eb8b2a825133627f1d25da20e8986d89f52da00c7056893eb9946aff5a017979bc720d097755
7
- data.tar.gz: 37a51398a51fec8cac11b2b3aae8353f5483bfbd7e9485d1b644b8000dea5186036438f1a01b9f4c0d4ce8b940ab6b40261673eb309a663c6f61df45afcf1b45
6
+ metadata.gz: b503e1bfe14c3e489465f71eb3edba0e5cc6ebaab0a860b14c6766208468951832eb61dd070353313b2bba3f0d3001ade5c9683e7de799a8a380db06ae7997eb
7
+ data.tar.gz: 80923462e716f67f4f278627be2ab765534c302cd2d572f78ee0e03a6cb7c8569bdc8182ee0550f05e41d3184184dca378e9a262da1eb8cf386e5c5f5e5c76f3
data/.travis.yml CHANGED
@@ -1,3 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.3.1
3
+ - 2.3
4
+ - 2.4
5
+ - 2.5
6
+ - 2.6
7
+ - 2.7
8
+ - 3.0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.21.2 (2021-02-26)
4
+
5
+ * Fix `find_matching_nodes` if `current_node` is a `:begin` node
6
+
7
+ ## 0.21.1 (2021-02-26)
8
+
9
+ * Fix `find_matching_nodes` if `current_node` is a `Parser::AST::Node`
10
+
11
+ ## 0.21.0 (2021-02-25)
12
+
13
+ * Set `env['BUNDLE_GEMFILE']` before parsing `Gemfile.lock`
14
+ * Add `Rewriter::RubyVersion` test
15
+ * Add `reject_keys_from_hash` helper method
16
+
17
+ ## 0.20.0 (2021-02-15)
18
+
19
+ * Call snippet in sandbox mode
20
+
3
21
  ## 0.19.0 (2021-02-07)
4
22
 
5
23
  * Simplify `Configuration`
@@ -31,21 +31,23 @@ module Synvert::Core
31
31
  private
32
32
 
33
33
  def decode_ruby_stmt(source)
34
- source.gsub(/#{ERUBY_STMT_SPLITTER}(.+?)#{ERUBY_STMT_SPLITTER}/m) { "<%#{$1}%>" }
34
+ source.gsub(/#{ERUBY_STMT_SPLITTER}(.+?)#{ERUBY_STMT_SPLITTER}/mo) { "<%#{Regexp.last_match(1)}%>" }
35
35
  end
36
36
 
37
37
  def decode_ruby_output(source)
38
- source.gsub(/@output_buffer.append=\((.+?)\);#{ERUBY_EXPR_SPLITTER}/m) { "<%=#{$1}%>" }.gsub(
39
- /@output_buffer.append= (.+?)\s+(do|\{)(\s*\|[^|]*\|)?\s*#{ERUBY_EXPR_SPLITTER}/m
40
- ) { |m| "<%=#{m.sub('@output_buffer.append= ', '').sub(ERUBY_EXPR_SPLITTER, '')}%>" }
38
+ source.gsub(/@output_buffer.append=\((.+?)\);#{ERUBY_EXPR_SPLITTER}/mo) {
39
+ "<%=#{Regexp.last_match(1)}%>"
40
+ }.gsub(/@output_buffer.append= (.+?)\s+(do|\{)(\s*\|[^|]*\|)?\s*#{ERUBY_EXPR_SPLITTER}/mo) { |m|
41
+ "<%=#{m.sub('@output_buffer.append= ', '').sub(ERUBY_EXPR_SPLITTER, '')}%>"
42
+ }
41
43
  end
42
44
 
43
45
  def decode_html_output(source)
44
- source.gsub(/@output_buffer.safe_append='(.+?)'.freeze;/m) { reverse_escape_text($1) }.gsub(
45
- /@output_buffer.safe_append=\((.+?)\);#{ERUBY_EXPR_SPLITTER}/m
46
- ) { reverse_escape_text($1) }.gsub(
47
- /@output_buffer.safe_append=(.+?)\s+(do|\{)(\s*\|[^|]*\|)?\s*#{ERUBY_EXPR_SPLITTER}/m
48
- ) { reverse_escape_text($1) }
46
+ source.gsub(/@output_buffer.safe_append='(.+?)'.freeze;/m) { reverse_escape_text(Regexp.last_match(1)) }.gsub(
47
+ /@output_buffer.safe_append=\((.+?)\);#{ERUBY_EXPR_SPLITTER}/mo
48
+ ) { reverse_escape_text(Regexp.last_match(1)) }.gsub(
49
+ /@output_buffer.safe_append=(.+?)\s+(do|\{)(\s*\|[^|]*\|)?\s*#{ERUBY_EXPR_SPLITTER}/mo
50
+ ) { reverse_escape_text(Regexp.last_match(1)) }
49
51
  end
50
52
 
51
53
  def remove_erubis_buf(source)
@@ -97,7 +99,7 @@ module Synvert::Core
97
99
 
98
100
  def add_expr_literal(src, code)
99
101
  flush_newline_if_pending(src)
100
- if code =~ BLOCK_EXPR
102
+ if BLOCK_EXPR.match?(code)
101
103
  src << '@output_buffer.append= ' << code << ERUBY_EXPR_SPLITTER
102
104
  else
103
105
  src << '@output_buffer.append=(' << code << ');' << ERUBY_EXPR_SPLITTER
@@ -106,7 +108,7 @@ module Synvert::Core
106
108
 
107
109
  def add_expr_escaped(src, code)
108
110
  flush_newline_if_pending(src)
109
- if code =~ BLOCK_EXPR
111
+ if BLOCK_EXPR.match?(code)
110
112
  src << '@output_buffer.safe_append= ' << code << ERUBY_EXPR_SPLITTER
111
113
  else
112
114
  src << '@output_buffer.safe_append=(' << code << ');' << ERUBY_EXPR_SPLITTER
@@ -119,9 +121,9 @@ module Synvert::Core
119
121
  index =
120
122
  case code
121
123
  when /\A(\s*)\r?\n/
122
- $1.length
124
+ Regexp.last_match(1).length
123
125
  when /\A(\s+)/
124
- $1.end_with?(' ') ? $1.length - 1 : $1.length
126
+ Regexp.last_match(1).end_with?(' ') ? Regexp.last_match(1).length - 1 : Regexp.last_match(1).length
125
127
  else
126
128
  0
127
129
  end
@@ -321,11 +321,11 @@ module Parser::AST
321
321
  #
322
322
  # @yield [child] Gives a child node.
323
323
  # @yieldparam child [Parser::AST::Node] child node
324
- def recursive_children
324
+ def recursive_children(&block)
325
325
  children.each do |child|
326
- if Parser::AST::Node === child
326
+ if child.is_a?(Parser::AST::Node)
327
327
  yield child
328
- child.recursive_children { |c| yield c }
328
+ child.recursive_children(&block)
329
329
  end
330
330
  end
331
331
  end
@@ -364,7 +364,7 @@ module Parser::AST
364
364
  # @raise [Synvert::Core::MethodNotSupported] if string in block {{ }} does not support.
365
365
  def rewritten_source(code)
366
366
  code.gsub(/{{(.*?)}}/m) do
367
- old_code = $1
367
+ old_code = Regexp.last_match(1)
368
368
  if respond_to? old_code.split(/\.|\[/).first
369
369
  evaluated = instance_eval old_code
370
370
  case evaluated
@@ -410,20 +410,20 @@ module Parser::AST
410
410
  def match_value?(actual, expected)
411
411
  case expected
412
412
  when Symbol
413
- if Parser::AST::Node === actual
413
+ if actual.is_a?(Parser::AST::Node)
414
414
  actual.to_source == ":#{expected}"
415
415
  else
416
416
  actual.to_sym == expected
417
417
  end
418
418
  when String
419
- if Parser::AST::Node === actual
419
+ if actual.is_a?(Parser::AST::Node)
420
420
  actual.to_source == expected || (actual.to_source[0] == ':' && actual.to_source[1..-1] == expected) ||
421
421
  actual.to_source[1...-1] == expected
422
422
  else
423
423
  actual.to_s == expected
424
424
  end
425
425
  when Regexp
426
- if Parser::AST::Node === actual
426
+ if actual.is_a?(Parser::AST::Node)
427
427
  actual.to_source =~ Regexp.new(expected.to_s, Regexp::MULTILINE)
428
428
  else
429
429
  actual.to_s =~ Regexp.new(expected.to_s, Regexp::MULTILINE)
@@ -435,7 +435,7 @@ module Parser::AST
435
435
  when NilClass
436
436
  actual.nil?
437
437
  when Numeric
438
- if Parser::AST::Node === actual
438
+ if actual.is_a?(Parser::AST::Node)
439
439
  actual.children[0] == expected
440
440
  else
441
441
  actual == expected
@@ -56,7 +56,8 @@ module Synvert::Core
56
56
  # @param name [String] the unique rewriter name.
57
57
  # @param rewriter [Synvert::Core::Rewriter] the rewriter to register.
58
58
  def register(group, name, rewriter)
59
- group, name = group.to_s, name.to_s
59
+ group = group.to_s
60
+ name = name.to_s
60
61
  rewriters[group] ||= {}
61
62
  rewriters[group][name] = rewriter
62
63
  end
@@ -68,7 +69,8 @@ module Synvert::Core
68
69
  # @return [Synvert::Core::Rewriter] the matching rewriter.
69
70
  # @raise [Synvert::Core::RewriterNotFound] if the registered rewriter is not found.
70
71
  def fetch(group, name)
71
- group, name = group.to_s, name.to_s
72
+ group = group.to_s
73
+ name = name.to_s
72
74
  if exist? group, name
73
75
  rewriters[group][name]
74
76
  else
@@ -80,13 +82,19 @@ module Synvert::Core
80
82
  #
81
83
  # @param group [String] the rewriter group.
82
84
  # @param name [String] the rewriter name.
85
+ # @param sandbox [Boolean] if run in sandbox mode, default is false.
83
86
  # @return [Synvert::Core::Rewriter] the registered rewriter.
84
87
  # @raise [Synvert::Core::RewriterNotFound] if the registered rewriter is not found.
85
- def call(group, name)
86
- group, name = group.to_s, name.to_s
88
+ def call(group, name, sandbox = false)
89
+ group = group.to_s
90
+ name = name.to_s
87
91
  if exist? group, name
88
92
  rewriter = rewriters[group][name]
89
- rewriter.process
93
+ if sandbox
94
+ rewriter.process_with_sandbox
95
+ else
96
+ rewriter.process
97
+ end
90
98
  rewriter
91
99
  else
92
100
  raise RewriterNotFound, "Rewriter #{group}/#{name} not found"
@@ -99,7 +107,8 @@ module Synvert::Core
99
107
  # @param name [String] the rewriter name.
100
108
  # @return [Boolean] true if the rewriter exist.
101
109
  def exist?(group, name)
102
- group, name = group.to_s, name.to_s
110
+ group = group.to_s
111
+ name = name.to_s
103
112
  if rewriters[group] && rewriters[group][name]
104
113
  true
105
114
  else
@@ -158,15 +167,18 @@ module Synvert::Core
158
167
  # Process the rewriter.
159
168
  # It will call the block.
160
169
  def process
161
- instance_eval &@block
170
+ instance_eval(&@block)
162
171
  end
163
172
 
164
173
  # Process rewriter with sandbox mode.
165
174
  # It will call the block but doesn't change any file.
166
175
  def process_with_sandbox
167
176
  @sandbox = true
168
- process
169
- @sandbox = false
177
+ begin
178
+ process
179
+ ensure
180
+ @sandbox = false
181
+ end
170
182
  end
171
183
 
172
184
  # Add a warning.
@@ -260,7 +272,7 @@ module Synvert::Core
260
272
  # @param group [String] group of another rewriter.
261
273
  # @param name [String] name of another rewriter.
262
274
  def add_snippet(group, name)
263
- @sub_snippets << self.class.call(group.to_s, name.to_s)
275
+ @sub_snippets << self.class.call(group.to_s, name.to_s, @sandbox)
264
276
  end
265
277
 
266
278
  # Parse helper_method dsl, it defines helper method for [Synvert::Core::Rewriter::Instance].
@@ -17,7 +17,7 @@ module Synvert::Core
17
17
 
18
18
  # If condition matches, run the block code.
19
19
  def process
20
- @instance.instance_eval &@block if match?
20
+ @instance.instance_eval(&@block) if match?
21
21
  end
22
22
  end
23
23
  end
@@ -7,7 +7,7 @@ module Synvert::Core
7
7
  def match?
8
8
  match = false
9
9
  @instance.current_node.recursive_children do |child_node|
10
- match ||= (child_node&.match?(@rules))
10
+ match ||= child_node&.match?(@rules)
11
11
  end
12
12
  match
13
13
  end
@@ -7,7 +7,7 @@ module Synvert::Core
7
7
  def match?
8
8
  match = false
9
9
  @instance.current_node.recursive_children do |child_node|
10
- match ||= (child_node&.match?(@rules))
10
+ match ||= child_node&.match?(@rules)
11
11
  end
12
12
  !match
13
13
  end
@@ -12,7 +12,7 @@ module Synvert::Core
12
12
  # comparator key can be eq, lt, gt, lte, gte or ne.
13
13
  def initialize(name, comparator)
14
14
  @name = name
15
- if Hash === comparator
15
+ if comparator.is_a?(Hash)
16
16
  @operator = comparator.keys.first
17
17
  @version = Gem::Version.new comparator.values.first
18
18
  else
@@ -31,6 +31,7 @@ module Synvert::Core
31
31
  # if Gemfile.lock does not exist, just ignore this check
32
32
  return true unless File.exist?(gemfile_lock_path)
33
33
 
34
+ ENV['BUNDLE_GEMFILE'] = Configuration.path # make sure bundler reads Gemfile.lock in the correct path
34
35
  parser = Bundler::LockfileParser.new(File.read(gemfile_lock_path))
35
36
  if spec = parser.specs.find { |spec| spec.name == @name }
36
37
  Gem::Version.new(spec.version).send(OPERATORS[@operator], @version)
@@ -65,7 +65,23 @@ module Synvert::Core
65
65
  #
66
66
  # strip_brackets("(1..100)") #=> "1..100"
67
67
  def strip_brackets(code)
68
- code.sub(/^\((.*)\)$/) { $1 }.sub(/^\[(.*)\]$/) { $1 }.sub(/^{(.*)}$/) { $1 }
68
+ code.sub(/^\((.*)\)$/) { Regexp.last_match(1) }.sub(/^\[(.*)\]$/) { Regexp.last_match(1) }.sub(/^{(.*)}$/) {
69
+ Regexp.last_match(1)
70
+ }
71
+ end
72
+
73
+ # Reject some keys from hash node.
74
+ #
75
+ # @param hash_node [Parser::AST::Node]
76
+ # @param keys [Array] keys should be rejected from the hash.
77
+ # @return [String] source of of the hash node after rejecting some keys.
78
+ #
79
+ # @example
80
+ #
81
+ # hash_node = Parser::CurrentRuby.parse("{ key1: 'value1', key2: 'value2' }")
82
+ # reject_keys_from_hash(hash_node, :key1) => "key2: 'value2'"
83
+ def reject_keys_from_hash(hash_node, *keys)
84
+ hash_node.children.reject { |pair_node| keys.include?(pair_node.key.to_value) }.map(&:to_source).join(', ')
69
85
  end
70
86
  end
71
87
  end
@@ -18,7 +18,7 @@ module Synvert::Core
18
18
  @file_source[file_path] ||=
19
19
  begin
20
20
  source = File.read(file_path)
21
- source = Engine::ERB.encode(source) if file_path =~ /\.erb$/
21
+ source = Engine::ERB.encode(source) if /\.erb$/.match?(file_path)
22
22
  source
23
23
  end
24
24
  end
@@ -45,7 +45,7 @@ module Synvert::Core
45
45
  # @param file_path [String] file path
46
46
  # @param source [String] file source
47
47
  def write_file(file_path, source)
48
- source = Engine::ERB.decode(source) if file_path =~ /\.erb/
48
+ source = Engine::ERB.decode(source) if /\.erb/.match?(file_path)
49
49
  File.write file_path, source.gsub(/ +\n/, "\n")
50
50
  @file_source[file_path] = nil
51
51
  @file_ast[file_path] = nil
@@ -101,7 +101,7 @@ module Synvert::Core
101
101
 
102
102
  process_with_node ast do
103
103
  begin
104
- instance_eval &@block
104
+ instance_eval(&@block)
105
105
  rescue NoMethodError
106
106
  puts @current_node.debug_info
107
107
  raise
@@ -14,9 +14,7 @@ module Synvert::Core
14
14
  #
15
15
  # @return [Boolean] true if matches, otherwise false.
16
16
  def match?
17
- # Gem::Version initialize will strip RUBY_VERSION directly in ruby 1.9,
18
- # which is solved from ruby 2.0.0, which calls dup internally.
19
- Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new(@version)
17
+ Gem::Version.new(RUBY_VERSION) >= Gem::Version.new(@version)
20
18
  end
21
19
  end
22
20
  end
@@ -21,7 +21,7 @@ module Synvert::Core
21
21
 
22
22
  child_node = current_node.send @child_node_name
23
23
  @instance.process_with_other_node child_node do
24
- @instance.instance_eval &@block
24
+ @instance.instance_eval(&@block)
25
25
  end
26
26
  end
27
27
  end
@@ -26,7 +26,7 @@ module Synvert::Core
26
26
  @instance.process_with_node current_node do
27
27
  matching_nodes.each do |matching_node|
28
28
  @instance.process_with_node matching_node do
29
- @instance.instance_eval &@block
29
+ @instance.instance_eval(&@block)
30
30
  end
31
31
  end
32
32
  end
@@ -41,6 +41,14 @@ module Synvert::Core
41
41
  current_node.recursive_children do |child_node|
42
42
  matching_nodes << child_node if child_node.match? @rules
43
43
  end
44
+ elsif current_node.is_a?(Parser::AST::Node)
45
+ if current_node.type == :begin
46
+ current_node.children.each do |child_node|
47
+ matching_nodes << child_node if child_node.match? @rules
48
+ end
49
+ else
50
+ matching_nodes << current_node if current_node.match? @rules
51
+ end
44
52
  else
45
53
  current_node.each do |child_node|
46
54
  matching_nodes << child_node if child_node.match? @rules
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Synvert
4
4
  module Core
5
- VERSION = '0.19.0'
5
+ VERSION = '0.21.2'
6
6
  end
7
7
  end
@@ -295,7 +295,7 @@ describe Parser::AST::Node do
295
295
 
296
296
  it 'get for range' do
297
297
  node = parse('(1..10)')
298
- expect(node.to_value).to eq (1..10)
298
+ expect(node.to_value).to eq(1..10)
299
299
  end
300
300
 
301
301
  it 'gets for array' do
@@ -80,5 +80,17 @@ module Synvert::Core
80
80
  expect(dummy_instance.strip_brackets('(123]')).to eq '(123]'
81
81
  end
82
82
  end
83
+
84
+ describe '#reject_keys_from_hash' do
85
+ it 'rejects single key' do
86
+ hash_node = Parser::CurrentRuby.parse("{ key1: 'value1', key2: 'value2' }")
87
+ expect(dummy_instance.reject_keys_from_hash(hash_node, :key1)).to eq "key2: 'value2'"
88
+ end
89
+
90
+ it 'rejects multi keys' do
91
+ hash_node = Parser::CurrentRuby.parse("{ key1: 'value1', key2: 'value2', key3: 'value3', key4: 'value4' }")
92
+ expect(dummy_instance.reject_keys_from_hash(hash_node, :key1, :key3)).to eq "key2: 'value2', key4: 'value4'"
93
+ end
94
+ end
83
95
  end
84
96
  end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ module Synvert::Core
6
+ describe Rewriter::RubyVersion do
7
+ it 'returns true if ruby version is greater than 1.9' do
8
+ ruby_version = Rewriter::RubyVersion.new('1.9')
9
+ expect(ruby_version).to be_match
10
+ end
11
+
12
+ it 'returns false if ruby version is less than 19.0' do
13
+ ruby_version = Rewriter::RubyVersion.new('19.0')
14
+ expect(ruby_version).not_to be_match
15
+ end
16
+ end
17
+ end
@@ -230,6 +230,12 @@ module Synvert::Core
230
230
  Rewriter.call 'group', 'rewriter'
231
231
  end
232
232
 
233
+ it 'registers and calls rewriter in sandbox mode' do
234
+ rewriter = Rewriter.new 'group', 'rewriter'
235
+ expect(rewriter).to receive(:process_with_sandbox)
236
+ Rewriter.call 'group', 'rewriter', true
237
+ end
238
+
233
239
  it 'raises RewriterNotFound if rewriter not found' do
234
240
  expect { Rewriter.call 'group', 'rewriter' }.to raise_error(RewriterNotFound)
235
241
  end
data/synvert-core.gemspec CHANGED
@@ -1,5 +1,6 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'synvert/core/version'
5
6
 
@@ -8,8 +9,8 @@ Gem::Specification.new do |spec|
8
9
  spec.version = Synvert::Core::VERSION
9
10
  spec.authors = ["Richard Huang"]
10
11
  spec.email = ["flyerhzm@gmail.com"]
11
- spec.summary = %q{convert ruby code to better syntax.}
12
- spec.description = %q{convert ruby code to better syntax automatically.}
12
+ spec.summary = 'convert ruby code to better syntax.'
13
+ spec.description = 'convert ruby code to better syntax automatically.'
13
14
  spec.homepage = "https://github.com/xinminlabs/synvert-core"
14
15
  spec.license = "MIT"
15
16
 
@@ -18,13 +19,13 @@ Gem::Specification.new do |spec|
18
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
20
  spec.require_paths = ["lib"]
20
21
 
21
- spec.add_runtime_dependency "parser", "~> 3.0.0"
22
22
  spec.add_runtime_dependency "activesupport"
23
23
  spec.add_runtime_dependency "erubis"
24
+ spec.add_runtime_dependency "parser", "~> 3.0.0"
24
25
 
25
26
  spec.add_development_dependency "bundler"
26
- spec.add_development_dependency "rake"
27
- spec.add_development_dependency "rspec"
28
27
  spec.add_development_dependency "guard"
29
28
  spec.add_development_dependency "guard-rspec"
29
+ spec.add_development_dependency "rake"
30
+ spec.add_development_dependency "rspec"
30
31
  end
metadata CHANGED
@@ -1,31 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synvert-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.21.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: 2021-02-07 00:00:00.000000000 Z
11
+ date: 2021-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: parser
14
+ name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.0
19
+ version: '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: 3.0.0
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: activesupport
28
+ name: erubis
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -39,19 +39,19 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: erubis
42
+ name: parser
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 3.0.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: 3.0.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rake
70
+ name: guard
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rspec
84
+ name: guard-rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: guard
98
+ name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
@@ -109,7 +109,7 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: guard-rspec
112
+ name: rspec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
@@ -183,6 +183,7 @@ files:
183
183
  - spec/synvert/core/rewriter/gem_spec_spec.rb
184
184
  - spec/synvert/core/rewriter/helper_spec.rb
185
185
  - spec/synvert/core/rewriter/instance_spec.rb
186
+ - spec/synvert/core/rewriter/ruby_version_spec.rb
186
187
  - spec/synvert/core/rewriter/scope/goto_scope_spec.rb
187
188
  - spec/synvert/core/rewriter/scope/within_scope.rb
188
189
  - spec/synvert/core/rewriter/scope_spec.rb
@@ -231,6 +232,7 @@ test_files:
231
232
  - spec/synvert/core/rewriter/gem_spec_spec.rb
232
233
  - spec/synvert/core/rewriter/helper_spec.rb
233
234
  - spec/synvert/core/rewriter/instance_spec.rb
235
+ - spec/synvert/core/rewriter/ruby_version_spec.rb
234
236
  - spec/synvert/core/rewriter/scope/goto_scope_spec.rb
235
237
  - spec/synvert/core/rewriter/scope/within_scope.rb
236
238
  - spec/synvert/core/rewriter/scope_spec.rb