diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 617779dbc..4d2c2087d 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,15 +1,11 @@ # This configuration was generated by -# `rubocop --auto-gen-config --exclude-limit 500` -# on 2024-07-09 08:27:01 UTC using RuboCop version 1.64.1. +# `rubocop --auto-gen-config --exclude-limit 180` +# on 2024-07-10 23:53:15 UTC using RuboCop version 1.65.0. # 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 # versions of RuboCop, may require this file to be generated again. -RubyVersionGlobalsUsage: - Exclude: - - apipie-rails.gemspec - # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: Severity, Include. @@ -18,7 +14,7 @@ Gemspec/DeprecatedAttributeAssignment: Exclude: - 'apipie-rails.gemspec' -# Offense count: 11 +# Offense count: 12 # Configuration parameters: EnforcedStyle, AllowedGems, Include. # SupportedStyles: Gemfile, gems.rb, gemspec # Include: **/*.gemspec, **/Gemfile, **/gems.rb @@ -50,6 +46,13 @@ Gemspec/RequiredRubyVersion: Exclude: - 'spec/dummy/components/test_engine/test_engine.gemspec' +# Offense count: 1 +# Configuration parameters: Severity, Include. +# Include: **/*.gemspec +Gemspec/RubyVersionGlobalsUsage: + Exclude: + - 'apipie-rails.gemspec' + # Offense count: 24 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, IndentationWidth. @@ -590,12 +593,11 @@ Layout/TrailingEmptyLines: - 'spec/lib/apipie/generator/swagger/param_description_spec.rb' - 'spec/lib/apipie/param_group_spec.rb' -# Offense count: 15 +# Offense count: 14 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowInHeredoc. Layout/TrailingWhitespace: Exclude: - - 'lib/apipie/error_description.rb' - 'spec/dummy/app/controllers/application_controller.rb' - 'spec/dummy/app/controllers/twitter_example_controller.rb' @@ -741,20 +743,21 @@ Lint/UselessMethodDefinition: Exclude: - 'spec/dummy/app/controllers/overridden_concerns_controller.rb' -# Offense count: 3 +# Offense count: 4 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AutoCorrect, CheckForMethodsWithNoSideEffects. Lint/Void: Exclude: - 'spec/controllers/users_controller_spec.rb' + - 'spec/lib/swagger/swagger_dsl_spec.rb' # Offense count: 60 # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes. Metrics/AbcSize: Max: 96 -# Offense count: 3 -# Configuration parameters: CountBlocks. +# Offense count: 1 +# Configuration parameters: CountBlocks, CountModifierForms. Metrics/BlockNesting: Max: 4 @@ -1195,7 +1198,7 @@ Rails/Delegate: Exclude: - 'lib/apipie/response_description_adapter.rb' -# Offense count: 24 +# Offense count: 25 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: slashes, arguments @@ -1230,7 +1233,7 @@ Rails/NegateInclude: - 'lib/apipie/extractor/writer.rb' - 'spec/spec_helper.rb' -# Offense count: 7 +# Offense count: 6 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: Include. # Include: app/**/*.rb, config/**/*.rb, db/**/*.rb, lib/**/*.rb @@ -1406,7 +1409,7 @@ Style/CommentedKeyword: - 'lib/apipie/dsl_definition.rb' - 'lib/apipie/extractor/recorder.rb' -# Offense count: 8 +# Offense count: 7 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions. # SupportedStyles: assign_to_condition, assign_inside_condition @@ -1830,7 +1833,7 @@ Style/StringConcatenation: - 'lib/apipie/application.rb' - 'lib/apipie/extractor/writer.rb' -# Offense count: 1231 +# Offense count: 1233 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline. # SupportedStyles: single_quotes, double_quotes diff --git a/spec/controllers/pets_controller_spec.rb b/spec/controllers/pets_controller_spec.rb index b2ced196b..6490f637d 100644 --- a/spec/controllers/pets_controller_spec.rb +++ b/spec/controllers/pets_controller_spec.rb @@ -4,7 +4,7 @@ require 'apipie/rspec/response_validation_helper' require "json-schema" -RSpec.describe PetsController, :type => :controller do +RSpec.describe PetsController do it "does not raise error when rendered output matches the described response" do response = get :return_and_validate_expected_response, format: :json expect(response).to match_declared_responses diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 5b79e4b7b..727b9b5d6 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -62,9 +62,9 @@ def fail(msg) config.mock_with :rspec if Rails.version >= "7.1" - config.fixture_paths = ["#{::Rails.root}/spec/fixtures"] + config.fixture_paths = ["#{Rails.root}/spec/fixtures"] else - config.fixture_path = "#{::Rails.root}/spec/fixtures" + config.fixture_path = "#{Rails.root}/spec/fixtures" end # If you're not using ActiveRecord, or you'd prefer not to run each of your