Uses Ruby 3.2 (#889)

* Updates GH action matrix.

* Improves Actions.

* Updates matrix to use runy 3.2
This commit is contained in:
peter scholz 2023-02-19 15:02:15 +01:00 committed by GitHub
parent 1eb9fe6a86
commit 557df89f82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 24 deletions

View File

@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
ruby-version: '3.2'
bundler-cache: true
- name: Run rubocop
run: bundle exec rubocop --parallel --format progress
@ -28,8 +28,8 @@ jobs:
needs: ['rubocop']
strategy:
matrix:
ruby-version: ['2.7', '3.0', '3.1', 'head']
grape-version: [1.6.2, 1.5.3]
ruby-version: ['3.0', '3.1', '3.2', 'head']
grape-version: [1.6.2, 1.7.0]
model-parser: [grape-swagger-entity, grape-swagger-representable, '']
steps:
- name: Check out branch

View File

@ -5,7 +5,7 @@ AllCops:
- vendor/**/*
- example/**/*
NewCops: enable
TargetRubyVersion: 3.1
TargetRubyVersion: 3.2
SuggestExtensions: false
# Layout stuff

View File

@ -1 +0,0 @@
grape-swagger

View File

@ -2,11 +2,9 @@
source 'http://rubygems.org'
ruby RUBY_VERSION
gemspec
gem 'grape', case version = ENV.fetch('GRAPE_VERSION', '~> 1.6')
gem 'grape', case version = ENV.fetch('GRAPE_VERSION', '~> 1.7')
when 'HEAD'
{ git: 'https://github.com/ruby-grape/grape' }
else

View File

@ -30,7 +30,7 @@ RSpec.describe GrapeSwagger::Rake::OapiTasks do
describe '.new' do
it 'accepts class name as a constant' do
expect(described_class.new(::Api::Base).send(:api_class)).to eq(Api::Base)
expect(described_class.new(Api::Base).send(:api_class)).to eq(Api::Base)
end
it 'accepts class name as a string' do

View File

@ -21,21 +21,7 @@ describe 'API with additional options' do
expect(subject).to eq(
[
{ description: 'Swagger compatible API description' },
{
description: 'Swagger compatible API description for specific API',
params: {
'locale' => {
desc: 'Locale of API documentation',
required: false,
type: 'Symbol'
},
'name' => {
desc: 'Resource name of mounted API',
required: true,
type: 'String'
}
}
}
{ description: 'Swagger compatible API description for specific API', params: {} }
]
)
end