Uses Ruby 3.2 (#889)
* Updates GH action matrix. * Improves Actions. * Updates matrix to use runy 3.2
This commit is contained in:
parent
1eb9fe6a86
commit
557df89f82
|
@ -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
|
||||
|
|
|
@ -5,7 +5,7 @@ AllCops:
|
|||
- vendor/**/*
|
||||
- example/**/*
|
||||
NewCops: enable
|
||||
TargetRubyVersion: 3.1
|
||||
TargetRubyVersion: 3.2
|
||||
SuggestExtensions: false
|
||||
|
||||
# Layout stuff
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
grape-swagger
|
4
Gemfile
4
Gemfile
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue