Skip to content

Commit 14adf93

Browse files
authored
Makes rubocop happy. (#848)
* Makes rubocop happy. * Updates GH action matrix. * Improves Actions.
1 parent 4ea61c4 commit 14adf93

File tree

6 files changed

+49
-61
lines changed

6 files changed

+49
-61
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Ruby
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
pull_request:
8+
branches:
9+
- '*'
10+
11+
jobs:
12+
rubocop:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: ruby/setup-ruby@v1
17+
with:
18+
ruby-version: '3.0'
19+
bundler-cache: true
20+
- name: Run rubocop
21+
run: bundle exec rubocop --parallel --format progress
22+
23+
rspec:
24+
runs-on: ubuntu-latest
25+
needs: ['rubocop']
26+
strategy:
27+
matrix:
28+
ruby-version: ['2.7', '3.0', '3.1', 'head']
29+
grape-version: [1.6.2, 1.5.3]
30+
model-parser: [grape-swagger-entity, grape-swagger-representable, '']
31+
steps:
32+
- name: Check out branch
33+
uses: actions/checkout@v2
34+
- name: Set up Ruby
35+
uses: ruby/setup-ruby@v1
36+
with:
37+
ruby-version: ${{ matrix.ruby-version }}
38+
GRAPE_VERSION: ${{ matrix.grape-version }}
39+
MODEL_PARSER: ${{ matrix.model-parser }}
40+
bundler-cache: true
41+
- name: Run rspec rest of the suite
42+
run: bundle exec rspec

.github/workflows/rubocop.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/ruby.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.rubocop.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ Style/HashTransformKeys:
107107
Style/HashTransformValues:
108108
Enabled: true
109109

110+
Style/OpenStructUse:
111+
Exclude:
112+
- spec/**/*
113+
110114
Style/RegexpLiteral:
111115
Enabled: false
112116

grape-swagger.gemspec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ Gem::Specification.new do |s|
1313
s.summary = 'Add auto generated documentation to your Grape API that can be displayed with Swagger.'
1414
s.license = 'MIT'
1515

16-
s.required_ruby_version = '>= 2.5'
16+
s.metadata['rubygems_mfa_required'] = 'true'
17+
18+
s.required_ruby_version = '>= 2.7'
1719
s.add_runtime_dependency 'grape', '~> 1.3'
1820

1921
s.files = `git ls-files`.split("\n")

spec/spec_helper.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
require 'coveralls'
66

77
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
8-
SimpleCov.start do
9-
add_filter 'spec/'
10-
add_filter 'example/'
11-
end
128
Coveralls.wear!
139
end
1410

0 commit comments

Comments
 (0)