From 6b3de4aa5b1415a4f088db5d2b48df29154b1f05 Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Sat, 13 Apr 2024 09:17:35 +0800 Subject: [PATCH] fix --version output --- lib/synvert/cli.rb | 2 +- lib/synvert/command.rb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/synvert/cli.rb b/lib/synvert/cli.rb index a878d40..dbaab6d 100644 --- a/lib/synvert/cli.rb +++ b/lib/synvert/cli.rb @@ -163,7 +163,7 @@ def run_option_parser(args) @options[:command] = 'test_bundle_gems' end opts.on '-v', '--version', 'show this version' do - puts "#{VERSION} (with synvert-core #{Core::VERSION}" + puts "#{VERSION} (with synvert-core #{Core::VERSION})" exit end end diff --git a/lib/synvert/command.rb b/lib/synvert/command.rb index 2ec8775..a941b56 100644 --- a/lib/synvert/command.rb +++ b/lib/synvert/command.rb @@ -81,8 +81,7 @@ def query_available_rewriters(query, format) if format == 'json' puts available_rewriters.select { |rewriter| rewriter[:group].include?(query) || rewriter[:name].include?(query) - } -.to_json + }.to_json else Core::Rewriter.availables.each do |group, rewriters| if group.include?(query)