Skip to content

Commit

Permalink
Update to work with Grape 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mscrivo committed Nov 13, 2023
1 parent dfc0384 commit 5bb023e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 30 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
- name: Run rubocop
run: bundle exec rubocop --parallel --format progress

grape-17:
grape-18:
runs-on: ubuntu-latest
needs: ['rubocop']
env:
GRAPE_VERSION: '1.7.1'
GRAPE_VERSION: '1.8.0'
strategy:
matrix:
ruby-version: ['3.1', '3.2', 'head']
Expand Down Expand Up @@ -55,37 +55,37 @@ jobs:
bundle update
bundle exec rspec
grape-18:
grape-20:
runs-on: ubuntu-latest
needs: ['rubocop']
env:
GRAPE_VERSION: '1.8.0'
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
- 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
Expand Down
5 changes: 2 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# frozen_string_literal: true

source 'http://rubygems.org'
source 'https://rubygems.org'

gemspec

gem 'grape', case version = ENV.fetch('GRAPE_VERSION', '~> 1.7')
gem 'grape', case version = ENV.fetch('GRAPE_VERSION', '~> 1.8')
when 'HEAD'
{ git: 'https://github.com/ruby-grape/grape' }
else
Expand Down Expand Up @@ -34,7 +34,6 @@ end

group :test do
gem 'coveralls_reborn', require: false

gem 'ruby-grape-danger', '~> 0.2.0', require: false
gem 'simplecov', require: false
end
2 changes: 1 addition & 1 deletion grape-swagger.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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.0', '< 3.0.0']
s.add_runtime_dependency 'rack-test', '~> 2'

s.files = Dir['lib/**/*', '*.md', 'LICENSE.txt', 'grape-swagger.gemspec']
Expand Down

0 comments on commit 5bb023e

Please sign in to comment.