Skip to content

Commit

Permalink
Merge pull request #796 from varvet/kbs/rubocop-syntax-upgrade
Browse files Browse the repository at this point in the history
Remove support for Ruby 3.0
  • Loading branch information
Burgestrand committed Mar 7, 2024
2 parents f130187 + f276b6a commit 55f64cb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
fail-fast: false
matrix:
ruby-version:
- '3.0'
- '3.1'
- '3.2'
- '3.3'
Expand Down
20 changes: 4 additions & 16 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AllCops:
TargetRubyVersion: 2.6
TargetRubyVersion: 3.1
Exclude:
- "lib/generators/**/templates/**/*"
<% `git status --ignored --porcelain`.lines.grep(/^!! /).each do |path| %>
Expand All @@ -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

Expand Down Expand Up @@ -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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/pundit/policy_finder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 55f64cb

Please sign in to comment.