Skip to content

Commit f1f17fc

Browse files
committed
Upgrade Grape to 2.x.
1 parent f1ab3c5 commit f1f17fc

File tree

10 files changed

+188
-164
lines changed

10 files changed

+188
-164
lines changed

.github/workflows/rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ jobs:
88
- name: Set up Ruby
99
uses: ruby/setup-ruby@v1
1010
with:
11-
ruby-version: "3.1.2"
11+
ruby-version: 3.3.3
1212
bundler-cache: true
1313
- run: bundle exec rubocop

.rubocop.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Layout/LineLength:
1616
require:
1717
- rubocop-capybara
1818
- rubocop-rails
19+
- rubocop-rspec_rails
1920
- rubocop-rake
2021
- rubocop-rspec
2122

.rubocop_todo.yml

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2024-03-19 16:06:55 UTC using RuboCop version 1.62.1.
3+
# on 2024-08-31 12:33:26 UTC using RuboCop version 1.62.1.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -14,59 +14,49 @@ Lint/EmptyBlock:
1414

1515
# Offense count: 1
1616
# This cop supports unsafe autocorrection (--autocorrect-all).
17+
# Configuration parameters: AutoCorrect.
1718
RSpec/EmptyExampleGroup:
1819
Exclude:
1920
- 'spec/helpers/welcome_helper_spec.rb'
2021

2122
# Offense count: 4
2223
# Configuration parameters: CountAsOne.
2324
RSpec/ExampleLength:
24-
Max: 13
25+
Max: 22
2526

2627
# Offense count: 5
27-
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
28-
# Include: **/*_spec*rb*, **/spec/**/*
29-
RSpec/FilePath:
28+
RSpec/MultipleExpectations:
29+
Max: 2
30+
31+
# Offense count: 2
32+
RSpec/RepeatedExample:
33+
Exclude:
34+
- 'spec/api/headers_spec.rb'
35+
36+
# Offense count: 5
37+
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
38+
# Include: **/*_spec.rb
39+
RSpec/SpecFilePathFormat:
3040
Exclude:
3141
- 'spec/api/headers_spec.rb'
3242
- 'spec/api/ping_spec.rb'
3343
- 'spec/api/post_spec.rb'
3444
- 'spec/api/protected_spec.rb'
3545
- 'spec/api/raise_spec.rb'
3646

37-
# Offense count: 4
38-
RSpec/MultipleExpectations:
39-
Max: 2
40-
4147
# Offense count: 4
4248
# This cop supports unsafe autocorrection (--autocorrect-all).
4349
# Configuration parameters: ResponseMethods.
4450
# ResponseMethods: response, last_response
45-
RSpec/Rails/HaveHttpStatus:
51+
RSpecRails/HaveHttpStatus:
4652
Exclude:
4753
- 'spec/api/post_spec.rb'
4854
- 'spec/api/protected_spec.rb'
4955

5056
# Offense count: 2
5157
# This cop supports unsafe autocorrection (--autocorrect-all).
5258
# Configuration parameters: Inferences.
53-
RSpec/Rails/InferredSpecType:
59+
RSpecRails/InferredSpecType:
5460
Exclude:
5561
- 'spec/features/homepage_spec.rb'
5662
- 'spec/features/swagger_spec.rb'
57-
58-
# Offense count: 2
59-
RSpec/RepeatedExample:
60-
Exclude:
61-
- 'spec/api/headers_spec.rb'
62-
63-
# Offense count: 5
64-
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
65-
# Include: **/*_spec.rb
66-
RSpec/SpecFilePathFormat:
67-
Exclude:
68-
- 'spec/api/headers_spec.rb'
69-
- 'spec/api/ping_spec.rb'
70-
- 'spec/api/post_spec.rb'
71-
- 'spec/api/protected_spec.rb'
72-
- 'spec/api/raise_spec.rb'

Gemfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ gem 'sprockets-rails'
1111
gem 'pg', '~> 1.1'
1212

1313
# Use the Puma web server [https://github.com/puma/puma]
14-
gem 'puma', '~> 5.6'
14+
gem 'puma'
1515

1616
# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
1717
gem 'importmap-rails'
@@ -46,7 +46,7 @@ gem 'bootsnap', require: false
4646
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
4747
# gem "image_processing", "~> 1.2"
4848

49-
gem 'grape', '~> 1.7'
49+
gem 'grape', '~> 2.1'
5050
gem 'grape-swagger'
5151

5252
group :development, :test do
@@ -77,6 +77,6 @@ group :test do
7777
gem 'rubocop-rails'
7878
gem 'rubocop-rake'
7979
gem 'rubocop-rspec'
80+
gem 'rubocop-rspec_rails'
8081
gem 'selenium-webdriver'
81-
gem 'webdrivers'
8282
end

0 commit comments

Comments
 (0)