Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several updates to the codebase, focusing on upgrading dependencies, adding support for multiple Rails versions, and refactoring controller parameter handling. The most important changes include updating Ruby and Rails versions, refactoring parameter handling into a concern, and modifying test cases to ensure compatibility with new validations.
Dependency Updates:
.github/workflows/ci.yml
: Updated Ruby version from3.3.4
to3.3.6
and added a matrix strategy to test against Rails versions7.2
and8.0
. [1] [2]Gemfile
: Added conditional logic to use different versions ofpanko_serializer
based on the Rails version. [1] [2].rubocop.yml
: UpdatedTargetRubyVersion
from2.6
to3.3
.Refactoring:
app/controllers/rest_api_generator/child_resource_controller.rb
andapp/controllers/rest_api_generator/resource_controller.rb
: Moved parameter handling methods to a new concernResourceParams
. [1] [2] [3] [4]lib/rest_api_generator/resource_params.rb
: Introduced a new concernResourceParams
to handle parameter filtering and strong parameters.Test Updates:
spec/dummy/app/models/transaction.rb
: Added validation for theamount
attribute.spec/lib/rest_api_generator/resource_controller_spec.rb
: Updated test cases to includeamount
attribute and added a test for invalid parameters. [1] [2] [3]Other Changes:
spec/dummy/.ruby-version
: Updated Ruby version to3.3.6
.spec/dummy/app/controllers/application_controller.rb
: Changed the base class toActionController::API
.