archival_record 2.0.2 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/.gitlab-ci.yml +20 -0
  4. data/.rubocop.yml +7 -5
  5. data/.rubocop_todo.yml +1 -8
  6. data/Appraisals +8 -11
  7. data/CHANGELOG.md +15 -0
  8. data/Gemfile.lock +77 -43
  9. data/LICENSE +5 -2
  10. data/README.md +36 -12
  11. data/archival_record.gemspec +36 -31
  12. data/gemfiles/{rails_5.1.gemfile → rails_6.1.gemfile} +1 -2
  13. data/gemfiles/{rails_5.2.gemfile → rails_7.0.gemfile} +1 -2
  14. data/gemfiles/{rails_5.0.gemfile → rails_7.1.gemfile} +1 -2
  15. data/init.rb +2 -2
  16. data/lib/archival_record/version.rb +1 -1
  17. data/lib/archival_record.rb +5 -5
  18. data/lib/archival_record_core/archival_record.rb +38 -21
  19. data/lib/archival_record_core/archival_record_active_record_methods.rb +3 -2
  20. data/lib/archival_record_core/association_operation/base.rb +4 -2
  21. data/test/application_record_test.rb +1 -1
  22. data/test/archive_dependents_option_test.rb +54 -0
  23. data/test/basic_test.rb +5 -5
  24. data/test/bogus_relation_test.rb +22 -0
  25. data/test/deep_nesting_test.rb +1 -1
  26. data/test/fixtures/bogus_relation.rb +6 -0
  27. data/test/fixtures/explicit_act_on_dependents_archival.rb +9 -0
  28. data/test/fixtures/ignorable_dependent.rb +10 -0
  29. data/test/fixtures/ignore_dependents_archival.rb +9 -0
  30. data/test/fixtures/nonignorable_dependent.rb +10 -0
  31. data/test/polymorphic_test.rb +2 -2
  32. data/test/relations_test.rb +1 -1
  33. data/test/schema.rb +27 -0
  34. data/test/scope_test.rb +4 -10
  35. data/test/test_helper.rb +19 -25
  36. data/test/transaction_test.rb +2 -1
  37. metadata +55 -53
  38. data/.travis.yml +0 -23
  39. data/test/fixtures/callback_archival_4.rb +0 -19
  40. /data/test/fixtures/{callback_archival_5.rb → callback_archival.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: 2.0.2
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Meador
@@ -19,10 +19,10 @@ authors:
19
19
  - Josh Menden
20
20
  - Sergey Gnuskov
21
21
  - Elijah Miller
22
- autorequire:
22
+ autorequire:
23
23
  bindir: bin
24
24
  cert_chain: []
25
- date: 2020-08-04 00:00:00.000000000 Z
25
+ date: 1980-01-01 00:00:00.000000000 Z
26
26
  dependencies:
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activerecord
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '5.0'
33
+ version: '6.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '5.0'
40
+ version: '6.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: appraisal
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -109,7 +109,21 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: sqlite3
112
+ name: rubocop-rails
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rubocop-rake
113
127
  requirement: !ruby/object:Gem::Requirement
114
128
  requirements:
115
129
  - - ">="
@@ -122,6 +136,20 @@ dependencies:
122
136
  - - ">="
123
137
  - !ruby/object:Gem::Version
124
138
  version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: sqlite3
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "<"
144
+ - !ruby/object:Gem::Version
145
+ version: '2'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "<"
151
+ - !ruby/object:Gem::Version
152
+ version: '2'
125
153
  description: |
126
154
  *Atomic archiving/unarchiving for ActiveRecord*
127
155
 
@@ -137,9 +165,9 @@ extensions: []
137
165
  extra_rdoc_files: []
138
166
  files:
139
167
  - ".gitignore"
168
+ - ".gitlab-ci.yml"
140
169
  - ".rubocop.yml"
141
170
  - ".rubocop_todo.yml"
142
- - ".travis.yml"
143
171
  - Appraisals
144
172
  - CHANGELOG.md
145
173
  - Gemfile
@@ -149,10 +177,10 @@ files:
149
177
  - Rakefile
150
178
  - SECURITY.md
151
179
  - archival_record.gemspec
152
- - gemfiles/rails_5.0.gemfile
153
- - gemfiles/rails_5.1.gemfile
154
- - gemfiles/rails_5.2.gemfile
155
180
  - gemfiles/rails_6.0.gemfile
181
+ - gemfiles/rails_6.1.gemfile
182
+ - gemfiles/rails_7.0.gemfile
183
+ - gemfiles/rails_7.1.gemfile
156
184
  - init.rb
157
185
  - lib/archival_record.rb
158
186
  - lib/archival_record/version.rb
@@ -164,8 +192,10 @@ files:
164
192
  - script/setup
165
193
  - test/ambiguous_table_test.rb
166
194
  - test/application_record_test.rb
195
+ - test/archive_dependents_option_test.rb
167
196
  - test/associations_test.rb
168
197
  - test/basic_test.rb
198
+ - test/bogus_relation_test.rb
169
199
  - test/callbacks_test.rb
170
200
  - test/column_test.rb
171
201
  - test/deep_nesting_test.rb
@@ -177,13 +207,17 @@ files:
177
207
  - test/fixtures/archival_grandkid.rb
178
208
  - test/fixtures/archival_kid.rb
179
209
  - test/fixtures/archival_table_name.rb
180
- - test/fixtures/callback_archival_4.rb
181
- - test/fixtures/callback_archival_5.rb
210
+ - test/fixtures/bogus_relation.rb
211
+ - test/fixtures/callback_archival.rb
182
212
  - test/fixtures/deprecated_warning_archival.rb
213
+ - test/fixtures/explicit_act_on_dependents_archival.rb
183
214
  - test/fixtures/exploder.rb
215
+ - test/fixtures/ignorable_dependent.rb
216
+ - test/fixtures/ignore_dependents_archival.rb
184
217
  - test/fixtures/independent_archival.rb
185
218
  - test/fixtures/missing_archive_number.rb
186
219
  - test/fixtures/missing_archived_at.rb
220
+ - test/fixtures/nonignorable_dependent.rb
187
221
  - test/fixtures/plain.rb
188
222
  - test/fixtures/poly.rb
189
223
  - test/fixtures/readonly_when_archived.rb
@@ -197,9 +231,11 @@ files:
197
231
  - test/through_association_test.rb
198
232
  - test/transaction_test.rb
199
233
  homepage: https://gitlab.com/joelmeador/archival_record/
200
- licenses: []
201
- metadata: {}
202
- post_install_message:
234
+ licenses:
235
+ - MIT
236
+ metadata:
237
+ rubygems_mfa_required: 'true'
238
+ post_install_message:
203
239
  rdoc_options: []
204
240
  require_paths:
205
241
  - lib
@@ -207,49 +243,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
207
243
  requirements:
208
244
  - - ">="
209
245
  - !ruby/object:Gem::Version
210
- version: '2.4'
246
+ version: '3.0'
211
247
  required_rubygems_version: !ruby/object:Gem::Requirement
212
248
  requirements:
213
249
  - - ">="
214
250
  - !ruby/object:Gem::Version
215
251
  version: '0'
216
252
  requirements: []
217
- rubygems_version: 3.1.2
218
- signing_key:
253
+ rubygems_version: 3.4.22
254
+ signing_key:
219
255
  specification_version: 4
220
256
  summary: Atomic archiving/unarchiving for ActiveRecord
221
- test_files:
222
- - test/ambiguous_table_test.rb
223
- - test/application_record_test.rb
224
- - test/associations_test.rb
225
- - test/basic_test.rb
226
- - test/callbacks_test.rb
227
- - test/column_test.rb
228
- - test/deep_nesting_test.rb
229
- - test/deprecated_warning_archival_test.rb
230
- - test/fixtures/another_polys_holder.rb
231
- - test/fixtures/application_record.rb
232
- - test/fixtures/application_record_row.rb
233
- - test/fixtures/archival.rb
234
- - test/fixtures/archival_grandkid.rb
235
- - test/fixtures/archival_kid.rb
236
- - test/fixtures/archival_table_name.rb
237
- - test/fixtures/callback_archival_4.rb
238
- - test/fixtures/callback_archival_5.rb
239
- - test/fixtures/deprecated_warning_archival.rb
240
- - test/fixtures/exploder.rb
241
- - test/fixtures/independent_archival.rb
242
- - test/fixtures/missing_archive_number.rb
243
- - test/fixtures/missing_archived_at.rb
244
- - test/fixtures/plain.rb
245
- - test/fixtures/poly.rb
246
- - test/fixtures/readonly_when_archived.rb
247
- - test/polymorphic_test.rb
248
- - test/readonly_when_archived_test.rb
249
- - test/relations_test.rb
250
- - test/responds_test.rb
251
- - test/schema.rb
252
- - test/scope_test.rb
253
- - test/test_helper.rb
254
- - test/through_association_test.rb
255
- - test/transaction_test.rb
257
+ test_files: []
data/.travis.yml DELETED
@@ -1,23 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
-
4
- rvm:
5
- - 2.4
6
- - 2.5
7
- - 2.6
8
- - 2.7
9
-
10
- gemfile:
11
- - gemfiles/rails_5.0.gemfile
12
- - gemfiles/rails_5.1.gemfile
13
- - gemfiles/rails_5.2.gemfile
14
- - gemfiles/rails_6.0.gemfile
15
-
16
- before_install:
17
- - gem update --system
18
-
19
- matrix:
20
- fast_finish: true
21
- exclude:
22
- - gemfile: gemfiles/rails_6.0.gemfile
23
- rvm: 2.4
@@ -1,19 +0,0 @@
1
- class CallbackArchival4 < ActiveRecord::Base
2
-
3
- archival_record
4
-
5
- attr_accessor :set_this_value,
6
- :pass_callback
7
-
8
- before_archive :set_value,
9
- :conditional_callback_passer
10
-
11
- private def set_value
12
- self.settable_field = set_this_value
13
- end
14
-
15
- private def conditional_callback_passer
16
- pass_callback || pass_callback.nil?
17
- end
18
-
19
- end