diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6589890b..89fb192a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,7 +28,6 @@ jobs: fail-fast: false matrix: ruby-version: - - '3.0' - '3.1' - '3.2' - '3.3' diff --git a/.rubocop.yml b/.rubocop.yml index a4e374b2..007b2a28 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,5 @@ AllCops: - TargetRubyVersion: 2.6 + TargetRubyVersion: 3.1 Exclude: - "lib/generators/**/templates/**/*" <% `git status --ignored --porcelain`.lines.grep(/^!! /).each do |path| %> @@ -23,15 +23,6 @@ Metrics/ModuleLength: Layout/LineLength: Max: 120 -Metrics/AbcSize: - Enabled: false - -Metrics/CyclomaticComplexity: - Enabled: false - -Metrics/PerceivedComplexity: - Enabled: false - Gemspec/RequiredRubyVersion: Enabled: false @@ -62,14 +53,11 @@ Style/StringLiteralsInInterpolation: Style/StructInheritance: Enabled: false -Style/AndOr: - Enabled: false - -Style/Not: - Enabled: false - Style/DoubleNegation: Enabled: false Style/Documentation: Enabled: false # TODO: Enable again once we have more docs + +Style/HashSyntax: + EnforcedShorthandSyntax: never diff --git a/CHANGELOG.md b/CHANGELOG.md index b509deb3..3af4cec9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,9 @@ ## Unreleased -- Update `ApplicationPolicy`` generator to qualify the `Scope` class name (#792) +- Dropped support for Ruby 3.0 (#796) +- Update `ApplicationPolicy` generator to qualify the `Scope` class name (#792) - Policy generator uses `NoMethodError` to indicate `#resolve` is not implemented (#776) ## 2.3.1 (2023-07-17) diff --git a/lib/pundit/policy_finder.rb b/lib/pundit/policy_finder.rb index 40467d9d..ecc6e9bb 100644 --- a/lib/pundit/policy_finder.rb +++ b/lib/pundit/policy_finder.rb @@ -56,7 +56,7 @@ def policy! # @return [String] the name of the key this object would have in a params hash # - def param_key + def param_key # rubocop:disable Metrics/AbcSize model = object.is_a?(Array) ? object.last : object if model.respond_to?(:model_name)