From 1941f9bedb1dbed1874cdec584f8b9bd69a2b3af Mon Sep 17 00:00:00 2001 From: Joel Azemar Date: Thu, 30 Sep 2021 17:21:12 +0200 Subject: [PATCH] update: parser deprecations https://github.com/tjgrathwell/rails5-spec-converter/pull/15 https://github.com/dflynn15 @dflynn15 @testdouble --- lib/rails5/spec_converter/hash_rewriter.rb | 4 ++++ lib/rails5/spec_converter/test_type_identifier.rb | 2 +- lib/rails5/spec_converter/text_transformer.rb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/rails5/spec_converter/hash_rewriter.rb b/lib/rails5/spec_converter/hash_rewriter.rb index fc184d4..cd3e4e2 100644 --- a/lib/rails5/spec_converter/hash_rewriter.rb +++ b/lib/rails5/spec_converter/hash_rewriter.rb @@ -255,4 +255,8 @@ def log(str) puts str end + + def transform_format(params) + log params + end end \ No newline at end of file diff --git a/lib/rails5/spec_converter/test_type_identifier.rb b/lib/rails5/spec_converter/test_type_identifier.rb index 701ccf9..ebd0e39 100644 --- a/lib/rails5/spec_converter/test_type_identifier.rb +++ b/lib/rails5/spec_converter/test_type_identifier.rb @@ -21,7 +21,7 @@ def initialize(content, options = TextTransformerOptions.new) ast_builder = Astrolabe::Builder.new @parser = Parser::CurrentRuby.new(ast_builder) - @source_rewriter = Parser::Source::Rewriter.new(@source_buffer) + @source_rewriter = Parser::Source::TreeRewriter.new(@source_buffer) end def test_type diff --git a/lib/rails5/spec_converter/text_transformer.rb b/lib/rails5/spec_converter/text_transformer.rb index 98556b3..904795c 100644 --- a/lib/rails5/spec_converter/text_transformer.rb +++ b/lib/rails5/spec_converter/text_transformer.rb @@ -20,7 +20,7 @@ def initialize(content, options = TextTransformerOptions.new) ast_builder = Astrolabe::Builder.new @parser = Parser::CurrentRuby.new(ast_builder) - @source_rewriter = Parser::Source::Rewriter.new(@source_buffer) + @source_rewriter = Parser::Source::TreeRewriter.new(@source_buffer) end def transform