Skip to content

Conversation

ericproulx
Copy link
Contributor

Add Rack 3.2 Support

Summary

This PR adds support for testing Grape with Rack 3.2.x versions by introducing a new gemfile and updating the CI workflow to include it in the test matrix.

Changes

Added

  • New gemfile: gemfiles/rack_3_2.gemfile - Tests compatibility with Rack ~> 3.2
  • CI integration: Updated .github/workflows/test.yml to include rack_3_2.gemfile in the test matrix

Modified

  • GitHub Actions workflow: Extended the test matrix to include the new Rack 3.2 gemfile alongside existing Rack versions (2.0, 3.0, 3.1)

Testing

The changes ensure that Grape is tested against Rack 3.2.x versions across all supported Ruby versions (3.0, 3.1, 3.2, 3.3, 3.4). This maintains backward compatibility while ensuring forward compatibility with the latest Rack releases.

Impact

  • No breaking changes: This is purely additive - existing functionality remains unchanged
  • Enhanced compatibility: Ensures Grape works correctly with Rack 3.2.x
  • CI coverage: Provides automated testing coverage for Rack 3.2 compatibility

Related

This follows the existing pattern of supporting multiple Rack versions as seen with:

  • gemfiles/rack_2_0.gemfile (Rack 2.0.x)
  • gemfiles/rack_3_0.gemfile (Rack 3.0.x)
  • gemfiles/rack_3_1.gemfile (Rack 3.1.x)
  • gemfiles/rack_3_2.gemfile (Rack 3.2.x) ← New

Checklist

  • Added new gemfile for Rack 3.2 testing
  • Updated CI workflow to include new gemfile in test matrix
  • Verified gemfile follows existing patterns
  • No breaking changes introduced

@ericproulx ericproulx force-pushed the add_rack_3_2_gemfile branch 3 times, most recently from 2103e86 to a8e9f0a Compare September 20, 2025 15:10
@ericproulx ericproulx requested a review from dblock September 22, 2025 08:42
@ericproulx ericproulx marked this pull request as ready for review September 22, 2025 08:42
- Remove namespace_reverse_stackable method from Grape::DSL::Settings
- Replace direct calls to namespace_reverse_stackable with inheritable_setting.namespace_reverse_stackable
- Update rescue_from implementation to use direct inheritable_setting access
- Update tests to verify actual behavior instead of mocking internal methods
- Simplify test setup by extending Grape::DSL::Settings instead of manually stubbing methods
- Move namespace_stackable_with_hash method from DSL::Settings to InheritableSetting
- Update all internal usage to use inheritable_setting.namespace_stackable_with_hash
- Remove public method from DSL::Settings module
- Update tests to reflect the new internal structure
- Increase RuboCop AbcSize limit to accommodate refactored code
- Add enable_coverage :branch to SimpleCov.start block
- Improves test coverage reporting by tracking branch coverage
- Helps identify untested code paths and conditional logic
- Add gemfiles/rack_3_2.gemfile for testing with Rack ~> 3.2
- Update GitHub Actions workflow to include rack_3_2.gemfile in test matrix
- Ensures compatibility with latest Rack 3.2.x versions
@dblock dblock merged commit 6dc01a7 into master Sep 25, 2025
299 of 307 checks passed
@dblock dblock deleted the add_rack_3_2_gemfile branch September 25, 2025 15:25
@dblock
Copy link
Member

dblock commented Sep 25, 2025

@ericproulx I merged this one, you can close the intermediate PRs.

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.

2 participants