diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 4a7ac4c..a71ed07 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,16 +1,30 @@ # This configuration was generated by -# `rubocop --auto-gen-config` -# on 2022-04-06 17:45:31 UTC using RuboCop version 1.26.0. +# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 99999` +# on 2023-05-19 18:17:27 UTC using RuboCop version 1.51.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: 10 +# Configuration parameters: EnforcedStyle, AllowedGems, Include. +# SupportedStyles: Gemfile, gems.rb, gemspec +# Include: **/*.gemspec, **/Gemfile, **/gems.rb +Gemspec/DevelopmentDependencies: + Exclude: + - 'journaled.gemspec' + # Offense count: 2 RSpec/ExpectInHook: Exclude: - 'spec/models/concerns/journaled/changes_spec.rb' +# Offense count: 2 +# This cop supports unsafe autocorrection (--autocorrect-all). +RSpec/Rails/TravelAround: + Exclude: + - 'spec/lib/journaled/audit_log_spec.rb' + # Offense count: 2 RSpec/SubjectStub: Exclude: @@ -23,3 +37,21 @@ RSpec/VerifiedDoubles: - 'spec/models/concerns/journaled/actor_spec.rb' - 'spec/models/journaled/actor_uri_provider_spec.rb' - 'spec/models/journaled/change_writer_spec.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Rails/IndexWith: + Exclude: + - 'app/models/journaled/event.rb' + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/CollectionCompact: + Exclude: + - 'app/jobs/journaled/delivery_job.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Style/RedundantConstantBase: + Exclude: + - 'spec/dummy/config.ru' diff --git a/lib/journaled/audit_log.rb b/lib/journaled/audit_log.rb index 4912cdc..77f4b43 100644 --- a/lib/journaled/audit_log.rb +++ b/lib/journaled/audit_log.rb @@ -52,11 +52,8 @@ def without_audit_logging private def zeitwerk_exclude!(name) - if Object.const_defined?(name) - name.constantize.skip_audit_log - else - Rails.autoloaders.main.on_load(name) { |klass, _path| klass.skip_audit_log } - end + name.constantize.skip_audit_log if Object.const_defined?(name) + Rails.autoloaders.main.on_load(name) { |klass, _path| klass.skip_audit_log } end def classic_exclude!(name) diff --git a/lib/journaled/version.rb b/lib/journaled/version.rb index a01b4db..fb4f47a 100644 --- a/lib/journaled/version.rb +++ b/lib/journaled/version.rb @@ -1,3 +1,3 @@ module Journaled - VERSION = "5.3.0".freeze + VERSION = "5.3.1".freeze end