mongo_trails 14.0.0 → 17.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e867f5430a37c91464c008ae9f193a50f1ad76718852a582e7a177c4ec8d80a6
4
- data.tar.gz: b742ffe90d29775e8df45ff29887951728cf2ea486f6d4cda156f8cbebd9bbb8
3
+ metadata.gz: 47992865a22a08835378021027077b45f22379edf107657c58ceef30a7434af8
4
+ data.tar.gz: c6f4f9b31d6ea8cb9aee967a82eacb9fe25b65b8dcec66bb106825a705ed5c13
5
5
  SHA512:
6
- metadata.gz: a66114fa3ba6863a31ca40ac8abb4e4f340d8738506c62d8aae970f2360b42ed2cad67ef6f4f2aa7a8b59912419cd951119e80a56a60adee8f91f936244e51d1
7
- data.tar.gz: bc317d9b07a64f8d6e12a7e1ab2a007aa3d450a0ea118e64f7b69a56038e2dcbaf5d5d2c1f2d6424ec50dcfd892a66d3f483be1a614fb443fdfe9e1080acf5e4
6
+ metadata.gz: eed6a890f004082f77f1cff771e27e0dbf5644d658e396081eea482198eaefbbecaed03eebe79c3f9ded6bc13df2d5c9d88dc117cd31c6beb4fec261351b71de
7
+ data.tar.gz: edad164d6a99840e7ac132cbf6d4497a8ff116dd131b2d02e1a1f1f82102b187978b993cef5974962ecbd0fbb6b8abd9602c134a10ab092e5e097126dee6e02b
@@ -37,7 +37,7 @@ jobs:
37
37
  fail-fast: false
38
38
  matrix:
39
39
  ruby: ['4.0', '3.2']
40
- gemfile: [gemfiles/rails_8_1.gemfile, gemfiles/rails_8.gemfile, gemfiles/rails_7.gemfile]
40
+ gemfile: [gemfiles/rails_8_1.gemfile, gemfiles/rails_8.gemfile, gemfiles/rails_8_paper_trail_16.gemfile, gemfiles/rails_7.gemfile]
41
41
 
42
42
  env:
43
43
  BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
data/Appraisals CHANGED
@@ -11,3 +11,8 @@ end
11
11
  appraise 'rails-8-1' do
12
12
  gem 'activerecord', '~> 8.1'
13
13
  end
14
+
15
+ appraise 'rails-8-paper-trail-16' do
16
+ gem 'activerecord', '~> 8.0.0'
17
+ gem 'paper_trail', '~> 16.0'
18
+ end
data/README.md CHANGED
@@ -45,9 +45,10 @@ Done!
45
45
 
46
46
  ## Releasing
47
47
 
48
- Update `MongoTrails::VERSION` in `lib/mongo_trails/version.rb` using semantic versioning, commit the change, and run:
48
+ Update `MongoTrails::VERSION` and all appraisal lockfiles, then validate and release:
49
49
 
50
50
  ```bash
51
+ bin/bump-version VERSION
51
52
  bundle exec rake test
52
53
  bundle exec rubocop
53
54
  bundle exec rake release:validate
data/bin/bump-version ADDED
@@ -0,0 +1,67 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'bundler'
5
+ require 'pathname'
6
+
7
+ ROOT = Pathname(__dir__).join('..').expand_path
8
+ VERSION_FILE = ROOT.join('lib/mongo_trails/version.rb')
9
+ LOCKFILES = [ROOT.join('Gemfile.lock'), *ROOT.glob('gemfiles/*.gemfile.lock')].freeze
10
+ VERSION_PATTERN = /VERSION = ['"]([^'"]+)['"]/
11
+
12
+ def abort_with_usage
13
+ abort 'Usage: bin/bump-version VERSION'
14
+ end
15
+
16
+ abort_with_usage unless ARGV.one?
17
+
18
+ requested_version = ARGV.first
19
+ unless Gem::Version.correct?(requested_version) && requested_version.match?(/\A\d+\.\d+\.\d+(?:\.[0-9A-Za-z]+)*\z/)
20
+ abort "Invalid version: #{requested_version.inspect}; expected a version such as 14.0.2 or 15.0.0.pre.1"
21
+ end
22
+
23
+ files = [VERSION_FILE, *LOCKFILES]
24
+ original_contents = files.to_h { |path| [path, path.binread] }
25
+
26
+ begin
27
+ version_source = VERSION_FILE.read
28
+ abort "Could not find VERSION assignment in #{VERSION_FILE}" unless version_source.match?(VERSION_PATTERN)
29
+
30
+ VERSION_FILE.write(version_source.sub(VERSION_PATTERN, "VERSION = '#{requested_version}'"))
31
+
32
+ bundle = Gem.bin_path('bundler', 'bundle')
33
+ LOCKFILES.each do |lockfile|
34
+ gemfile = Pathname(lockfile.to_s.delete_suffix('.lock'))
35
+ puts "Updating #{lockfile.relative_path_from(ROOT)}"
36
+
37
+ success = system(
38
+ {
39
+ 'BUNDLE_GEMFILE' => gemfile.to_s,
40
+ 'BUNDLE_FROZEN' => 'false',
41
+ 'BUNDLE_DEPLOYMENT' => 'false'
42
+ },
43
+ Gem.ruby,
44
+ bundle,
45
+ 'lock',
46
+ '--local',
47
+ chdir: ROOT.to_s
48
+ )
49
+ raise "Failed to update #{lockfile}" unless success
50
+ end
51
+
52
+ stale_lockfiles = LOCKFILES.reject do |lockfile|
53
+ lockfile.read.match?(/^\s+mongo_trails \(#{Regexp.escape(requested_version)}\)$/)
54
+ end
55
+ raise "Version was not updated in: #{stale_lockfiles.join(', ')}" if stale_lockfiles.any?
56
+
57
+ puts "Updated mongo_trails to #{requested_version}"
58
+ puts 'Next: bundle exec rake test && bundle exec rubocop && git diff --check'
59
+ rescue Interrupt
60
+ original_contents.each { |path, contents| path.binwrite(contents) }
61
+ warn 'Version bump interrupted; changed files were restored'
62
+ exit 130
63
+ rescue StandardError => e
64
+ original_contents.each { |path, contents| path.binwrite(contents) }
65
+ warn "Version bump failed; changed files were restored: #{e.message}"
66
+ exit 1
67
+ end
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- mongo_trails (14.0.0)
4
+ mongo_trails (17.0.0)
5
5
  mongoid (>= 7, < 10)
6
6
  ostruct
7
- paper_trail (~> 16)
7
+ paper_trail (>= 16, < 18)
8
8
  sidekiq (>= 6.5, < 9)
9
9
 
10
10
  GEM
@@ -40,7 +40,7 @@ GEM
40
40
  ast (2.4.3)
41
41
  base64 (0.3.0)
42
42
  benchmark (0.5.0)
43
- bigdecimal (4.1.2)
43
+ bigdecimal (4.1.3)
44
44
  bson (5.2.0)
45
45
  concurrent-ruby (1.3.8)
46
46
  connection_pool (3.0.2)
@@ -66,8 +66,8 @@ GEM
66
66
  mongo (>= 2.18.0, < 3.0.0)
67
67
  ostruct
68
68
  ostruct (0.6.3)
69
- paper_trail (16.0.0)
70
- activerecord (>= 6.1)
69
+ paper_trail (17.0.0)
70
+ activerecord (>= 7.1)
71
71
  request_store (~> 1.4)
72
72
  parallel (1.27.0)
73
73
  parser (3.3.10.2)
@@ -157,7 +157,7 @@ CHECKSUMS
157
157
  ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
158
158
  base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
159
159
  benchmark (0.5.0) sha256=465df122341aedcb81a2a24b4d3bd19b6c67c1530713fd533f3ff034e419236c
160
- bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd
160
+ bigdecimal (4.1.3) sha256=61ebe1e5e559bdc3cc6f2c0ee7f427321fc838f59611c294356eb04d6e21cf66
161
161
  bson (5.2.0) sha256=c468c1e8a3cfa1e80531cc519a890f85586986721d8e305f83465cc36bb82608
162
162
  bundler (4.0.19) sha256=b48056e4c77fb3853cc47775b5447ede44aaa4f53c32f168014ab4fe86587d47
163
163
  concurrent-ruby (1.3.8) sha256=b2f1be836e968ccc78ccfce277ea79c72a88633f22306782c16ff23fb415d1e1
@@ -172,10 +172,10 @@ CHECKSUMS
172
172
  mcp (0.8.0) sha256=ae8bd146bb8e168852866fd26f805f52744f6326afb3211e073f78a95e0c34fb
173
173
  minitest (5.27.0) sha256=2d3b17f8a36fe7801c1adcffdbc38233b938eb0b4966e97a6739055a45fa77d5
174
174
  mongo (2.25.0) sha256=b4663884d23523d24f50c579846956444410f939093e8c2a95fa4b76bb929053
175
- mongo_trails (14.0.0)
175
+ mongo_trails (17.0.0)
176
176
  mongoid (9.1.0) sha256=ef7b50f4c84e636850c3431bc3c92f98481f4e1d147ff06a1c21242d0b242a9e
177
177
  ostruct (0.6.3) sha256=95a2ed4a4bd1d190784e666b47b2d3f078e4a9efda2fccf18f84ddc6538ed912
178
- paper_trail (16.0.0) sha256=e9b9f0fb1b8b590c8231cfa931b282ba92f90e066e393930a5e1c61ae4c5019d
178
+ paper_trail (17.0.0) sha256=1c2842061d3874ca7015908e821e2aa14f9b982af2acb2a7974713bf79021c85
179
179
  parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130
180
180
  parser (3.3.10.2) sha256=6f60c84aa4bdcedb6d1a2434b738fe8a8136807b6adc8f7f53b97da9bc4e9357
181
181
  prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
@@ -1,22 +1,22 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- mongo_trails (14.0.0)
4
+ mongo_trails (17.0.0)
5
5
  mongoid (>= 7, < 10)
6
6
  ostruct
7
- paper_trail (~> 16)
7
+ paper_trail (>= 16, < 18)
8
8
  sidekiq (>= 6.5, < 9)
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- activemodel (8.1.3.1)
14
- activesupport (= 8.1.3.1)
15
- activerecord (8.1.3.1)
16
- activemodel (= 8.1.3.1)
17
- activesupport (= 8.1.3.1)
13
+ activemodel (8.1.4)
14
+ activesupport (= 8.1.4)
15
+ activerecord (8.1.4)
16
+ activemodel (= 8.1.4)
17
+ activesupport (= 8.1.4)
18
18
  timeout (>= 0.4.0)
19
- activesupport (8.1.3.1)
19
+ activesupport (8.1.4)
20
20
  base64
21
21
  bigdecimal
22
22
  concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -40,7 +40,7 @@ GEM
40
40
  thor (>= 0.14.0)
41
41
  ast (2.4.3)
42
42
  base64 (0.3.0)
43
- bigdecimal (4.1.2)
43
+ bigdecimal (4.1.3)
44
44
  bson (5.2.0)
45
45
  concurrent-ruby (1.3.8)
46
46
  connection_pool (3.0.2)
@@ -66,8 +66,8 @@ GEM
66
66
  mongo (>= 2.18.0, < 3.0.0)
67
67
  ostruct
68
68
  ostruct (0.6.3)
69
- paper_trail (16.0.0)
70
- activerecord (>= 6.1)
69
+ paper_trail (17.0.0)
70
+ activerecord (>= 7.1)
71
71
  request_store (~> 1.4)
72
72
  parallel (1.27.0)
73
73
  parser (3.3.10.2)
@@ -124,7 +124,7 @@ GEM
124
124
  unicode-display_width (3.2.0)
125
125
  unicode-emoji (~> 4.1)
126
126
  unicode-emoji (4.2.0)
127
- uri (1.1.1)
127
+ uri (1.1.2)
128
128
 
129
129
  PLATFORMS
130
130
  aarch64-linux-gnu
@@ -149,15 +149,15 @@ DEPENDENCIES
149
149
  sqlite3 (~> 2.9)
150
150
 
151
151
  CHECKSUMS
152
- activemodel (8.1.3.1) sha256=99cc02ce2faec371d14440949d85787ebd23a907c9baef0a9d4bcd4d21888f88
153
- activerecord (8.1.3.1) sha256=0a2fb6c28f4938f6b013a3a549bec0a7e37d535f3dc8990e804bcc3258c0403b
154
- activesupport (8.1.3.1) sha256=85458765f25ea48b9019c46b6bb3fa5683197bf4280d9f06710a6e8d7a831376
152
+ activemodel (8.1.4) sha256=9a0906c127bd118aa5f06157db12b8f750da83dccee72db2f658547a0ae7a0e8
153
+ activerecord (8.1.4) sha256=3b4957ea7f246c9231bd7faa909312eac03a9101aaf87977b6c52733ff00b04f
154
+ activesupport (8.1.4) sha256=891dd3fe43c4fc8391934b237b1189bb1f661c932a84a840043db9d46a4e80df
155
155
  addressable (2.8.9) sha256=cc154fcbe689711808a43601dee7b980238ce54368d23e127421753e46895485
156
156
  after_commit_everywhere (1.6.0) sha256=c8b3409a1172e43070d2e57f4b9d7b89dce5a7f057576b748cb9fe0a0dd4d917
157
157
  appraisal (2.5.0) sha256=36989221be127913b0dba8d114da2001e6b2dceea7bd4951200eaba764eed3ce
158
158
  ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
159
159
  base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
160
- bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd
160
+ bigdecimal (4.1.3) sha256=61ebe1e5e559bdc3cc6f2c0ee7f427321fc838f59611c294356eb04d6e21cf66
161
161
  bson (5.2.0) sha256=c468c1e8a3cfa1e80531cc519a890f85586986721d8e305f83465cc36bb82608
162
162
  bundler (4.0.19) sha256=b48056e4c77fb3853cc47775b5447ede44aaa4f53c32f168014ab4fe86587d47
163
163
  concurrent-ruby (1.3.8) sha256=b2f1be836e968ccc78ccfce277ea79c72a88633f22306782c16ff23fb415d1e1
@@ -172,10 +172,10 @@ CHECKSUMS
172
172
  mcp (0.8.0) sha256=ae8bd146bb8e168852866fd26f805f52744f6326afb3211e073f78a95e0c34fb
173
173
  minitest (5.27.0) sha256=2d3b17f8a36fe7801c1adcffdbc38233b938eb0b4966e97a6739055a45fa77d5
174
174
  mongo (2.25.0) sha256=b4663884d23523d24f50c579846956444410f939093e8c2a95fa4b76bb929053
175
- mongo_trails (14.0.0)
175
+ mongo_trails (17.0.0)
176
176
  mongoid (9.1.0) sha256=ef7b50f4c84e636850c3431bc3c92f98481f4e1d147ff06a1c21242d0b242a9e
177
177
  ostruct (0.6.3) sha256=95a2ed4a4bd1d190784e666b47b2d3f078e4a9efda2fccf18f84ddc6538ed912
178
- paper_trail (16.0.0) sha256=e9b9f0fb1b8b590c8231cfa931b282ba92f90e066e393930a5e1c61ae4c5019d
178
+ paper_trail (17.0.0) sha256=1c2842061d3874ca7015908e821e2aa14f9b982af2acb2a7974713bf79021c85
179
179
  parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130
180
180
  parser (3.3.10.2) sha256=6f60c84aa4bdcedb6d1a2434b738fe8a8136807b6adc8f7f53b97da9bc4e9357
181
181
  prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
@@ -207,7 +207,7 @@ CHECKSUMS
207
207
  tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
208
208
  unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
209
209
  unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
210
- uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6
210
+ uri (1.1.2) sha256=89292e98eabbef6248b0a0ed5e7e398e152f83f17560023a6d94a7f492b169fb
211
211
 
212
212
  BUNDLED WITH
213
213
  4.0.19
@@ -1,22 +1,22 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- mongo_trails (14.0.0)
4
+ mongo_trails (17.0.0)
5
5
  mongoid (>= 7, < 10)
6
6
  ostruct
7
- paper_trail (~> 16)
7
+ paper_trail (>= 16, < 18)
8
8
  sidekiq (>= 6.5, < 9)
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- activemodel (8.1.3.1)
14
- activesupport (= 8.1.3.1)
15
- activerecord (8.1.3.1)
16
- activemodel (= 8.1.3.1)
17
- activesupport (= 8.1.3.1)
13
+ activemodel (8.1.4)
14
+ activesupport (= 8.1.4)
15
+ activerecord (8.1.4)
16
+ activemodel (= 8.1.4)
17
+ activesupport (= 8.1.4)
18
18
  timeout (>= 0.4.0)
19
- activesupport (8.1.3.1)
19
+ activesupport (8.1.4)
20
20
  base64
21
21
  bigdecimal
22
22
  concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -38,7 +38,7 @@ GEM
38
38
  thor (>= 0.14.0)
39
39
  ast (2.4.3)
40
40
  base64 (0.3.0)
41
- bigdecimal (4.1.2)
41
+ bigdecimal (4.1.3)
42
42
  bson (5.2.0)
43
43
  concurrent-ruby (1.3.8)
44
44
  connection_pool (3.0.2)
@@ -59,8 +59,8 @@ GEM
59
59
  mongo (>= 2.18.0, < 3.0.0)
60
60
  ostruct
61
61
  ostruct (0.6.3)
62
- paper_trail (16.0.0)
63
- activerecord (>= 6.1)
62
+ paper_trail (17.0.0)
63
+ activerecord (>= 7.1)
64
64
  request_store (~> 1.4)
65
65
  parallel (1.28.0)
66
66
  parser (3.3.11.1)
@@ -115,7 +115,7 @@ GEM
115
115
  unicode-display_width (3.2.0)
116
116
  unicode-emoji (~> 4.1)
117
117
  unicode-emoji (4.2.0)
118
- uri (1.1.1)
118
+ uri (1.1.2)
119
119
 
120
120
  PLATFORMS
121
121
  aarch64-linux-gnu
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file was generated by Appraisal
4
+
5
+ source 'https://rubygems.org'
6
+
7
+ gem 'activerecord', '~> 8.0.0'
8
+ gem 'after_commit_everywhere'
9
+ gem 'appraisal', '~> 2.3'
10
+ gem 'minitest', '~> 5.0'
11
+ gem 'paper_trail', '~> 16.0'
12
+ gem 'rake', '~> 13.0'
13
+ gem 'rubocop', require: false
14
+ gem 'sqlite3', '~> 2.9'
15
+
16
+ gemspec path: '../'
@@ -0,0 +1,216 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ mongo_trails (17.0.0)
5
+ mongoid (>= 7, < 10)
6
+ ostruct
7
+ paper_trail (>= 16, < 18)
8
+ sidekiq (>= 6.5, < 9)
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ activemodel (8.0.5.1)
14
+ activesupport (= 8.0.5.1)
15
+ activerecord (8.0.5.1)
16
+ activemodel (= 8.0.5.1)
17
+ activesupport (= 8.0.5.1)
18
+ timeout (>= 0.4.0)
19
+ activesupport (8.0.5.1)
20
+ base64
21
+ benchmark (>= 0.3)
22
+ bigdecimal
23
+ concurrent-ruby (~> 1.0, >= 1.3.1)
24
+ connection_pool (>= 2.2.5)
25
+ drb
26
+ i18n (>= 1.6, < 2)
27
+ logger (>= 1.4.2)
28
+ minitest (>= 5.1)
29
+ securerandom (>= 0.3)
30
+ tzinfo (~> 2.0, >= 2.0.5)
31
+ uri (>= 0.13.1)
32
+ addressable (2.8.9)
33
+ public_suffix (>= 2.0.2, < 8.0)
34
+ after_commit_everywhere (1.6.0)
35
+ activerecord (>= 4.2)
36
+ activesupport
37
+ appraisal (2.5.0)
38
+ bundler
39
+ rake
40
+ thor (>= 0.14.0)
41
+ ast (2.4.3)
42
+ base64 (0.3.0)
43
+ benchmark (0.5.0)
44
+ bigdecimal (4.1.3)
45
+ bson (5.2.0)
46
+ concurrent-ruby (1.3.8)
47
+ connection_pool (3.0.2)
48
+ drb (2.2.3)
49
+ i18n (1.15.2)
50
+ concurrent-ruby (~> 1.0)
51
+ json (2.21.2)
52
+ json-schema (6.2.0)
53
+ addressable (~> 2.8)
54
+ bigdecimal (>= 3.1, < 5)
55
+ language_server-protocol (3.17.0.5)
56
+ lint_roller (1.1.0)
57
+ logger (1.7.0)
58
+ mcp (0.8.0)
59
+ json-schema (>= 4.1)
60
+ minitest (5.27.0)
61
+ mongo (2.25.0)
62
+ base64
63
+ bson (>= 4.14.1, < 6.0.0)
64
+ mongoid (9.1.0)
65
+ activemodel (>= 5.1, < 8.2, != 7.0.0)
66
+ concurrent-ruby (>= 1.0.5, < 2.0)
67
+ mongo (>= 2.18.0, < 3.0.0)
68
+ ostruct
69
+ ostruct (0.6.3)
70
+ paper_trail (16.0.0)
71
+ activerecord (>= 6.1)
72
+ request_store (~> 1.4)
73
+ parallel (1.27.0)
74
+ parser (3.3.10.2)
75
+ ast (~> 2.4.1)
76
+ racc
77
+ prism (1.9.0)
78
+ public_suffix (7.0.5)
79
+ racc (1.8.1)
80
+ rack (3.2.7)
81
+ rainbow (3.1.1)
82
+ rake (13.3.1)
83
+ redis-client (0.30.1)
84
+ connection_pool
85
+ regexp_parser (2.11.3)
86
+ request_store (1.7.0)
87
+ rack (>= 1.4)
88
+ rubocop (1.85.1)
89
+ json (~> 2.3)
90
+ language_server-protocol (~> 3.17.0.2)
91
+ lint_roller (~> 1.1.0)
92
+ mcp (~> 0.6)
93
+ parallel (~> 1.10)
94
+ parser (>= 3.3.0.2)
95
+ rainbow (>= 2.2.2, < 4.0)
96
+ regexp_parser (>= 2.9.3, < 3.0)
97
+ rubocop-ast (>= 1.49.0, < 2.0)
98
+ ruby-progressbar (~> 1.7)
99
+ unicode-display_width (>= 2.4.0, < 4.0)
100
+ rubocop-ast (1.49.1)
101
+ parser (>= 3.3.7.2)
102
+ prism (~> 1.7)
103
+ ruby-progressbar (1.13.0)
104
+ securerandom (0.4.1)
105
+ sidekiq (8.1.7)
106
+ connection_pool (>= 3.0.0)
107
+ json (>= 2.16.0)
108
+ logger (>= 1.7.0)
109
+ rack (>= 3.2.0)
110
+ redis-client (>= 0.29.0)
111
+ sqlite3 (2.9.2-aarch64-linux-gnu)
112
+ sqlite3 (2.9.2-aarch64-linux-musl)
113
+ sqlite3 (2.9.2-arm-linux-gnu)
114
+ sqlite3 (2.9.2-arm-linux-musl)
115
+ sqlite3 (2.9.2-arm64-darwin)
116
+ sqlite3 (2.9.2-x86-linux-gnu)
117
+ sqlite3 (2.9.2-x86-linux-musl)
118
+ sqlite3 (2.9.2-x86_64-darwin)
119
+ sqlite3 (2.9.2-x86_64-linux-gnu)
120
+ sqlite3 (2.9.2-x86_64-linux-musl)
121
+ thor (1.5.0)
122
+ timeout (0.6.1)
123
+ tzinfo (2.0.6)
124
+ concurrent-ruby (~> 1.0)
125
+ unicode-display_width (3.2.0)
126
+ unicode-emoji (~> 4.1)
127
+ unicode-emoji (4.2.0)
128
+ uri (1.1.2)
129
+
130
+ PLATFORMS
131
+ aarch64-linux-gnu
132
+ aarch64-linux-musl
133
+ arm-linux-gnu
134
+ arm-linux-musl
135
+ arm64-darwin
136
+ x86-linux-gnu
137
+ x86-linux-musl
138
+ x86_64-darwin
139
+ x86_64-linux-gnu
140
+ x86_64-linux-musl
141
+
142
+ DEPENDENCIES
143
+ activerecord (~> 8.0.0)
144
+ after_commit_everywhere
145
+ appraisal (~> 2.3)
146
+ minitest (~> 5.0)
147
+ mongo_trails!
148
+ paper_trail (~> 16.0)
149
+ rake (~> 13.0)
150
+ rubocop
151
+ sqlite3 (~> 2.9)
152
+
153
+ CHECKSUMS
154
+ activemodel (8.0.5.1) sha256=559be32aa9c40db7a3ee0aef926d4508a9ebd22f96f7276c11326d21a7dff4a4
155
+ activerecord (8.0.5.1) sha256=9252968fce404d75eb17092498a440d472167f2f8deee32b4658d6552b1eeea7
156
+ activesupport (8.0.5.1) sha256=329a4280c4fbcfcf338ae2cb9df28b0b14527929dba105e10b3604516d998710
157
+ addressable (2.8.9) sha256=cc154fcbe689711808a43601dee7b980238ce54368d23e127421753e46895485
158
+ after_commit_everywhere (1.6.0) sha256=c8b3409a1172e43070d2e57f4b9d7b89dce5a7f057576b748cb9fe0a0dd4d917
159
+ appraisal (2.5.0) sha256=36989221be127913b0dba8d114da2001e6b2dceea7bd4951200eaba764eed3ce
160
+ ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
161
+ base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
162
+ benchmark (0.5.0) sha256=465df122341aedcb81a2a24b4d3bd19b6c67c1530713fd533f3ff034e419236c
163
+ bigdecimal (4.1.3) sha256=61ebe1e5e559bdc3cc6f2c0ee7f427321fc838f59611c294356eb04d6e21cf66
164
+ bson (5.2.0) sha256=c468c1e8a3cfa1e80531cc519a890f85586986721d8e305f83465cc36bb82608
165
+ bundler (4.0.19) sha256=b48056e4c77fb3853cc47775b5447ede44aaa4f53c32f168014ab4fe86587d47
166
+ concurrent-ruby (1.3.8) sha256=b2f1be836e968ccc78ccfce277ea79c72a88633f22306782c16ff23fb415d1e1
167
+ connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
168
+ drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
169
+ i18n (1.15.2) sha256=00f9eb62412fe593b2a65a97daa75300d37abb8f7202ec748e94b6d46a9dd1b5
170
+ json (2.21.2) sha256=1f1d3b7cf2b3ba1a69beca0bb6db13d5438b80bff3cd54cdaaa620b9b07c1c6a
171
+ json-schema (6.2.0) sha256=e8bff46ed845a22c1ab2bd0d7eccf831c01fe23bb3920caa4c74db4306813666
172
+ language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc
173
+ lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
174
+ logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
175
+ mcp (0.8.0) sha256=ae8bd146bb8e168852866fd26f805f52744f6326afb3211e073f78a95e0c34fb
176
+ minitest (5.27.0) sha256=2d3b17f8a36fe7801c1adcffdbc38233b938eb0b4966e97a6739055a45fa77d5
177
+ mongo (2.25.0) sha256=b4663884d23523d24f50c579846956444410f939093e8c2a95fa4b76bb929053
178
+ mongo_trails (17.0.0)
179
+ mongoid (9.1.0) sha256=ef7b50f4c84e636850c3431bc3c92f98481f4e1d147ff06a1c21242d0b242a9e
180
+ ostruct (0.6.3) sha256=95a2ed4a4bd1d190784e666b47b2d3f078e4a9efda2fccf18f84ddc6538ed912
181
+ paper_trail (16.0.0) sha256=e9b9f0fb1b8b590c8231cfa931b282ba92f90e066e393930a5e1c61ae4c5019d
182
+ parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130
183
+ parser (3.3.10.2) sha256=6f60c84aa4bdcedb6d1a2434b738fe8a8136807b6adc8f7f53b97da9bc4e9357
184
+ prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
185
+ public_suffix (7.0.5) sha256=1a8bb08f1bbea19228d3bed6e5ed908d1cb4f7c2726d18bd9cadf60bc676f623
186
+ racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
187
+ rack (3.2.7) sha256=93e13e1c24f93556671d85d2d79fa228c3485815c50d7e2f265b5330c6528fb7
188
+ rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
189
+ rake (13.3.1) sha256=8c9e89d09f66a26a01264e7e3480ec0607f0c497a861ef16063604b1b08eb19c
190
+ redis-client (0.30.1) sha256=5151bc5c7bbfe48623732cdae3b900d8a22dc691cc7cdfacfb351ac55116522d
191
+ regexp_parser (2.11.3) sha256=ca13f381a173b7a93450e53459075c9b76a10433caadcb2f1180f2c741fc55a4
192
+ request_store (1.7.0) sha256=e1b75d5346a315f452242a68c937ef8e48b215b9453a77a6c0acdca2934c88cb
193
+ rubocop (1.85.1) sha256=3dbcf9e961baa4c376eeeb2a03913dca5e3987033b04d38fa538aa1e7406cc77
194
+ rubocop-ast (1.49.1) sha256=4412f3ee70f6fe4546cc489548e0f6fcf76cafcfa80fa03af67098ffed755035
195
+ ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
196
+ securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
197
+ sidekiq (8.1.7) sha256=91ad48c7e6c32e1846bf1d5b74c27948758049b93fed0cb539f8d586c7de3415
198
+ sqlite3 (2.9.2-aarch64-linux-gnu) sha256=eeb86db55645b85327ba75129e3614658d974bf4da8fdc87018a0d42c59f6e42
199
+ sqlite3 (2.9.2-aarch64-linux-musl) sha256=4feff91fb8c2b13688da34b5627c9d1ed9cedb3ee87a7114ec82209147f07a6d
200
+ sqlite3 (2.9.2-arm-linux-gnu) sha256=1ee2eb06b5301aaf5ce343a6e88d99ac932d95202d7b350f0e7b6d8d588580d7
201
+ sqlite3 (2.9.2-arm-linux-musl) sha256=8ca0de6aceede968de0394e22e95d549834c4d8e318f69a92a52f049878a0057
202
+ sqlite3 (2.9.2-arm64-darwin) sha256=d15bd9609a05f9d54930babe039585efc8cadd57517c15b64ec7dfa75158a5e9
203
+ sqlite3 (2.9.2-x86-linux-gnu) sha256=066bc904522f8a7072236a81237c03a4a1dfe070a25107e392de03d1e4ad0e6d
204
+ sqlite3 (2.9.2-x86-linux-musl) sha256=6503c76278f5e8629b12b6518ff43a9a4f6d9381de73f0b086c9fa1226db5ede
205
+ sqlite3 (2.9.2-x86_64-darwin) sha256=ed691b5021674d72582d03c5a38e89634b961902735fb6225273892805421d13
206
+ sqlite3 (2.9.2-x86_64-linux-gnu) sha256=dce83ffcb7e72f9f7aeb6e5404f15d277a45332fe18ccce8a8b3ed51e8d23aee
207
+ sqlite3 (2.9.2-x86_64-linux-musl) sha256=e8dd906a613f13b60f6d47ae9dda376384d9de1ab3f7e3f2fdf2fd18a871a2d7
208
+ thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73
209
+ timeout (0.6.1) sha256=78f57368a7e7bbadec56971f78a3f5ecbcfb59b7fcbb0a3ed6ddc08a5094accb
210
+ tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
211
+ unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
212
+ unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
213
+ uri (1.1.2) sha256=89292e98eabbef6248b0a0ed5e7e398e152f83f17560023a6d94a7f492b169fb
214
+
215
+ BUNDLED WITH
216
+ 4.0.19
@@ -100,12 +100,19 @@ module MongoTrails
100
100
  return if existing_counter.present?
101
101
 
102
102
  max_id = maximum_existing_integer_id
103
+ initialize_counter(counter_id, max_id)
104
+ end
103
105
 
106
+ def initialize_counter(counter_id, max_id)
104
107
  AutoIncrementCounters.collection.find(_id: counter_id).find_one_and_update(
105
108
  { '$setOnInsert' => { sequence: max_id } },
106
109
  upsert: true,
107
110
  return_document: :after
108
111
  )
112
+ rescue Mongo::Error::OperationFailure => e
113
+ # DocumentDB can return E11000 when another writer creates this exact counter after the
114
+ # existence check. The caller can safely increment the counter created by that writer.
115
+ raise unless e.code == 11_000
109
116
  end
110
117
 
111
118
  def maximum_existing_integer_id
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MongoTrails
4
- VERSION = '14.0.0'
4
+ VERSION = '17.0.0'
5
5
  end
data/mongo_trails.gemspec CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |s|
30
30
 
31
31
  s.add_dependency 'mongoid', '>= 7', '< 10'
32
32
  s.add_dependency 'ostruct'
33
- s.add_dependency 'paper_trail', '~> 16'
33
+ s.add_dependency 'paper_trail', '>= 16', '< 18'
34
34
  s.add_dependency 'sidekiq', '>= 6.5', '< 9'
35
35
 
36
36
  s.required_ruby_version = '>= 3.2'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongo_trails
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.0.0
4
+ version: 17.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Tsirel
@@ -48,16 +48,22 @@ dependencies:
48
48
  name: paper_trail
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - "~>"
51
+ - - ">="
52
52
  - !ruby/object:Gem::Version
53
53
  version: '16'
54
+ - - "<"
55
+ - !ruby/object:Gem::Version
56
+ version: '18'
54
57
  type: :runtime
55
58
  prerelease: false
56
59
  version_requirements: !ruby/object:Gem::Requirement
57
60
  requirements:
58
- - - "~>"
61
+ - - ">="
59
62
  - !ruby/object:Gem::Version
60
63
  version: '16'
64
+ - - "<"
65
+ - !ruby/object:Gem::Version
66
+ version: '18'
61
67
  - !ruby/object:Gem::Dependency
62
68
  name: sidekiq
63
69
  requirement: !ruby/object:Gem::Requirement
@@ -97,12 +103,15 @@ files:
97
103
  - LICENSE
98
104
  - README.md
99
105
  - Rakefile
106
+ - bin/bump-version
100
107
  - gemfiles/rails_7.gemfile
101
108
  - gemfiles/rails_7.gemfile.lock
102
109
  - gemfiles/rails_8.gemfile
103
110
  - gemfiles/rails_8.gemfile.lock
104
111
  - gemfiles/rails_8_1.gemfile
105
112
  - gemfiles/rails_8_1.gemfile.lock
113
+ - gemfiles/rails_8_paper_trail_16.gemfile
114
+ - gemfiles/rails_8_paper_trail_16.gemfile.lock
106
115
  - lib/mongo_trails.rb
107
116
  - lib/mongo_trails/callback_propagation.rb
108
117
  - lib/mongo_trails/config.rb
@@ -139,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
148
  - !ruby/object:Gem::Version
140
149
  version: '0'
141
150
  requirements: []
142
- rubygems_version: 3.6.9
151
+ rubygems_version: 4.0.16
143
152
  specification_version: 4
144
153
  summary: PaperTrail addon to store versions in MongoDB
145
154
  test_files: []