Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to work with Grape 2.0 #911

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason why this change?
it isn't related nor needed

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
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@

#### Fixes

* [#903](https://github.com/ruby-grape/grape-swagger/pull/903): Accept `example` documentation parameter for arrays - [@VladMomotov](https://github.com/VladMomotov)
* Your contribution here.

### 1.6.2

#### Fixes

* [#903](https://github.com/ruby-grape/grape-swagger/pull/903): Accept `example` documentation parameter for arrays - [@VladMomotov](https://github.com/VladMomotov)
* [#911](https://github.com/ruby-grape/grape-swagger/pull/911): Fix compatibility with Grape 2.0.0 - [@mscrivo](https://github.com/mscrivo)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move it to the feature section



### 1.6.1 (May 21, 2023)

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']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??? any reason why

s.add_runtime_dependency 'rack-test', '~> 2'

s.files = Dir['lib/**/*', '*.md', 'LICENSE.txt', 'grape-swagger.gemspec']
Expand Down
2 changes: 1 addition & 1 deletion lib/grape-swagger/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module GrapeSwagger
VERSION = '1.6.1'
VERSION = '1.6.2'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert it

end