Skip to content

Commit 75cc968

Browse files
committed
Actually drop Rails < 7.0
The v3.0.0 changelog mentions that Rails 6.1 support was dropped, which was done by removing it from the CI matrix. However, there's still some code that checks for versions lower than 7.0, and 6.1 is still included on the gemspec. This commit addresses that by changing the dependency version, and removing code that isn't needed anymore.
1 parent ddab2d1 commit 75cc968

11 files changed

Lines changed: 136 additions & 146 deletions

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PATH
22
remote: .
33
specs:
44
noticed (3.0.0)
5-
rails (>= 6.1.0)
5+
rails (>= 7.0.0)
66

77
GEM
88
remote: https://rubygems.org/

app/models/concerns/noticed/deliverable.rb

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,7 @@ def deliver(recipients = nil, enqueue_job: true, **options)
9696
self.notifications_count = recipients_attributes.size
9797
save!
9898

99-
if Rails.gem_version >= Gem::Version.new("7.0.0.alpha1")
100-
notifications.insert_all!(recipients_attributes, record_timestamps: true) if recipients_attributes.any?
101-
else
102-
time = Time.current
103-
recipients_attributes.each do |attributes|
104-
attributes[:created_at] = time
105-
attributes[:updated_at] = time
106-
end
107-
notifications.insert_all!(recipients_attributes) if recipients_attributes.any?
108-
end
99+
notifications.insert_all!(recipients_attributes, record_timestamps: true) if recipients_attributes.any?
109100
end
110101

111102
# Enqueue delivery job

app/models/noticed/event.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ class Event < ApplicationRecord
1616

1717
# Ephemeral notifiers cannot serialize params since they aren't ActiveRecord backed
1818
if respond_to? :serialize
19-
if Rails.gem_version >= Gem::Version.new("7.1.0.alpha")
20-
serialize :params, coder: Coder
21-
else
22-
serialize :params, Coder
23-
end
19+
serialize :params, coder: Coder
2420
end
2521
end
2622
end

gemfiles/rails_7_0.gemfile.lock

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PATH
22
remote: ..
33
specs:
44
noticed (3.0.0)
5-
rails (>= 6.1.0)
5+
rails (>= 7.0.0)
66

77
GEM
88
remote: https://rubygems.org/
@@ -179,8 +179,8 @@ GEM
179179
racc
180180
pg (1.6.3)
181181
pg (1.6.3-arm64-darwin)
182-
prism (1.7.0)
183-
public_suffix (7.0.0)
182+
prism (1.8.0)
183+
public_suffix (7.0.2)
184184
racc (1.8.1)
185185
rack (2.2.21)
186186
rack-test (2.2.0)
@@ -257,9 +257,10 @@ GEM
257257
standard-performance (1.9.0)
258258
lint_roller (~> 1.1)
259259
rubocop-performance (~> 1.26.0)
260-
thor (1.4.0)
260+
thor (1.5.0)
261261
timeout (0.6.0)
262-
trilogy (2.9.0)
262+
trilogy (2.10.0)
263+
bigdecimal
263264
tzinfo (2.0.6)
264265
concurrent-ruby (~> 1.0)
265266
unicode-display_width (3.2.0)
@@ -363,8 +364,8 @@ CHECKSUMS
363364
parser (3.3.10.0) sha256=ce3587fa5cc55a88c4ba5b2b37621b3329aadf5728f9eafa36bbd121462aabd6
364365
pg (1.6.3) sha256=1388d0563e13d2758c1089e35e973a3249e955c659592d10e5b77c468f628a99
365366
pg (1.6.3-arm64-darwin) sha256=7240330b572e6355d7c75a7de535edb5dfcbd6295d9c7777df4d9dddfb8c0e5f
366-
prism (1.7.0) sha256=10062f734bf7985c8424c44fac382ac04a58124ea3d220ec3ba9fe4f2da65103
367-
public_suffix (7.0.0) sha256=f7090b5beb0e56f9f10d79eed4d5fbe551b3b425da65877e075dad47a6a1b095
367+
prism (1.8.0) sha256=84453a16ef5530ea62c5f03ec16b52a459575ad4e7b9c2b360fd8ce2c39c1254
368+
public_suffix (7.0.2) sha256=9114090c8e4e7135c1fd0e7acfea33afaab38101884320c65aaa0ffb8e26a857
368369
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
369370
rack (2.2.21) sha256=14e2f72f0765455fe424ff601588ac5ce84e95784f59e99251ffe1527152f739
370371
rack-test (2.2.0) sha256=005a36692c306ac0b4a9350355ee080fd09ddef1148a5f8b2ac636c720f5c463
@@ -387,9 +388,9 @@ CHECKSUMS
387388
standard (1.52.0) sha256=ec050e63228e31fabe40da3ef96da7edda476f7acdf3e7c2ad47b6e153f6a076
388389
standard-custom (1.0.2) sha256=424adc84179a074f1a2a309bb9cf7cd6bfdb2b6541f20c6bf9436c0ba22a652b
389390
standard-performance (1.9.0) sha256=49483d31be448292951d80e5e67cdcb576c2502103c7b40aec6f1b6e9c88e3f2
390-
thor (1.4.0) sha256=8763e822ccb0f1d7bee88cde131b19a65606657b847cc7b7b4b82e772bcd8a3d
391+
thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73
391392
timeout (0.6.0) sha256=6d722ad619f96ee383a0c557ec6eb8c4ecb08af3af62098a0be5057bf00de1af
392-
trilogy (2.9.0) sha256=a2d63b663ba68a4758e15d1f9afb228f5d16efc7fe7cea68699e1c106ef6067f
393+
trilogy (2.10.0) sha256=b58ed5fe568bbcccc1f0423bf654bb2af329c6dabb21453fb7481f76808edc93
393394
tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
394395
unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
395396
unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f

gemfiles/rails_7_1.gemfile.lock

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PATH
22
remote: ..
33
specs:
44
noticed (3.0.0)
5-
rails (>= 6.1.0)
5+
rails (>= 7.0.0)
66

77
GEM
88
remote: https://rubygems.org/
@@ -191,11 +191,11 @@ GEM
191191
pp (0.6.3)
192192
prettyprint
193193
prettyprint (0.2.0)
194-
prism (1.7.0)
194+
prism (1.8.0)
195195
psych (5.3.1)
196196
date
197197
stringio
198-
public_suffix (7.0.0)
198+
public_suffix (7.0.2)
199199
racc (1.8.1)
200200
rack (3.2.4)
201201
rack-session (2.1.1)
@@ -287,9 +287,10 @@ GEM
287287
lint_roller (~> 1.1)
288288
rubocop-performance (~> 1.26.0)
289289
stringio (3.2.0)
290-
thor (1.4.0)
290+
thor (1.5.0)
291291
timeout (0.6.0)
292-
trilogy (2.9.0)
292+
trilogy (2.10.0)
293+
bigdecimal
293294
tsort (0.2.0)
294295
tzinfo (2.0.6)
295296
concurrent-ruby (~> 1.0)
@@ -394,9 +395,9 @@ CHECKSUMS
394395
pg (1.6.3-arm64-darwin) sha256=7240330b572e6355d7c75a7de535edb5dfcbd6295d9c7777df4d9dddfb8c0e5f
395396
pp (0.6.3) sha256=2951d514450b93ccfeb1df7d021cae0da16e0a7f95ee1e2273719669d0ab9df6
396397
prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193
397-
prism (1.7.0) sha256=10062f734bf7985c8424c44fac382ac04a58124ea3d220ec3ba9fe4f2da65103
398+
prism (1.8.0) sha256=84453a16ef5530ea62c5f03ec16b52a459575ad4e7b9c2b360fd8ce2c39c1254
398399
psych (5.3.1) sha256=eb7a57cef10c9d70173ff74e739d843ac3b2c019a003de48447b2963d81b1974
399-
public_suffix (7.0.0) sha256=f7090b5beb0e56f9f10d79eed4d5fbe551b3b425da65877e075dad47a6a1b095
400+
public_suffix (7.0.2) sha256=9114090c8e4e7135c1fd0e7acfea33afaab38101884320c65aaa0ffb8e26a857
400401
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
401402
rack (3.2.4) sha256=5d74b6f75082a643f43c1e76b419c40f0e5527fcfee1e669ac1e6b73c0ccb6f6
402403
rack-session (2.1.1) sha256=0b6dc07dea7e4b583f58a48e8b806d4c9f1c6c9214ebc202ec94562cbea2e4e9
@@ -424,9 +425,9 @@ CHECKSUMS
424425
standard-custom (1.0.2) sha256=424adc84179a074f1a2a309bb9cf7cd6bfdb2b6541f20c6bf9436c0ba22a652b
425426
standard-performance (1.9.0) sha256=49483d31be448292951d80e5e67cdcb576c2502103c7b40aec6f1b6e9c88e3f2
426427
stringio (3.2.0) sha256=c37cb2e58b4ffbd33fe5cd948c05934af997b36e0b6ca6fdf43afa234cf222e1
427-
thor (1.4.0) sha256=8763e822ccb0f1d7bee88cde131b19a65606657b847cc7b7b4b82e772bcd8a3d
428+
thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73
428429
timeout (0.6.0) sha256=6d722ad619f96ee383a0c557ec6eb8c4ecb08af3af62098a0be5057bf00de1af
429-
trilogy (2.9.0) sha256=a2d63b663ba68a4758e15d1f9afb228f5d16efc7fe7cea68699e1c106ef6067f
430+
trilogy (2.10.0) sha256=b58ed5fe568bbcccc1f0423bf654bb2af329c6dabb21453fb7481f76808edc93
430431
tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
431432
tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
432433
unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42

gemfiles/rails_7_2.gemfile.lock

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PATH
22
remote: ..
33
specs:
44
noticed (3.0.0)
5-
rails (>= 6.1.0)
5+
rails (>= 7.0.0)
66

77
GEM
88
remote: https://rubygems.org/
@@ -184,11 +184,11 @@ GEM
184184
pp (0.6.3)
185185
prettyprint
186186
prettyprint (0.2.0)
187-
prism (1.7.0)
187+
prism (1.8.0)
188188
psych (5.3.1)
189189
date
190190
stringio
191-
public_suffix (7.0.0)
191+
public_suffix (7.0.2)
192192
racc (1.8.1)
193193
rack (3.2.4)
194194
rack-session (2.1.1)
@@ -280,9 +280,10 @@ GEM
280280
lint_roller (~> 1.1)
281281
rubocop-performance (~> 1.26.0)
282282
stringio (3.2.0)
283-
thor (1.4.0)
283+
thor (1.5.0)
284284
timeout (0.6.0)
285-
trilogy (2.9.0)
285+
trilogy (2.10.0)
286+
bigdecimal
286287
tsort (0.2.0)
287288
tzinfo (2.0.6)
288289
concurrent-ruby (~> 1.0)
@@ -387,9 +388,9 @@ CHECKSUMS
387388
pg (1.6.3-arm64-darwin) sha256=7240330b572e6355d7c75a7de535edb5dfcbd6295d9c7777df4d9dddfb8c0e5f
388389
pp (0.6.3) sha256=2951d514450b93ccfeb1df7d021cae0da16e0a7f95ee1e2273719669d0ab9df6
389390
prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193
390-
prism (1.7.0) sha256=10062f734bf7985c8424c44fac382ac04a58124ea3d220ec3ba9fe4f2da65103
391+
prism (1.8.0) sha256=84453a16ef5530ea62c5f03ec16b52a459575ad4e7b9c2b360fd8ce2c39c1254
391392
psych (5.3.1) sha256=eb7a57cef10c9d70173ff74e739d843ac3b2c019a003de48447b2963d81b1974
392-
public_suffix (7.0.0) sha256=f7090b5beb0e56f9f10d79eed4d5fbe551b3b425da65877e075dad47a6a1b095
393+
public_suffix (7.0.2) sha256=9114090c8e4e7135c1fd0e7acfea33afaab38101884320c65aaa0ffb8e26a857
393394
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
394395
rack (3.2.4) sha256=5d74b6f75082a643f43c1e76b419c40f0e5527fcfee1e669ac1e6b73c0ccb6f6
395396
rack-session (2.1.1) sha256=0b6dc07dea7e4b583f58a48e8b806d4c9f1c6c9214ebc202ec94562cbea2e4e9
@@ -417,9 +418,9 @@ CHECKSUMS
417418
standard-custom (1.0.2) sha256=424adc84179a074f1a2a309bb9cf7cd6bfdb2b6541f20c6bf9436c0ba22a652b
418419
standard-performance (1.9.0) sha256=49483d31be448292951d80e5e67cdcb576c2502103c7b40aec6f1b6e9c88e3f2
419420
stringio (3.2.0) sha256=c37cb2e58b4ffbd33fe5cd948c05934af997b36e0b6ca6fdf43afa234cf222e1
420-
thor (1.4.0) sha256=8763e822ccb0f1d7bee88cde131b19a65606657b847cc7b7b4b82e772bcd8a3d
421+
thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73
421422
timeout (0.6.0) sha256=6d722ad619f96ee383a0c557ec6eb8c4ecb08af3af62098a0be5057bf00de1af
422-
trilogy (2.9.0) sha256=a2d63b663ba68a4758e15d1f9afb228f5d16efc7fe7cea68699e1c106ef6067f
423+
trilogy (2.10.0) sha256=b58ed5fe568bbcccc1f0423bf654bb2af329c6dabb21453fb7481f76808edc93
423424
tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
424425
tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
425426
unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42

gemfiles/rails_8_0.gemfile.lock

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PATH
22
remote: ..
33
specs:
44
noticed (3.0.0)
5-
rails (>= 6.1.0)
5+
rails (>= 7.0.0)
66

77
GEM
88
remote: https://rubygems.org/
@@ -196,11 +196,11 @@ GEM
196196
pp (0.6.3)
197197
prettyprint
198198
prettyprint (0.2.0)
199-
prism (1.7.0)
199+
prism (1.8.0)
200200
psych (5.3.1)
201201
date
202202
stringio
203-
public_suffix (7.0.0)
203+
public_suffix (7.0.2)
204204
racc (1.8.1)
205205
rack (3.2.4)
206206
rack-session (2.1.1)
@@ -296,9 +296,10 @@ GEM
296296
lint_roller (~> 1.1)
297297
rubocop-performance (~> 1.26.0)
298298
stringio (3.2.0)
299-
thor (1.4.0)
299+
thor (1.5.0)
300300
timeout (0.6.0)
301-
trilogy (2.9.0)
301+
trilogy (2.10.0)
302+
bigdecimal
302303
tsort (0.2.0)
303304
tzinfo (2.0.6)
304305
concurrent-ruby (~> 1.0)
@@ -420,9 +421,9 @@ CHECKSUMS
420421
pg (1.6.3-x86_64-linux-musl) sha256=9c9c90d98c72f78eb04c0f55e9618fe55d1512128e411035fe229ff427864009
421422
pp (0.6.3) sha256=2951d514450b93ccfeb1df7d021cae0da16e0a7f95ee1e2273719669d0ab9df6
422423
prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193
423-
prism (1.7.0) sha256=10062f734bf7985c8424c44fac382ac04a58124ea3d220ec3ba9fe4f2da65103
424+
prism (1.8.0) sha256=84453a16ef5530ea62c5f03ec16b52a459575ad4e7b9c2b360fd8ce2c39c1254
424425
psych (5.3.1) sha256=eb7a57cef10c9d70173ff74e739d843ac3b2c019a003de48447b2963d81b1974
425-
public_suffix (7.0.0) sha256=f7090b5beb0e56f9f10d79eed4d5fbe551b3b425da65877e075dad47a6a1b095
426+
public_suffix (7.0.2) sha256=9114090c8e4e7135c1fd0e7acfea33afaab38101884320c65aaa0ffb8e26a857
426427
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
427428
rack (3.2.4) sha256=5d74b6f75082a643f43c1e76b419c40f0e5527fcfee1e669ac1e6b73c0ccb6f6
428429
rack-session (2.1.1) sha256=0b6dc07dea7e4b583f58a48e8b806d4c9f1c6c9214ebc202ec94562cbea2e4e9
@@ -456,9 +457,9 @@ CHECKSUMS
456457
standard-custom (1.0.2) sha256=424adc84179a074f1a2a309bb9cf7cd6bfdb2b6541f20c6bf9436c0ba22a652b
457458
standard-performance (1.9.0) sha256=49483d31be448292951d80e5e67cdcb576c2502103c7b40aec6f1b6e9c88e3f2
458459
stringio (3.2.0) sha256=c37cb2e58b4ffbd33fe5cd948c05934af997b36e0b6ca6fdf43afa234cf222e1
459-
thor (1.4.0) sha256=8763e822ccb0f1d7bee88cde131b19a65606657b847cc7b7b4b82e772bcd8a3d
460+
thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73
460461
timeout (0.6.0) sha256=6d722ad619f96ee383a0c557ec6eb8c4ecb08af3af62098a0be5057bf00de1af
461-
trilogy (2.9.0) sha256=a2d63b663ba68a4758e15d1f9afb228f5d16efc7fe7cea68699e1c106ef6067f
462+
trilogy (2.10.0) sha256=b58ed5fe568bbcccc1f0423bf654bb2af329c6dabb21453fb7481f76808edc93
462463
tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
463464
tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
464465
unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42

0 commit comments

Comments
 (0)