Skip to content

Commit 3a2ebc0

Browse files
committed
Add support for Grape 3.0 and test in CI
1 parent 7f759b6 commit 3a2ebc0

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,17 @@ jobs:
2222
strategy:
2323
matrix:
2424
ruby-version: [3.4.4, 3.3.8, 3.2.8, 3.1.7]
25+
grape-version: ['~> 2.3.0', '~> 3.0']
2526
steps:
2627
- uses: actions/checkout@v4
2728
- uses: ruby/setup-ruby@v1
2829
with:
2930
ruby-version: ${{ matrix.ruby-version }}
3031
- name: Install dependencies
3132
run: bundle install --jobs 4 --retry 3
33+
env:
34+
GRAPE_VERSION: ${{ matrix.grape-version }}
3235
- name: Run tests
3336
run: bundle exec rake
37+
env:
38+
GRAPE_VERSION: ${{ matrix.grape-version }}

lib/grape-active_model_serializers/options_builder.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,7 @@ def default_root_options
4949
end
5050

5151
def innermost_scope
52-
if endpoint.respond_to?(:namespace_stackable)
53-
endpoint.namespace_stackable(:namespace).last
54-
else
55-
endpoint.settings.peek[:namespace]
56-
end
52+
endpoint.inheritable_setting.namespace_stackable[:namespace]&.last
5753
end
5854

5955
def meta_options

0 commit comments

Comments
 (0)