From 69e91790a0cda12aebda0f361347b56487006d99 Mon Sep 17 00:00:00 2001 From: Manabu Niseki Date: Tue, 14 Nov 2023 17:16:43 +0900 Subject: [PATCH] Allow using Grape v2 (#910) * Allow using Grape v2 * Update CHANGELOG.md --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++++++ CHANGELOG.md | 1 + grape-swagger.gemspec | 2 +- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8cda30b2..d6820d5e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,6 +87,38 @@ jobs: bundle update bundle exec rspec + grape-20: + runs-on: ubuntu-latest + needs: ['rubocop'] + env: + GRAPE_VERSION: '2.0.0' + strategy: + matrix: + ruby-version: ['3.1', '3.2', 'head'] + steps: + - name: Check out branch + uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + - name: Run rspec wo model parser + run: | + bundle update + bundle exec rspec + - name: Run rspec w entity parser + env: + MODEL_PARSER: grape-swagger-entity + run: | + bundle update + bundle exec rspec + - name: Run rspec w representable parser + env: + MODEL_PARSER: grape-swagger-representable + run: | + bundle update + bundle exec rspec + grape-HEAD: runs-on: ubuntu-latest needs: ['rubocop'] diff --git a/CHANGELOG.md b/CHANGELOG.md index 237cc7b2..26fc1fda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ #### Features +* [#910](https://github.com/ruby-grape/grape-swagger/pull/910): Allow using Grape v2 - [@ninoseki](https://github.com/ninoseki) * Your contribution here. #### Fixes diff --git a/grape-swagger.gemspec b/grape-swagger.gemspec index 84cd12af..f661ffd1 100644 --- a/grape-swagger.gemspec +++ b/grape-swagger.gemspec @@ -15,7 +15,7 @@ Gem::Specification.new do |s| s.metadata['rubygems_mfa_required'] = 'true' s.required_ruby_version = '>= 2.7' - s.add_runtime_dependency 'grape', '~> 1.3' + s.add_runtime_dependency 'grape', '>= 1.3', '< 3.0' s.add_runtime_dependency 'rack-test', '~> 2' s.files = Dir['lib/**/*', '*.md', 'LICENSE.txt', 'grape-swagger.gemspec']