diff --git a/colorls.gemspec b/colorls.gemspec index 390117fd..4588341e 100644 --- a/colorls.gemspec +++ b/colorls.gemspec @@ -75,7 +75,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'ronn', '~> 0' spec.add_development_dependency 'rspec', '~> 3.7' spec.add_development_dependency 'rspec-its', '~> 1.2' - spec.add_development_dependency 'rubocop', '~> 1.39.0' + spec.add_development_dependency 'rubocop', '~> 1.44.0' spec.add_development_dependency 'rubocop-performance', '~> 1.15.0' spec.add_development_dependency 'rubocop-rake', '~> 0.5' spec.add_development_dependency 'rubocop-rspec', '~> 2.17.0' diff --git a/lib/colorls/core.rb b/lib/colorls/core.rb index 7448e830..aa6a09b1 100644 --- a/lib/colorls/core.rb +++ b/lib/colorls/core.rb @@ -317,7 +317,7 @@ def long_info(content) line_array.push links if @hard_links_count line_array.push user_info(content) if @show_user line_array.push group_info(content.group) if @show_group - line_array.concat [size_info(content.size), mtime_info(content.mtime)] + line_array.push(size_info(content.size), mtime_info(content.mtime)) line_array.join(' ') end diff --git a/spec/color_ls/core_spec.rb b/spec/color_ls/core_spec.rb index 6cce9dd8..907abbb7 100644 --- a/spec/color_ls/core_spec.rb +++ b/spec/color_ls/core_spec.rb @@ -55,7 +55,7 @@ executable?: false ) - allow(::Dir).to receive(:entries).and_return([camera]) + allow(Dir).to receive(:entries).and_return([camera]) allow(ColorLS::FileInfo).to receive(:new).and_return(file_info) diff --git a/spec/color_ls/flags_spec.rb b/spec/color_ls/flags_spec.rb index 33d3c927..d4e8992a 100644 --- a/spec/color_ls/flags_spec.rb +++ b/spec/color_ls/flags_spec.rb @@ -149,8 +149,8 @@ end it 'returns no user / group info' do - allow(::Etc).to receive(:getpwuid).and_return(nil) - allow(::Etc).to receive(:getgrgid).and_return(nil) + allow(Etc).to receive(:getpwuid).and_return(nil) + allow(Etc).to receive(:getgrgid).and_return(nil) expect { subject }.to output(/\s+ \d+ \s+ \d+ .* a.txt/mx).to_stdout end @@ -338,7 +338,7 @@ let(:args) { ['--snafu'] } it 'issues a warning, hint about `--help` and exit' do # rubocop:todo RSpec/MultipleExpectations - allow(::Kernel).to receive(:warn) do |message| + allow(Kernel).to receive(:warn) do |message| expect(message).to output '--snafu' end