Skip to content
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

Update CI Matrix to Include Ruby 3.4 and Replace FakeWeb with WebMock #38

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

Conversation

taketo1113
Copy link

This Pull Request introduces the following improvements:

  • Update the CI matrix to add Ruby versions 3.0 - 3.4
  • Replace fakeweb with webmock for Ruby 3.2 compatibility
  • Fix circular require warning on Ruby 3.2 and later
  • Fix test for ping http timeout on Ruby 3.1 and later

Details

CI Matrix Update

Adds support for Ruby 3.4, 3.3, 3.2, 3.1, 3.0, and retains 2.7 in the GitHub Actions test matrix.

Replacing FakeWeb with WebMock

The fakeweb gem is no longer maintained and is not compatible with Ruby 3.2 or later.
webmock is an actively maintained and feature-rich alternative for HTTP request stubbing.
https://github.com/bblimke/webmock

This update:

  • Modifies README.md and net-ping.gemspec to reflect the dependency change
  • Refactors test cases to use WebMock syntax while ensuring backward compatibility

Fix circular require warning

The warning was occurring on Ruby 3.2 and later due to a circular require issue.
This was resolved by removing an unnecessary require statement from net-ping.gemspec.

/Users/taketo/.rbenv/versions/3.2.4/bin/ruby -w -I"lib" /path/net-ping/tmp/ruby/3.2.0/gems/rake-13.2.1/lib/rake/rake_test_loader.rb "test/test_net_ping_external.rb" 
<internal:/Users/taketo/.rbenv/versions/3.2.4/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86: warning: <internal:/Users/taketo/.rbenv/versions/3.2.4/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86: warning: loading in progress, circular require considered harmful - /Users/taketo/.rbenv/versions/3.2.4/lib/ruby/3.2.0/rubygems.rb
	from <internal:gem_prelude>:2:in  `<internal:gem_prelude>'

Add Ruby versions 3.0 - 3.4 to CI matrix

Fix test for ping http timeout on Ruby 3.1 and later

Replace fakeweb with webmock for Ruby 3.2 compatibility

Fix circular require warning on Ruby 3.2 and later
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