diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 8ba8f755..1d5cb3fd 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,11 +1,27 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2023-11-01 17:06:53 UTC using RuboCop version 1.27.0. +# on 2023-11-29 09:36:55 UTC using RuboCop version 1.27.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. +# Offense count: 1 +# This cop supports safe auto-correction (--auto-correct). +# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include. +# Include: **/*.gemfile, **/Gemfile, **/gems.rb +Bundler/OrderedGems: + Exclude: + - 'Gemfile' + +# Offense count: 1 +# This cop supports safe auto-correction (--auto-correct). +# Configuration parameters: Include. +# Include: **/*.gemspec +Gemspec/RequireMFA: + Exclude: + - 'meilisearch-rails.gemspec' + # Offense count: 1 # This cop supports safe auto-correction (--auto-correct). # Configuration parameters: EnforcedStyle. @@ -14,6 +30,15 @@ Layout/EmptyLinesAroundModuleBody: Exclude: - 'lib/meilisearch-rails.rb' +# Offense count: 3 +# This cop supports safe auto-correction (--auto-correct). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: symmetrical, new_line, same_line +Layout/MultilineMethodCallBraceLayout: + Exclude: + - 'spec/integration_spec.rb' + - 'spec/ms_clean_up_job_spec.rb' + # Offense count: 1 # This cop supports safe auto-correction (--auto-correct). # Configuration parameters: EnforcedStyle, IndentationWidth. @@ -28,6 +53,13 @@ Lint/SuppressedException: Exclude: - 'lib/meilisearch-rails.rb' +# Offense count: 1 +# This cop supports safe auto-correction (--auto-correct). +# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments. +Lint/UnusedBlockArgument: + Exclude: + - 'lib/meilisearch-rails.rb' + # Offense count: 2 # This cop supports safe auto-correction (--auto-correct). # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods. @@ -38,7 +70,7 @@ Lint/UnusedMethodArgument: # Offense count: 10 # Configuration parameters: IgnoredMethods, CountRepeatedAttributes. Metrics/AbcSize: - Max: 102 + Max: 104 # Offense count: 1 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods. @@ -59,17 +91,17 @@ Metrics/CyclomaticComplexity: # Offense count: 16 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods. Metrics/MethodLength: - Max: 99 + Max: 103 # Offense count: 1 # Configuration parameters: CountComments, CountAsOne. Metrics/ModuleLength: - Max: 428 + Max: 443 # Offense count: 9 # Configuration parameters: IgnoredMethods. Metrics/PerceivedComplexity: - Max: 33 + Max: 34 # Offense count: 1 Naming/AccessorMethodName: @@ -91,7 +123,7 @@ Naming/MethodParameterName: Exclude: - 'lib/meilisearch-rails.rb' -# Offense count: 15 +# Offense count: 20 RSpec/BeforeAfterAll: Exclude: - 'spec/integration_spec.rb' @@ -102,20 +134,27 @@ RSpec/DescribeClass: Exclude: - 'spec/integration_spec.rb' -# Offense count: 36 +# Offense count: 45 # Configuration parameters: CountAsOne. RSpec/ExampleLength: Max: 19 -# Offense count: 2 +# Offense count: 3 # Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly. # Include: **/*_spec*rb*, **/spec/**/* RSpec/FilePath: Exclude: - 'spec/configuration_spec.rb' + - 'spec/settings_spec_2.rb' - 'spec/utilities_spec.rb' -# Offense count: 26 +# Offense count: 2 +# This cop supports safe auto-correction (--auto-correct). +RSpec/Focus: + Exclude: + - 'spec/settings_spec_2.rb' + +# Offense count: 25 # Configuration parameters: AssignmentOnly. RSpec/InstanceVariable: Exclude: @@ -133,6 +172,12 @@ RSpec/MultipleDescribes: Exclude: - 'spec/integration_spec.rb' +# Offense count: 1 +# This cop supports safe auto-correction (--auto-correct). +RSpec/MultipleSubjects: + Exclude: + - 'spec/ms_clean_up_job_spec.rb' + # Offense count: 1 # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames. RSpec/VerifiedDoubles: @@ -171,7 +216,21 @@ Style/InverseMethods: Exclude: - 'lib/meilisearch-rails.rb' -# Offense count: 8 +# Offense count: 1 +# This cop supports safe auto-correction (--auto-correct). +Style/MultilineIfModifier: + Exclude: + - 'lib/meilisearch-rails.rb' + +# Offense count: 1 +# This cop supports safe auto-correction (--auto-correct). +# Configuration parameters: AllowedMethods. +# AllowedMethods: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with +Style/NestedParenthesizedCalls: + Exclude: + - 'spec/ms_clean_up_job_spec.rb' + +# Offense count: 9 # Configuration parameters: AllowedMethods. # AllowedMethods: respond_to_missing? Style/OptionalBooleanParameter: @@ -184,7 +243,24 @@ Style/RescueModifier: Exclude: - 'lib/meilisearch-rails.rb' -# Offense count: 21 +# Offense count: 13 +# This cop supports safe auto-correction (--auto-correct). +# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline. +# SupportedStyles: single_quotes, double_quotes +Style/StringLiterals: + Exclude: + - 'spec/integration_spec.rb' + - 'spec/ms_clean_up_job_spec.rb' + +# Offense count: 2 +# This cop supports safe auto-correction (--auto-correct). +# Configuration parameters: EnforcedStyleForMultiline. +# SupportedStylesForMultiline: comma, consistent_comma, no_comma +Style/TrailingCommaInArguments: + Exclude: + - 'spec/integration_spec.rb' + +# Offense count: 20 # This cop supports safe auto-correction (--auto-correct). # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. # URISchemes: http, https diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 24ffc05d..0683e8eb 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -34,7 +34,7 @@ # Required for running background jobs on demand (deterministically) ActiveJob::Base.queue_adapter = :test # Required for serializing objects in similar to production environments -GlobalID.app = "meilisearch-test" +GlobalID.app = 'meilisearch-test' OLD_RAILS = Gem.loaded_specs['rails'].version < Gem::Version.new('4.0') NEW_RAILS = Gem.loaded_specs['rails'].version >= Gem::Version.new('6.0')