archival_record 3.0.1 → 4.0.1
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 +4 -4
- data/.envrc +9 -0
- data/.gitignore +1 -1
- data/.rubocop.yml +2 -3
- data/Appraisals +14 -0
- data/CHANGELOG.md +15 -2
- data/Gemfile.lock +68 -48
- data/LICENSE +1 -1
- data/README.md +61 -29
- data/archival_record.gemspec +15 -4
- data/gemfiles/rails_6.0.gemfile +2 -0
- data/gemfiles/rails_6.1.gemfile +2 -0
- data/gemfiles/rails_7.0.gemfile +2 -0
- data/gemfiles/rails_7.2.gemfile +7 -0
- data/gemfiles/rails_8.0.gemfile +7 -0
- data/lib/archival_record/version.rb +1 -1
- data/lib/archival_record.rb +2 -9
- data/lib/archival_record_core/archival_record.rb +19 -5
- data/lib/archival_record_core/archival_record_active_record_methods.rb +1 -3
- data/lib/archival_record_core/association_operation/archive.rb +0 -4
- data/lib/archival_record_core/association_operation/base.rb +25 -2
- data/shell.nix +41 -0
- data/test/associations_test.rb +22 -2
- data/test/bogus_relation_test.rb +2 -2
- data/test/callbacks_test.rb +14 -33
- data/test/exception_test.rb +9 -0
- data/test/fixtures/another_polys_holder.rb +1 -1
- data/test/fixtures/archival.rb +13 -7
- data/test/fixtures/archival_grandkid.rb +1 -1
- data/test/fixtures/archival_kid.rb +1 -1
- data/test/fixtures/archival_table_name.rb +1 -1
- data/test/fixtures/callback_archival.rb +13 -16
- data/test/fixtures/deprecated_warning_archival.rb +1 -1
- data/test/fixtures/exception_raiser.rb +11 -0
- data/test/fixtures/explicit_act_on_dependents_archival.rb +1 -1
- data/test/fixtures/exploder.rb +1 -1
- data/test/fixtures/ignorable_dependent.rb +1 -1
- data/test/fixtures/ignore_dependents_archival.rb +1 -1
- data/test/fixtures/independent_archival.rb +1 -1
- data/test/fixtures/many_many_archival.rb +9 -0
- data/test/fixtures/missing_archive_number.rb +1 -1
- data/test/fixtures/missing_archived_at.rb +1 -1
- data/test/fixtures/nonignorable_dependent.rb +1 -1
- data/test/fixtures/plain.rb +1 -1
- data/test/fixtures/poly.rb +1 -1
- data/test/fixtures/readonly_when_archived.rb +1 -1
- data/test/performance/the_test.rb +29 -0
- data/test/schema.rb +14 -12
- data/test/scope_test.rb +2 -2
- data/test/test_helper.rb +19 -5
- metadata +48 -12
- data/.gitlab-ci.yml +0 -20
- data/.rubocop_todo.yml +0 -7
- data/test/application_record_test.rb +0 -20
- data/test/fixtures/application_record_row.rb +0 -8
- /data/test/{fixtures/application_record.rb → application_record.rb} +0 -0
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: archival_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Meador
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '6.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: activejob
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '6.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '6.0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: appraisal
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +80,20 @@ dependencies:
|
|
66
80
|
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: pry
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
98
|
name: rake
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,16 +168,16 @@ dependencies:
|
|
140
168
|
name: sqlite3
|
141
169
|
requirement: !ruby/object:Gem::Requirement
|
142
170
|
requirements:
|
143
|
-
- - "
|
171
|
+
- - ">="
|
144
172
|
- !ruby/object:Gem::Version
|
145
|
-
version: '
|
173
|
+
version: '0'
|
146
174
|
type: :development
|
147
175
|
prerelease: false
|
148
176
|
version_requirements: !ruby/object:Gem::Requirement
|
149
177
|
requirements:
|
150
|
-
- - "
|
178
|
+
- - ">="
|
151
179
|
- !ruby/object:Gem::Version
|
152
|
-
version: '
|
180
|
+
version: '0'
|
153
181
|
description: |
|
154
182
|
*Atomic archiving/unarchiving for ActiveRecord*
|
155
183
|
|
@@ -164,10 +192,9 @@ executables: []
|
|
164
192
|
extensions: []
|
165
193
|
extra_rdoc_files: []
|
166
194
|
files:
|
195
|
+
- ".envrc"
|
167
196
|
- ".gitignore"
|
168
|
-
- ".gitlab-ci.yml"
|
169
197
|
- ".rubocop.yml"
|
170
|
-
- ".rubocop_todo.yml"
|
171
198
|
- Appraisals
|
172
199
|
- CHANGELOG.md
|
173
200
|
- Gemfile
|
@@ -181,6 +208,8 @@ files:
|
|
181
208
|
- gemfiles/rails_6.1.gemfile
|
182
209
|
- gemfiles/rails_7.0.gemfile
|
183
210
|
- gemfiles/rails_7.1.gemfile
|
211
|
+
- gemfiles/rails_7.2.gemfile
|
212
|
+
- gemfiles/rails_8.0.gemfile
|
184
213
|
- init.rb
|
185
214
|
- lib/archival_record.rb
|
186
215
|
- lib/archival_record/version.rb
|
@@ -190,8 +219,9 @@ files:
|
|
190
219
|
- lib/archival_record_core/association_operation/base.rb
|
191
220
|
- lib/archival_record_core/association_operation/unarchive.rb
|
192
221
|
- script/setup
|
222
|
+
- shell.nix
|
193
223
|
- test/ambiguous_table_test.rb
|
194
|
-
- test/
|
224
|
+
- test/application_record.rb
|
195
225
|
- test/archive_dependents_option_test.rb
|
196
226
|
- test/associations_test.rb
|
197
227
|
- test/basic_test.rb
|
@@ -200,9 +230,8 @@ files:
|
|
200
230
|
- test/column_test.rb
|
201
231
|
- test/deep_nesting_test.rb
|
202
232
|
- test/deprecated_warning_archival_test.rb
|
233
|
+
- test/exception_test.rb
|
203
234
|
- test/fixtures/another_polys_holder.rb
|
204
|
-
- test/fixtures/application_record.rb
|
205
|
-
- test/fixtures/application_record_row.rb
|
206
235
|
- test/fixtures/archival.rb
|
207
236
|
- test/fixtures/archival_grandkid.rb
|
208
237
|
- test/fixtures/archival_kid.rb
|
@@ -210,17 +239,20 @@ files:
|
|
210
239
|
- test/fixtures/bogus_relation.rb
|
211
240
|
- test/fixtures/callback_archival.rb
|
212
241
|
- test/fixtures/deprecated_warning_archival.rb
|
242
|
+
- test/fixtures/exception_raiser.rb
|
213
243
|
- test/fixtures/explicit_act_on_dependents_archival.rb
|
214
244
|
- test/fixtures/exploder.rb
|
215
245
|
- test/fixtures/ignorable_dependent.rb
|
216
246
|
- test/fixtures/ignore_dependents_archival.rb
|
217
247
|
- test/fixtures/independent_archival.rb
|
248
|
+
- test/fixtures/many_many_archival.rb
|
218
249
|
- test/fixtures/missing_archive_number.rb
|
219
250
|
- test/fixtures/missing_archived_at.rb
|
220
251
|
- test/fixtures/nonignorable_dependent.rb
|
221
252
|
- test/fixtures/plain.rb
|
222
253
|
- test/fixtures/poly.rb
|
223
254
|
- test/fixtures/readonly_when_archived.rb
|
255
|
+
- test/performance/the_test.rb
|
224
256
|
- test/polymorphic_test.rb
|
225
257
|
- test/readonly_when_archived_test.rb
|
226
258
|
- test/relations_test.rb
|
@@ -230,11 +262,15 @@ files:
|
|
230
262
|
- test/test_helper.rb
|
231
263
|
- test/through_association_test.rb
|
232
264
|
- test/transaction_test.rb
|
233
|
-
homepage:
|
265
|
+
homepage:
|
234
266
|
licenses:
|
235
267
|
- MIT
|
236
268
|
metadata:
|
269
|
+
bug_tracker_uri: https://codeberg.org/joelmeador/archival_record/issues
|
270
|
+
changelog_uri: https://codeberg.org/joelmeador/archival_record/src/branch/main/CHANGELOG.md
|
271
|
+
homepage_uri: https://codeberg.org/joelmeador/archival_record/
|
237
272
|
rubygems_mfa_required: 'true'
|
273
|
+
source_code_uri: https://codeberg.org/joelmeador/archival_record/
|
238
274
|
post_install_message:
|
239
275
|
rdoc_options: []
|
240
276
|
require_paths:
|
@@ -250,7 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
250
286
|
- !ruby/object:Gem::Version
|
251
287
|
version: '0'
|
252
288
|
requirements: []
|
253
|
-
rubygems_version: 3.
|
289
|
+
rubygems_version: 3.5.22
|
254
290
|
signing_key:
|
255
291
|
specification_version: 4
|
256
292
|
summary: Atomic archiving/unarchiving for ActiveRecord
|
data/.gitlab-ci.yml
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
image: "ruby:3.2"
|
2
|
-
|
3
|
-
before_script:
|
4
|
-
- apt-get update -qq && apt-get install -y -qq sqlite3 libsqlite3-dev nodejs
|
5
|
-
- ruby -v
|
6
|
-
- which ruby
|
7
|
-
- gem install bundler --no-document
|
8
|
-
- bundle install --jobs $(nproc) "${FLAGS[@]}"
|
9
|
-
- bundle install --gemfile=gemfiles/rails_6.0.gemfile
|
10
|
-
- bundle install --gemfile=gemfiles/rails_6.1.gemfile
|
11
|
-
- bundle install --gemfile=gemfiles/rails_7.0.gemfile
|
12
|
-
- bundle install --gemfile=gemfiles/rails_7.1.gemfile
|
13
|
-
|
14
|
-
rake:
|
15
|
-
script:
|
16
|
-
- bundle exec rake
|
17
|
-
|
18
|
-
appraisal:
|
19
|
-
script:
|
20
|
-
- bundle exec appraisal rake
|
data/.rubocop_todo.yml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config`
|
3
|
-
# on 2024-06-11 01:38:42 UTC using RuboCop version 1.64.1.
|
4
|
-
# The point is for the user to remove these configuration records
|
5
|
-
# one by one as the offenses are removed from the code base.
|
6
|
-
# Note that changes in the inspected code, or installation of new
|
7
|
-
# versions of RuboCop, may require this file to be generated again.
|
@@ -1,20 +0,0 @@
|
|
1
|
-
require_relative "test_helper"
|
2
|
-
|
3
|
-
# Rails 5 introduced a new base class, and this is gonna test that
|
4
|
-
if defined?(ApplicationRecord)
|
5
|
-
class ApplicationRecordTest < ActiveSupport::TestCase
|
6
|
-
|
7
|
-
test "archive archives the record" do
|
8
|
-
archival = ApplicationRecordRow.create!
|
9
|
-
archival.archive!
|
10
|
-
assert archival.reload.archived?
|
11
|
-
end
|
12
|
-
|
13
|
-
test "unarchive unarchives archival records" do
|
14
|
-
archival = ApplicationRecordRow.create!(archived_at: Time.now.utc, archive_number: 1)
|
15
|
-
archival.unarchive!
|
16
|
-
assert_not archival.reload.archived?
|
17
|
-
end
|
18
|
-
|
19
|
-
end
|
20
|
-
end
|
File without changes
|