Skip to content

Commit f534ce2

Browse files
authored
[PIMCORE-3144] Add support for Rails 7.2 and 8.0 (#32)
1 parent 7d07bf8 commit f534ce2

File tree

10 files changed

+29
-23
lines changed

10 files changed

+29
-23
lines changed

.circleci/config.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ version: 2.1
88
jobs:
99
lint:
1010
docker:
11-
- image: $SALSIFY_ECR_REPO/ruby_ci:3.0.6
11+
- image: $SALSIFY_ECR_REPO/ruby_ci:3.2.8
1212
<<: *aws-auth
1313
working_directory: ~/postgres-vacuum-monitor
1414
steps:
1515
- checkout
1616
- restore_cache:
1717
keys:
18-
- v1-gems-ruby-3.0.6-{{ checksum "postgres-vacuum-monitor.gemspec" }}-{{ checksum "Gemfile" }}
19-
- v1-gems-ruby-3.0.6-
18+
- v1-gems-ruby-3.2.8-{{ checksum "postgres-vacuum-monitor.gemspec" }}-{{ checksum "Gemfile" }}
19+
- v1-gems-ruby-3.2.8-
2020
- run:
2121
name: Install Gems
2222
command: |
@@ -25,7 +25,7 @@ jobs:
2525
bundle clean
2626
fi
2727
- save_cache:
28-
key: v1-gems-ruby-3.0.6-{{ checksum "postgres-vacuum-monitor.gemspec" }}-{{ checksum "Gemfile" }}
28+
key: v1-gems-ruby-3.2.8-{{ checksum "postgres-vacuum-monitor.gemspec" }}-{{ checksum "Gemfile" }}
2929
paths:
3030
- "vendor/bundle"
3131
- "gemfiles/vendor/bundle"
@@ -94,11 +94,10 @@ workflows:
9494
matrix:
9595
parameters:
9696
gemfile:
97-
- gemfiles/activerecord_6_1.gemfile
98-
- gemfiles/activerecord_7_0.gemfile
9997
- gemfiles/activerecord_7_1.gemfile
98+
- gemfiles/activerecord_7_2.gemfile
99+
- gemfiles/activerecord_8_0.gemfile
100100
ruby_version:
101-
- 3.0.6
102-
- 3.1.4
103-
- 3.2.2
104-
- 3.3.0
101+
- 3.2.8
102+
- 3.3.8
103+
- 3.4.5

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ inherit_gem:
22
salsify_rubocop: conf/rubocop_rails.yml
33

44
AllCops:
5-
TargetRubyVersion: 3.0
5+
TargetRubyVersion: 3.2
66
Exclude:
77
- 'vendor/**/*'
88
- 'gemfiles/**/*'

Appraisals

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# frozen_string_literal: true
22

3-
appraise 'activerecord_6_1' do
4-
gem 'activerecord', '~> 6.1.7.6'
3+
appraise 'activerecord_7_1' do
4+
gem 'activerecord', '~> 7.1.5'
55
end
66

7-
appraise 'activerecord_7_0' do
8-
gem 'activerecord', '~> 7.0.8'
7+
appraise 'activerecord_7_2' do
8+
gem 'activerecord', '~> 7.2.2'
99
end
1010

11-
appraise 'activerecord_7_1' do
12-
gem 'activerecord', '~> 7.1.1'
11+
appraise 'activerecord_8_0' do
12+
gem 'activerecord', '~> 8.0.2'
1313
end

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# postgres-vacuum-monitor
22

3+
## v0.18.0
4+
- Add support for Rails 7.2 and 8.0.
5+
- Drop support for Rails 6.1 and 7.0.
6+
- Drop support for Ruby 3.0 and 3.1.
7+
38
## v0.17.0
49
- Increased default `monitor_max_run_time_seconds` to 60 seconds.
510
- Added `monitor_statement_timeout_seconds` (defaults to 10 seconds) to limit query runtime.

gemfiles/activerecord_7_1.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
source "https://rubygems.org"
44

5-
gem "activerecord", "~> 7.1.1"
5+
gem "activerecord", "~> 7.1.5"
66

77
gemspec path: "../"

gemfiles/activerecord_7_0.gemfile renamed to gemfiles/activerecord_7_2.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
source "https://rubygems.org"
44

5-
gem "activerecord", "~> 7.0.8"
5+
gem "activerecord", "~> 7.2.2"
66

77
gemspec path: "../"

gemfiles/activerecord_6_1.gemfile renamed to gemfiles/activerecord_8_0.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
source "https://rubygems.org"
44

5-
gem "activerecord", "~> 6.1.7.6"
5+
gem "activerecord", "~> 8.0.2"
66

77
gemspec path: "../"

lib/postgres/vacuum/monitor/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module Postgres
44
module Vacuum
55
module Monitor
6-
VERSION = '0.17.0'
6+
VERSION = '0.18.0'
77
end
88
end
99
end

postgres-vacuum-monitor.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
2929
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
3030
spec.require_paths = ['lib']
3131

32-
spec.required_ruby_version = '>= 3.0'
32+
spec.required_ruby_version = '>= 3.2'
3333

3434
spec.add_development_dependency 'appraisal'
3535
spec.add_development_dependency 'bundler'
@@ -40,6 +40,6 @@ Gem::Specification.new do |spec|
4040
spec.add_development_dependency 'rspec_junit_formatter'
4141
spec.add_development_dependency 'salsify_rubocop', '~> 1.42.1'
4242

43-
spec.add_dependency 'activerecord', '>= 6.1', '< 7.2'
43+
spec.add_dependency 'activerecord', '>= 7.1', '< 8.1'
4444
spec.add_dependency 'pg', '>= 0.18', '< 2.0'
4545
end

spec/postgres/vacuum/jobs/monitor_job_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ def self.report_event(name, attributes = {})
4444
let(:mock_connection) { double }
4545

4646
before do
47+
allow(mock_connection).to receive(:cast_bound_value) { "'#{_1}'" }
48+
allow(mock_connection).to receive(:quote) { _1 }
4749
allow(mock_connection).to receive(:execute).and_return([])
4850
ActiveRecord::Base.connection_handler.connection_pools.each do |pool|
4951
allow(pool).to receive(:with_connection).and_yield(mock_connection)

0 commit comments

Comments
 (0)