Skip to content

Commit 4dc3b1e

Browse files
committed
chore: drop ruby 2.5, upgrade RuboCop and RubyNext
1 parent ad92f07 commit 4dc3b1e

File tree

11 files changed

+14
-24
lines changed

11 files changed

+14
-24
lines changed

.github/workflows/test-jruby.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
bundle-
2525
- uses: ruby/setup-ruby@v1
2626
with:
27-
ruby-version: jruby
27+
ruby-version: jruby-head
2828
- name: Bundle install
2929
run: |
3030
bundle config --global gemfile gemfiles/jruby.gemfile

.github/workflows/test.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ jobs:
3232
- ruby: "2.6"
3333
gemfile: "gemfiles/rails6.gemfile"
3434
bundler: "2"
35-
- ruby: "2.5"
36-
gemfile: "gemfiles/rails42.gemfile"
37-
bundler: "1"
3835
steps:
3936
- uses: actions/checkout@v2
4037
- uses: actions/cache@v1

.rbnextrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
nextify: |
22
./lib
3-
--min-version=2.5
3+
--min-version=2.6
44
--edge
55
--proposed

.rubocop-md.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,3 @@ require:
66
AllCops:
77
Include:
88
- '**/*.md'
9-
10-
Layout/EmptyLineBetweenDefs:
11-
Exclude:
12-
- '**/*.md'

.rubocop.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
require:
2-
- standard/cop/semantic_blocks
2+
- standard/cop/block_single_line_braces
33
- ruby-next/rubocop
44

55
inherit_gem:
@@ -17,18 +17,12 @@ AllCops:
1717
SuggestExtensions: false
1818
TargetRubyVersion: next
1919

20-
Standard/SemanticBlocks:
20+
Standard/BlockSingleLineBraces:
2121
Enabled: false
2222

2323
Style/FrozenStringLiteralComment:
2424
Enabled: true
2525

26-
Style/TrailingCommaInArrayLiteral:
27-
EnforcedStyleForMultiline: no_comma
28-
29-
Style/TrailingCommaInHashLiteral:
30-
EnforcedStyleForMultiline: no_comma
31-
3226
Naming/FileName:
3327
Exclude:
3428
- '**/*.md'

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## master
44

5+
## 0.6.0 (2021-09-02)
6+
7+
- Drop Ruby 2.5 support.
58
- [Closes [#186](https://github.com/palkan/action_policy/issues/186)] Add `inline_reasons: true` option to `allowed_to?` to avoid wrapping reasons. ([@palkan][])
69
- [Fixes [#173](https://github.com/palkan/action_policy/issues/173)] Explicit context were not merged with implicit one within policy classes. ([@palkan][])
710
- Add `strict_namespace:` option to policy_for behaviour ([@kevynlebouille][])

action_policy.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
2525

2626
spec.require_paths = ["lib"]
2727

28-
spec.required_ruby_version = ">= 2.5.0"
28+
spec.required_ruby_version = ">= 2.6.0"
2929

3030
# When gem is installed from source, we add `ruby-next` as a dependency
3131
# to auto-transpile source files during the first load

gemfiles/rubocop.gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
source "https://rubygems.org" do
22
gem "rubocop-md", "~> 1.0"
3-
gem "standard", "~> 0.10"
4-
gem "ruby-next", ">= 0.11.0"
3+
gem "standard", "~> 1.0"
4+
gem "ruby-next", ">= 0.12.0"
55
end

lib/action_policy/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module ActionPolicy
4-
VERSION = "0.5.7"
4+
VERSION = "0.6.0"
55
end

test/action_policy/pp_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def admind?
3030
end
3131

3232
def admind_jard?
33-
jard
33+
jard # rubocop:disable Lint/Debugger
3434
user.admin?
3535
end
3636
end

0 commit comments

Comments
 (0)