Skip to content

Commit

Permalink
style: 💄 apply rubocop fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kibitan committed Mar 14, 2024
1 parent fb74a5b commit e6bea53
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/masking/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def define_config_option(parser)
def define_version_option(parser)
parser.on('-v', '--version', 'version') do
puts Masking::VERSION
exit(true)
exit
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/masking/insert_statement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def values_regexp
# e.g. INSERT ... VALUES (123,'string ),( abc'),(456,'ab');
# refs: implementation of parsing CSV on ruby standard library FasterCSV (ja): https://www.clear-code.com/blog/2018/12/25.html
def recursive_pattern_value_concat!(value_rows, index)
return if value_rows[index].gsub(/\\\\/, '').gsub(/\\'/, '').count(?').even?
return if value_rows[index].gsub('\\\\', '').gsub("\\'", '').count(?').even?

# make destructive change for values_rows
value_rows[index] += VALUE_ROW_SPLITTER + value_rows.delete_at(index + 1)
Expand Down
4 changes: 2 additions & 2 deletions spec/masking/cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

shared_examples 'print Version and exit' do
it do
expect { subject }.to raise_error(SystemExit) & \
expect { subject }.to raise_error(SystemExit) &
output("#{Masking::VERSION}\n").to_stdout
end

Expand Down Expand Up @@ -75,7 +75,7 @@

shared_examples 'with errormessage and exitstatus is 1' do |error_text|
it do
expect { subject }.to raise_error(SystemExit) & \
expect { subject }.to raise_error(SystemExit) &
output(error_text).to_stderr
end

Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
require 'tapp'
require 'simplecov'

if ENV['CI'] == 'true' && \
if ENV['CI'] == 'true' &&
# compare only for major/minor version of Ruby in order to enable report for Coverall
Gem::Version.new(RUBY_VERSION).segments[0..1] == \
Gem::Version.new(File.read(File.join(File.dirname(__FILE__), '../.ruby-version'))).segments[0..1]
Expand Down

0 comments on commit e6bea53

Please sign in to comment.