Skip to content

Commit

Permalink
Adds Ruby 3.2 to CI. Updates rubocop and addresses lints. (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
petergoldstein authored Jan 16, 2023
1 parent 41df876 commit cbe861d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 15 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions test/bootboot_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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"))
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -226,15 +226,15 @@ 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
assert_equal(
"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
Expand Down

0 comments on commit cbe861d

Please sign in to comment.