Skip to content

Add Ruby 2.7-3.4 to the CI matrix #858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

taketo1113
Copy link

This Pull Request adds Ruby 2.7-3.4 to the CI matrix.

Changes

Update the CI matrix

  • Added Ruby 2.7-3.4 to the CI matrix.
  • Removed the patch version numbers from the version format to ensure that the latest patch version of each Ruby version is used.

Relax version constraints for 'mocha' and 'minitest' for development dependencies.

This addresses the following error occurred with Ruby 3.4 and minitest v5.2.0:

/bundle_path/ruby/3.4.0/gems/minitest-5.2.0/lib/minitest.rb:3: warning: mutex_m was loaded from the standard library, but is not part of the default gems starting from Ruby 3.4.0.
You can add mutex_m to your Gemfile or gemspec to silence this warning.
/Users/taketo/.rbenv/versions/3.4.2/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require': cannot load such file -- mutex_m (LoadError)

Fix incorrect casing of 'Minitest' in test case definition.

At least as of minitest v5.2.0, the class name is Minitest, so I have updated it to match the actual class name.

https://github.com/minitest/minitest/blob/v5.2.0/lib/minitest/test.rb#L3

This fixes the following NameError that occurred with Ruby 3.4.

/path/whenever/test/test_case.rb:8:in '<module:Whenever>': uninitialized constant Whenever::MiniTest (NameError)

    class TestCase < MiniTest::Unit::TestCase; end
                     ^^^^^^^^
Did you mean?  Minitest
	from /path/whenever/test/test_case.rb:1:in '<top (required)>'
	from /Users/taketo/.rbenv/versions/3.4.2/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
	from /Users/taketo/.rbenv/versions/3.4.2/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
	from /path/whenever/test/test_helper.rb:2:in '<top (required)>'
	from /Users/taketo/.rbenv/versions/3.4.2/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
	from /Users/taketo/.rbenv/versions/3.4.2/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
	from /path/whenever/test/functional/command_line_test.rb:1:in '<top (required)>'
	from /Users/taketo/.rbenv/versions/3.4.2/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
	from /Users/taketo/.rbenv/versions/3.4.2/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
	from /path/whenever/tmp/ruby/3.4.0/gems/rake-13.2.1/lib/rake/rake_test_loader.rb:21:in 'block in <main>'
	from /path/whenever/tmp/ruby/3.4.0/gems/rake-13.2.1/lib/rake/rake_test_loader.rb:6:in 'Array#select'
	from /path/whenever/tmp/ruby/3.4.0/gems/rake-13.2.1/lib/rake/rake_test_loader.rb:6:in '<main>'

Use 'mocha/minitest' instead of 'mocha/setup'

This addresses the following deprecation warning:

Mocha deprecation warning at /Users/taketo/.rbenv/versions/3.4.2/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require': Require 'mocha/test_unit', 'mocha/minitest' or 'mocha/api' instead of 'mocha/setup'.

Relax version constraints for 'mocha' and 'minitest' for development dependencies

Fix incorrect casing of 'Minitest' in test case definition

Use 'mocha/minitest' instead of 'mocha/setup' to address deprecation warning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant