Skip to content

Commit

Permalink
Upgrade Grape to 2.x.
Browse files Browse the repository at this point in the history
  • Loading branch information
dblock committed Aug 31, 2024
1 parent f1ab3c5 commit 3e15da2
Show file tree
Hide file tree
Showing 10 changed files with 188 additions and 164 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1.2"
ruby-version: 3.3.3
bundler-cache: true
- run: bundle exec rubocop
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Layout/LineLength:
require:
- rubocop-capybara
- rubocop-rails
- rubocop-rspec_rails
- rubocop-rake
- rubocop-rspec

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

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AutoCorrect.
RSpec/EmptyExampleGroup:
Exclude:
- 'spec/helpers/welcome_helper_spec.rb'

# Offense count: 4
# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Max: 13
Max: 22

# Offense count: 5
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
# Include: **/*_spec*rb*, **/spec/**/*
RSpec/FilePath:
RSpec/MultipleExpectations:
Max: 2

# Offense count: 2
RSpec/RepeatedExample:
Exclude:
- 'spec/api/headers_spec.rb'

# Offense count: 5
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
# Include: **/*_spec.rb
RSpec/SpecFilePathFormat:
Exclude:
- 'spec/api/headers_spec.rb'
- 'spec/api/ping_spec.rb'
- 'spec/api/post_spec.rb'
- 'spec/api/protected_spec.rb'
- 'spec/api/raise_spec.rb'

# Offense count: 4
RSpec/MultipleExpectations:
Max: 2

# Offense count: 4
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: ResponseMethods.
# ResponseMethods: response, last_response
RSpec/Rails/HaveHttpStatus:
RSpecRails/HaveHttpStatus:
Exclude:
- 'spec/api/post_spec.rb'
- 'spec/api/protected_spec.rb'

# Offense count: 2
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: Inferences.
RSpec/Rails/InferredSpecType:
RSpecRails/InferredSpecType:
Exclude:
- 'spec/features/homepage_spec.rb'
- 'spec/features/swagger_spec.rb'

# Offense count: 2
RSpec/RepeatedExample:
Exclude:
- 'spec/api/headers_spec.rb'

# Offense count: 5
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
# Include: **/*_spec.rb
RSpec/SpecFilePathFormat:
Exclude:
- 'spec/api/headers_spec.rb'
- 'spec/api/ping_spec.rb'
- 'spec/api/post_spec.rb'
- 'spec/api/protected_spec.rb'
- 'spec/api/raise_spec.rb'
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ gem 'sprockets-rails'
gem 'pg', '~> 1.1'

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

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

gem 'grape', '~> 1.7'
gem 'grape', '~> 2.1'
gem 'grape-swagger'

group :development, :test do
Expand Down Expand Up @@ -77,6 +77,6 @@ group :test do
gem 'rubocop-rails'
gem 'rubocop-rake'
gem 'rubocop-rspec'
gem 'rubocop-rspec_rails'
gem 'selenium-webdriver'
gem 'webdrivers'
end
Loading

0 comments on commit 3e15da2

Please sign in to comment.