mirror of
https://github.com/samsonjs/grape-active_model_serializers.git
synced 2026-03-25 08:45:55 +00:00
Merge pull request #100 from samsonjs/fix/99-grape-3-support
Add support for Grape 3.0 and test in CI
This commit is contained in:
commit
26767f5fac
4 changed files with 8 additions and 5 deletions
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
|
|
@ -22,6 +22,7 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
ruby-version: [3.4.4, 3.3.8, 3.2.8, 3.1.7]
|
||||
grape-version: ['~> 2.3.0', '~> 3.0']
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ruby/setup-ruby@v1
|
||||
|
|
@ -29,5 +30,9 @@ jobs:
|
|||
ruby-version: ${{ matrix.ruby-version }}
|
||||
- name: Install dependencies
|
||||
run: bundle install --jobs 4 --retry 3
|
||||
env:
|
||||
GRAPE_VERSION: ${{ matrix.grape-version }}
|
||||
- name: Run tests
|
||||
run: bundle exec rake
|
||||
env:
|
||||
GRAPE_VERSION: ${{ matrix.grape-version }}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
### 2.0.1 (Next)
|
||||
|
||||
* [#92](https://github.com/ruby-grape/grape-active_model_serializers/pull/92): Fix: accept nil serializer - [@mateusnava](https://github.com/mateusnava).
|
||||
* [#100](https://github.com/ruby-grape/grape-active_model_serializers/pull/100): Fix compatibility with Grape 3.0 and test in CI - [@samsonjs](https://github.com/samsonjs).
|
||||
* Your contribution here.
|
||||
|
||||
### 2.0.0 (2025/06/02)
|
||||
|
|
|
|||
|
|
@ -49,11 +49,7 @@ module Grape
|
|||
end
|
||||
|
||||
def innermost_scope
|
||||
if endpoint.respond_to?(:namespace_stackable)
|
||||
endpoint.namespace_stackable(:namespace).last
|
||||
else
|
||||
endpoint.settings.peek[:namespace]
|
||||
end
|
||||
endpoint.inheritable_setting.namespace_stackable[:namespace]&.last
|
||||
end
|
||||
|
||||
def meta_options
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ describe 'Sequel Integration' do
|
|||
let!(:model) {
|
||||
SequelUser = Class.new(Sequel::Model(:users)) do
|
||||
include ActiveModel::Serialization
|
||||
|
||||
def self.model_name
|
||||
'User'
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue