From 68d8174964bb8ae7e8e73951dca7d6b2f1289b4e Mon Sep 17 00:00:00 2001 From: Anton Rieder Date: Fri, 18 Jun 2021 13:43:04 +0200 Subject: [PATCH] Update rubocop et. al. to latest --- .rubocop_todo.yml | 50 ++++++++++++++++++++++++++++++++------------- paper_trail.gemspec | 10 ++++----- 2 files changed, 41 insertions(+), 19 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 8e57f124..3a544242 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2021-03-21 03:46:53 UTC using RuboCop version 1.11.0. +# on 2021-06-18 11:38:36 UTC using RuboCop version 1.17.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 @@ -47,20 +47,19 @@ Performance/CollectionLiteralInLoop: RSpec/ContextWording: Enabled: false -# It may be possible for us to use safe_load, but we'd have to pass the -# safelists, like `whitelist_classes` into our serializer, and the serializer -# interface is a public API, so that would be a breaking change. -Security/YAMLLoad: +# Offense count: 2 +# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly. +# Include: **/*_spec*rb*, **/spec/**/* +RSpec/FilePath: Exclude: - - 'lib/paper_trail/serializers/yaml.rb' - - 'spec/models/gadget_spec.rb' - - 'spec/models/no_object_spec.rb' - - 'spec/models/person_spec.rb' - - 'spec/models/version_spec.rb' - - 'spec/paper_trail/events/destroy_spec.rb' - 'spec/paper_trail/model_spec.rb' - 'spec/paper_trail/serializer_spec.rb' +# Offense count: 1 +RSpec/IdenticalEqualityAssertion: + Exclude: + - 'spec/models/widget_spec.rb' + # Offense count: 1 # Cop supports --auto-correct. Rails/ApplicationController: @@ -72,6 +71,13 @@ Rails/ApplicationController: Rails/ApplicationRecord: Enabled: false +# Offense count: 1 +# Configuration parameters: Include, AllowReads, AllowWrites. +# Include: app/**/*.rb, lib/**/*.rb +Rails/EnvironmentVariableAccess: + Exclude: + - 'lib/paper_trail/compatibility.rb' + # Offense count: 1 # Cop supports --auto-correct. Rails/NegateInclude: @@ -90,10 +96,9 @@ Rails/Presence: # Include: **/Rakefile, **/*.rake Rails/RakeEnvironment: Exclude: - - 'lib/capistrano/tasks/**/*.rake' - 'Rakefile' -# Offense count: 8 +# Offense count: 4 # Cop supports --auto-correct. Rails/RedundantForeignKey: Exclude: @@ -107,7 +112,24 @@ Rails/WhereNot: Exclude: - 'lib/paper_trail/version_concern.rb' -RSpec/FilePath: +# It may be possible for us to use safe_load, but we'd have to pass the +# safelists, like `whitelist_classes` into our serializer, and the serializer +# interface is a public API, so that would be a breaking change. +# Offense count: 13 +# Cop supports --auto-correct. +Security/YAMLLoad: Exclude: + - 'lib/paper_trail/serializers/yaml.rb' + - 'spec/models/gadget_spec.rb' + - 'spec/models/no_object_spec.rb' + - 'spec/models/person_spec.rb' + - 'spec/models/version_spec.rb' + - 'spec/paper_trail/events/destroy_spec.rb' - 'spec/paper_trail/model_spec.rb' - 'spec/paper_trail/serializer_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Style/RedundantBegin: + Exclude: + - 'lib/paper_trail/events/base.rb' diff --git a/paper_trail.gemspec b/paper_trail.gemspec index c67c5aa0..32193726 100644 --- a/paper_trail.gemspec +++ b/paper_trail.gemspec @@ -64,12 +64,12 @@ has been destroyed. s.add_development_dependency "rails", ::PaperTrail::Compatibility::ACTIVERECORD_GTE s.add_development_dependency "rake", "~> 13.0" - s.add_development_dependency "rspec-rails", "~> 4.0" - s.add_development_dependency "rubocop", "~> 1.11.0" - s.add_development_dependency "rubocop-rails", "~> 2.9.1" + s.add_development_dependency "rspec-rails", "~> 5.0.1" + s.add_development_dependency "rubocop", "~> 1.17.0" + s.add_development_dependency "rubocop-rails", "~> 2.10.1" s.add_development_dependency "rubocop-packaging", "~> 0.5.1" - s.add_development_dependency "rubocop-performance", "~> 1.10.1" - s.add_development_dependency "rubocop-rspec", "~> 2.2.0" + s.add_development_dependency "rubocop-performance", "~> 1.11.3" + s.add_development_dependency "rubocop-rspec", "~> 2.4.0" # ## Database Adapters #