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: actions/checkout@v3
|
||||||
- uses: ruby/setup-ruby@v1
|
- uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: '3.1'
|
ruby-version: '3.2'
|
||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
- name: Run rubocop
|
- name: Run rubocop
|
||||||
run: bundle exec rubocop --parallel --format progress
|
run: bundle exec rubocop --parallel --format progress
|
||||||
|
@ -28,8 +28,8 @@ jobs:
|
||||||
needs: ['rubocop']
|
needs: ['rubocop']
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
ruby-version: ['2.7', '3.0', '3.1', 'head']
|
ruby-version: ['3.0', '3.1', '3.2', 'head']
|
||||||
grape-version: [1.6.2, 1.5.3]
|
grape-version: [1.6.2, 1.7.0]
|
||||||
model-parser: [grape-swagger-entity, grape-swagger-representable, '']
|
model-parser: [grape-swagger-entity, grape-swagger-representable, '']
|
||||||
steps:
|
steps:
|
||||||
- name: Check out branch
|
- name: Check out branch
|
||||||
|
|
|
@ -5,7 +5,7 @@ AllCops:
|
||||||
- vendor/**/*
|
- vendor/**/*
|
||||||
- example/**/*
|
- example/**/*
|
||||||
NewCops: enable
|
NewCops: enable
|
||||||
TargetRubyVersion: 3.1
|
TargetRubyVersion: 3.2
|
||||||
SuggestExtensions: false
|
SuggestExtensions: false
|
||||||
|
|
||||||
# Layout stuff
|
# Layout stuff
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
grape-swagger
|
|
4
Gemfile
4
Gemfile
|
@ -2,11 +2,9 @@
|
||||||
|
|
||||||
source 'http://rubygems.org'
|
source 'http://rubygems.org'
|
||||||
|
|
||||||
ruby RUBY_VERSION
|
|
||||||
|
|
||||||
gemspec
|
gemspec
|
||||||
|
|
||||||
gem 'grape', case version = ENV.fetch('GRAPE_VERSION', '~> 1.6')
|
gem 'grape', case version = ENV.fetch('GRAPE_VERSION', '~> 1.7')
|
||||||
when 'HEAD'
|
when 'HEAD'
|
||||||
{ git: 'https://github.com/ruby-grape/grape' }
|
{ git: 'https://github.com/ruby-grape/grape' }
|
||||||
else
|
else
|
||||||
|
|
|
@ -30,7 +30,7 @@ RSpec.describe GrapeSwagger::Rake::OapiTasks do
|
||||||
|
|
||||||
describe '.new' do
|
describe '.new' do
|
||||||
it 'accepts class name as a constant' 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
|
end
|
||||||
|
|
||||||
it 'accepts class name as a string' do
|
it 'accepts class name as a string' do
|
||||||
|
|
|
@ -21,21 +21,7 @@ describe 'API with additional options' do
|
||||||
expect(subject).to eq(
|
expect(subject).to eq(
|
||||||
[
|
[
|
||||||
{ description: 'Swagger compatible API description' },
|
{ description: 'Swagger compatible API description' },
|
||||||
{
|
{ description: 'Swagger compatible API description for specific API', params: {} }
|
||||||
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'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue