Skip to content

Commit

Permalink
Release version 4.0.0 (drops support for Ruby < 3.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisalley committed Dec 17, 2024
1 parent 7be4480 commit 9f12dde
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 38 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: RuboCop

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

permissions:
contents: read
Expand All @@ -19,15 +19,15 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
ruby-version: ['3.3']
ruby-version: ["3.1"]

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
rubygems: latest
- name: Ruby linter
run: bundle exec bin/rubocop
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
rubygems: latest
- name: Ruby linter
run: bundle exec bin/rubocop
30 changes: 15 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Test

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

permissions:
contents: read
Expand All @@ -15,22 +15,22 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.0', '3.1', '3.2', '3.3']
channel: ['stable']
ruby-version: ["3.1", "3.2", "3.3"]
channel: ["stable"]

include:
- ruby-version: 'head'
channel: 'experimental'
- ruby-version: "head"
channel: "experimental"

continue-on-error: ${{ matrix.channel != 'stable' }}

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
rubygems: latest
- name: Run specs
run: bundle exec rake
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
rubygems: latest
- name: Run specs
run: bundle exec rake
10 changes: 7 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ require:

AllCops:
NewCops: enable
TargetRubyVersion: 3.0
TargetRubyVersion: 3.1
DisplayStyleGuide: true
ExtraDetails: true
Exclude:
- 'bin/**/*'
- 'vendor/bundle/**/*'
- .git/**/*
- .github/**/*
- bin/**/*
- coverage/**/*
- doc/**/*
- vendor/**/*

RSpec/ExampleLength:
Max: 10
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.4
3.3.6
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Pundit Matchers

# 4.0.0 (2024-12-18)

- Drop Ruby < 3.1 compatibility. Please upgrade your Rails application to use
Ruby 3.1 or higher.

## 3.1.2 (2023-06-28)

- Fix namespace resolution under some circumstances
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.1.2
FROM ruby:3.3.6

LABEL maintainer="chris@chrisalley.info"

Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
pundit-matchers (3.1.2)
pundit-matchers (4.0.0)
rspec-core (~> 3.12)
rspec-expectations (~> 3.12)
rspec-mocks (~> 3.12)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ group:

```ruby
group :test do
gem 'pundit-matchers', '~> 3.1'
gem 'pundit-matchers', '~> 4.0'
end
```

Expand All @@ -26,7 +26,7 @@ And then execute the following command:
Pundit Matchers expects that the application you're testing is using a
software stack consisting of:

- Ruby 3+
- Ruby 3.1+
- Pundit 2+
- RSpec 3.12+

Expand Down
4 changes: 2 additions & 2 deletions pundit-matchers.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |s|
s.name = 'pundit-matchers'
s.version = '3.1.2'
s.version = '4.0.0'
s.summary = 'RSpec matchers for Pundit policies'
s.description = 'A set of RSpec matchers for testing Pundit authorisation ' \
'policies'
Expand All @@ -13,7 +13,7 @@ Gem::Specification.new do |s|
s.homepage = 'https://github.com/pundit-community/pundit-matchers'
s.license = 'MIT'
s.metadata['rubygems_mfa_required'] = 'true'
s.required_ruby_version = '>= 3.0'
s.required_ruby_version = '>= 3.1'

%w[core expectations mocks support].each do |name|
s.add_dependency "rspec-#{name}", '~> 3.12'
Expand Down
2 changes: 1 addition & 1 deletion spec/policy_factory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def user
end

class DynamicTestPolicy < TestPolicy
def method_missing(method, *args, &block)
def method_missing(method, *args, &)
method_s = method.to_s
return super unless method_s.end_with?('?')

Expand Down

0 comments on commit 9f12dde

Please sign in to comment.