From f1b95a291f87537d407eb939ea12f069dcb522e1 Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Tue, 9 Aug 2022 10:57:37 -0700 Subject: [PATCH] Update rubocop to 1.34.1 --- Gemfile | 4 ++-- Gemfile.lock | 16 +++++++++------- test/wordexp_test.rb | 8 ++++---- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/Gemfile b/Gemfile index 4117a0e..578cafb 100644 --- a/Gemfile +++ b/Gemfile @@ -6,8 +6,8 @@ gem 'minitest-ci', '~> 3.4' gem 'minitest-reporters', '~> 1.3' gem 'rake', '~> 13.0' gem 'rake-compiler', '~> 1.2' -gem 'rubocop', '1.24.1' +gem 'rubocop', '1.34.1' gem 'rubocop-minitest', '0.21.0' gem 'rubocop-packaging', '0.5.1' -gem 'rubocop-performance', '1.14.2' +gem 'rubocop-performance', '1.14.3' gem 'rubocop-rake', '0.6.0' diff --git a/Gemfile.lock b/Gemfile.lock index 1930a03..76da4df 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,6 +9,7 @@ GEM ansi (1.5.0) ast (2.4.2) builder (3.2.4) + json (2.6.2) minitest (5.16.2) minitest-ci (3.4.0) minitest (>= 5.0.6) @@ -26,13 +27,14 @@ GEM rake regexp_parser (2.5.0) rexml (3.2.5) - rubocop (1.24.1) + rubocop (1.34.1) + json (~> 2.3) parallel (~> 1.10) - parser (>= 3.0.0.0) + parser (>= 3.1.2.1) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) - rexml - rubocop-ast (>= 1.15.1, < 2.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.20.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) rubocop-ast (1.21.0) @@ -41,7 +43,7 @@ GEM rubocop (>= 0.90, < 2.0) rubocop-packaging (0.5.1) rubocop (>= 0.89, < 2.0) - rubocop-performance (1.14.2) + rubocop-performance (1.14.3) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) rubocop-rake (0.6.0) @@ -59,10 +61,10 @@ DEPENDENCIES minitest-reporters (~> 1.3) rake (~> 13.0) rake-compiler (~> 1.2) - rubocop (= 1.24.1) + rubocop (= 1.34.1) rubocop-minitest (= 0.21.0) rubocop-packaging (= 0.5.1) - rubocop-performance (= 1.14.2) + rubocop-performance (= 1.14.3) rubocop-rake (= 0.6.0) wordexp! diff --git a/test/wordexp_test.rb b/test/wordexp_test.rb index a021675..4c9cdd2 100644 --- a/test/wordexp_test.rb +++ b/test/wordexp_test.rb @@ -10,19 +10,19 @@ class WordexpTest < Minitest::Test end def test_environment_variable_expansion - assert_equal [ENV['HOME']], ::Wordexp.expand('$HOME') + assert_equal [Dir.home], ::Wordexp.expand('$HOME') end def test_tilde_expansion - assert_equal ["#{ENV['HOME']}/bin"], ::Wordexp.expand('~/bin') + assert_equal [File.join(Dir.home, 'bin')], ::Wordexp.expand('~/bin') end def test_command_substitution_backticks - assert_equal ["#{ENV['HOME']}/bin"], ::Wordexp.expand('`echo ~/bin`') + assert_equal [File.join(Dir.home, 'bin')], ::Wordexp.expand('`echo ~/bin`') end def test_command_substitution_dollar_parentheses - assert_equal ["#{ENV['HOME']}/bin"], ::Wordexp.expand('$(echo ~/bin)') + assert_equal [File.join(Dir.home, 'bin')], ::Wordexp.expand('$(echo ~/bin)') end def test_error_badchar