From cbe861dae88295ef3d9ffe5d7179a4049aca15c7 Mon Sep 17 00:00:00 2001 From: Peter Goldstein Date: Mon, 16 Jan 2023 16:35:49 -0500 Subject: [PATCH] Adds Ruby 3.2 to CI. Updates rubocop and addresses lints. (#56) --- .github/workflows/ci.yml | 2 +- Gemfile.lock | 29 +++++++++++++++-------------- test/bootboot_test.rb | 20 ++++++++++---------- 3 files changed, 26 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71755f7..b94a6a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: name: Ruby ${{ matrix.ruby }} strategy: matrix: - ruby: ["2.7", "3.0", "3.1"] + ruby: ["2.7", "3.0", "3.1", "3.2"] steps: - name: Check out code uses: actions/checkout@v3 diff --git a/Gemfile.lock b/Gemfile.lock index b3475b5..589d7b4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,30 +7,31 @@ GEM remote: https://rubygems.org/ specs: ast (2.4.2) - minitest (5.15.0) + json (2.6.3) + minitest (5.17.0) parallel (1.22.1) - parser (3.1.2.0) + parser (3.2.0.0) ast (~> 2.4.1) - rainbow (2.2.2) - rake + rainbow (3.1.1) rake (13.0.6) - regexp_parser (2.3.0) + regexp_parser (2.6.1) rexml (3.2.5) - rubocop (1.28.1) + rubocop (1.43.0) + json (~> 2.3) parallel (~> 1.10) - parser (>= 3.1.0.0) + parser (>= 3.2.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) - rexml - rubocop-ast (>= 1.17.0, < 2.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.24.1, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.17.0) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.24.1) parser (>= 3.1.1.0) - rubocop-shopify (2.5.0) - rubocop (~> 1.25) + rubocop-shopify (2.11.1) + rubocop (~> 1.42) ruby-progressbar (1.11.0) - unicode-display_width (2.1.0) + unicode-display_width (2.4.2) PLATFORMS ruby diff --git a/test/bootboot_test.rb b/test/bootboot_test.rb index 1176b3a..d687045 100644 --- a/test/bootboot_test.rb +++ b/test/bootboot_test.rb @@ -76,7 +76,7 @@ def test_sync_the_gemfile_next_after_installation_of_new_gem_with_custom_bootboo output = run_bundle_command( 'exec ruby -e "require \'minitest\';puts Minitest::VERSION"', file.path, - env: { "SHOPIFY_NEXT" => "1" } + env: { "SHOPIFY_NEXT" => "1" }, ) assert_equal("5.15.0", output.strip) @@ -94,14 +94,14 @@ def test_sync_the_gemfile_next_after_update_of_gem "= 10.5.0", Bundler::Definition.build( file.path, "#{file.path}.lock", false - ).locked_deps["rake"].requirement.to_s + ).locked_deps["rake"].requirement.to_s, ) assert_equal( "= 10.5.0", Bundler::Definition.build( file.path, gemfile_next(file), false - ).locked_deps["rake"].requirement.to_s + ).locked_deps["rake"].requirement.to_s, ) File.write(file, file.read.gsub("10.5.0", "11.3.0")) @@ -112,14 +112,14 @@ def test_sync_the_gemfile_next_after_update_of_gem "= 11.3.0", Bundler::Definition.build( file.path, "#{file.path}.lock", false - ).locked_deps["rake"].requirement.to_s + ).locked_deps["rake"].requirement.to_s, ) assert_equal( "= 11.3.0", Bundler::Definition.build( file.path, gemfile_next(file), false - ).locked_deps["rake"].requirement.to_s + ).locked_deps["rake"].requirement.to_s, ) end end @@ -141,14 +141,14 @@ def test_sync_the_gemfile_next_when_gemfile_contain_if_else_statement "= 10.5.0", Bundler::Definition.build( file.path, "#{file.path}.lock", false - ).locked_deps["rake"].requirement.to_s + ).locked_deps["rake"].requirement.to_s, ) assert_equal( "= 11.3.0", Bundler::Definition.build( file.path, gemfile_next(file), false - ).locked_deps["rake"].requirement.to_s + ).locked_deps["rake"].requirement.to_s, ) end end @@ -202,7 +202,7 @@ def test_bootboot_command_initialize_the_next_lock_and_update_the_gemfile output = run_bundle_command( 'exec ruby -e "require \'minitest\';puts Minitest::VERSION"', file.path, - env: { "DEPENDENCIES_NEXT" => "1" } + env: { "DEPENDENCIES_NEXT" => "1" }, ) assert_equal("5.15.0", output.strip) @@ -226,7 +226,7 @@ def test_bundle_install_with_different_ruby_updating_gemfile_next_lock_succeeds RUBY_VERSION, Bundler::Definition.build( file.path, "#{file.path}.lock", false - ).locked_ruby_version_object.gem_version.to_s + ).locked_ruby_version_object.gem_version.to_s, ) with_env_next do @@ -234,7 +234,7 @@ def test_bundle_install_with_different_ruby_updating_gemfile_next_lock_succeeds "9.9.9", Bundler::Definition.build( file.path, gemfile_next(file), false - ).locked_ruby_version_object.gem_version.to_s + ).locked_ruby_version_object.gem_version.to_s, ) end end