Skip to content

Commit 0a5521f

Browse files
committed
Drop support for activerecord < 7.1
1 parent dce3921 commit 0a5521f

File tree

10 files changed

+75
-54
lines changed

10 files changed

+75
-54
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,23 @@ jobs:
77
strategy:
88
matrix:
99
include:
10-
- gemfile: activerecord_70.gemfile
11-
- gemfile: activerecord_72.gemfile
12-
- gemfile: activerecord_head.gemfile
10+
- ruby-version: "3.1"
11+
gemfile: activerecord_71.gemfile
12+
- ruby-version: "3.1"
13+
gemfile: activerecord_72.gemfile
14+
- ruby-version: "3.4"
15+
gemfile: activerecord_80.gemfile
16+
17+
# Test against latest versions just in case.
18+
- ruby-version: "3.4"
19+
gemfile: activerecord_head.gemfile
1320
env:
1421
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}
1522
steps:
1623
- uses: actions/checkout@v4
1724
- uses: ruby/setup-ruby@v1
1825
with:
19-
ruby-version: 3.1
26+
ruby-version: ${{ matrix.ruby-version }}
2027
bundler-cache: true
2128
- name: Run the test suite
2229
run: bundle exec rake

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require:
1+
plugins:
22
- rubocop-minitest
33

44
AllCops:

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## master (unreleased)
22

3+
- Drop support for activerecord < 7.1
4+
35
## 0.1.0 (2024-07-10)
46

57
- First release

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ gemspec
77

88
gem "rake", "~> 13.0"
99
gem "minitest"
10-
gem "sqlite3", "< 2"
10+
gem "sqlite3"
1111
gem "rubocop"
1212
gem "rubocop-minitest"
1313

Gemfile.lock

Lines changed: 51 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@ PATH
22
remote: .
33
specs:
44
active_record_tracer (0.1.0)
5-
activerecord (>= 7.0)
5+
activerecord (>= 7.1)
66

77
GEM
88
remote: https://rubygems.org/
99
specs:
10-
activemodel (7.2.0)
11-
activesupport (= 7.2.0)
12-
activerecord (7.2.0)
13-
activemodel (= 7.2.0)
14-
activesupport (= 7.2.0)
10+
activemodel (8.0.2)
11+
activesupport (= 8.0.2)
12+
activerecord (8.0.2)
13+
activemodel (= 8.0.2)
14+
activesupport (= 8.0.2)
1515
timeout (>= 0.4.0)
16-
activesupport (7.2.0)
16+
activesupport (8.0.2)
1717
base64
18+
benchmark (>= 0.3)
1819
bigdecimal
1920
concurrent-ruby (~> 1.0, >= 1.3.1)
2021
connection_pool (>= 2.2.5)
@@ -24,56 +25,62 @@ GEM
2425
minitest (>= 5.1)
2526
securerandom (>= 0.3)
2627
tzinfo (~> 2.0, >= 2.0.5)
27-
ast (2.4.2)
28-
base64 (0.2.0)
29-
bigdecimal (3.1.8)
30-
concurrent-ruby (1.3.3)
31-
connection_pool (2.4.1)
32-
drb (2.2.1)
33-
i18n (1.14.5)
28+
uri (>= 0.13.1)
29+
ast (2.4.3)
30+
base64 (0.3.0)
31+
benchmark (0.4.1)
32+
bigdecimal (3.2.2)
33+
concurrent-ruby (1.3.5)
34+
connection_pool (2.5.3)
35+
drb (2.2.3)
36+
i18n (1.14.7)
3437
concurrent-ruby (~> 1.0)
35-
json (2.7.2)
36-
language_server-protocol (3.17.0.3)
37-
logger (1.6.0)
38-
mini_portile2 (2.8.7)
39-
minitest (5.24.1)
40-
parallel (1.26.1)
41-
parser (3.3.4.2)
38+
json (2.12.2)
39+
language_server-protocol (3.17.0.5)
40+
lint_roller (1.1.0)
41+
logger (1.7.0)
42+
mini_portile2 (2.8.9)
43+
minitest (5.25.5)
44+
parallel (1.27.0)
45+
parser (3.3.8.0)
4246
ast (~> 2.4.1)
4347
racc
48+
prism (1.4.0)
4449
racc (1.8.1)
4550
rainbow (3.1.1)
46-
rake (13.2.1)
47-
regexp_parser (2.9.2)
48-
rexml (3.3.4)
49-
strscan
50-
rubocop (1.65.1)
51+
rake (13.3.0)
52+
regexp_parser (2.10.0)
53+
rubocop (1.76.1)
5154
json (~> 2.3)
52-
language_server-protocol (>= 3.17.0)
55+
language_server-protocol (~> 3.17.0.2)
56+
lint_roller (~> 1.1.0)
5357
parallel (~> 1.10)
5458
parser (>= 3.3.0.2)
5559
rainbow (>= 2.2.2, < 4.0)
56-
regexp_parser (>= 2.4, < 3.0)
57-
rexml (>= 3.2.5, < 4.0)
58-
rubocop-ast (>= 1.31.1, < 2.0)
60+
regexp_parser (>= 2.9.3, < 3.0)
61+
rubocop-ast (>= 1.45.0, < 2.0)
5962
ruby-progressbar (~> 1.7)
60-
unicode-display_width (>= 2.4.0, < 3.0)
61-
rubocop-ast (1.32.0)
62-
parser (>= 3.3.1.0)
63-
rubocop-minitest (0.35.1)
64-
rubocop (>= 1.61, < 2.0)
65-
rubocop-ast (>= 1.31.1, < 2.0)
63+
unicode-display_width (>= 2.4.0, < 4.0)
64+
rubocop-ast (1.45.1)
65+
parser (>= 3.3.7.2)
66+
prism (~> 1.4)
67+
rubocop-minitest (0.38.1)
68+
lint_roller (~> 1.1)
69+
rubocop (>= 1.75.0, < 2.0)
70+
rubocop-ast (>= 1.38.0, < 2.0)
6671
ruby-progressbar (1.13.0)
67-
securerandom (0.3.1)
68-
sqlite3 (1.7.3)
72+
securerandom (0.4.1)
73+
sqlite3 (2.7.0)
6974
mini_portile2 (~> 2.8.0)
70-
sqlite3 (1.7.3-x86_64-darwin)
71-
sqlite3 (1.7.3-x86_64-linux)
72-
strscan (3.1.0)
73-
timeout (0.4.1)
75+
sqlite3 (2.7.0-x86_64-darwin)
76+
sqlite3 (2.7.0-x86_64-linux-gnu)
77+
timeout (0.4.3)
7478
tzinfo (2.0.6)
7579
concurrent-ruby (~> 1.0)
76-
unicode-display_width (2.5.0)
80+
unicode-display_width (3.1.4)
81+
unicode-emoji (~> 4.0, >= 4.0.4)
82+
unicode-emoji (4.0.4)
83+
uri (1.0.3)
7784

7885
PLATFORMS
7986
ruby
@@ -87,7 +94,7 @@ DEPENDENCIES
8794
rake (~> 13.0)
8895
rubocop
8996
rubocop-minitest
90-
sqlite3 (< 2)
97+
sqlite3
9198

9299
BUNDLED WITH
93100
2.5.11

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ which records are loaded the most, and the sources of those? This tool to the re
1111
## Requirements
1212

1313
- ruby 3.1+
14-
- activerecord 7.0+
14+
- activerecord 7.1+
1515

1616
## Installation
1717

active_record_tracer.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ Gem::Specification.new do |spec|
2020
spec.files = Dir["**/*.{md,txt}", "{lib}/**/*"]
2121
spec.require_paths = ["lib"]
2222

23-
spec.add_dependency "activerecord", ">= 7.0"
23+
spec.add_dependency "activerecord", ">= 7.1"
2424
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

3-
@ar_gem_requirement = "~> 7.0.0"
3+
@ar_gem_requirement = "~> 7.1.0"
44

55
eval_gemfile "../Gemfile"

gemfiles/activerecord_80.gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# frozen_string_literal: true
2+
3+
@ar_gem_requirement = "~> 8.0.0"
4+
5+
eval_gemfile "../Gemfile"

lib/active_record_tracer/reporter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def initialize(top: 50, backtrace_lines: 5, ignore_cached_queries: false, ignore
2424
@backtraces_cache = {}
2525
end
2626

27-
def start
27+
def start # rubocop:disable Naming/PredicateMethod
2828
@subscriber1 = ActiveSupport::Notifications.monotonic_subscribe("sql.active_record") do |_name, start, finish, _id, payload|
2929
next if payload[:cached] && @ignore_cached_queries
3030
next if payload[:name] == "SCHEMA" && @ignore_schema_queries

0 commit comments

Comments
 (0)