active_archive 5.2.0 → 5.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ad44438d97ef3a4c739a8aabb9f9d61429743b9b2835007fdeed270fcf348b6
4
- data.tar.gz: bb7a6181c2c98a989f5bcbc5465686bde9d0126a5f615c315516d8b005b6046f
3
+ metadata.gz: d5c3258e987f6798e5a2ab49dccb556ca2095baf2f328ac7cf5444ea4413a9b8
4
+ data.tar.gz: f93139e3ae7c6ac944d0d9a61470963389109d1b2790024171059491542454e8
5
5
  SHA512:
6
- metadata.gz: 893d7bdf1ba645e69c335e99a8b6127b36401d6013bca9ca7f35ea0124177de2dccc78378cd1eb4c57848cd91926ea659dd3db56430906d686a4b41fed50fad9
7
- data.tar.gz: dab93ef545dcbc4f86f71442d7b2f91ddf05f533adf3c01ee993574382e782c51a44e27faab88b536627006f39c399d2c15dfce72fdd3bf96f5e2c363d9df4af
6
+ metadata.gz: 2449abc9b4b29e57a1c23019535d520c667c3d11e7771a1034b99765194e369f035a88262ab441405e08a5117b59e21b124789ec981f660ed4d76126e4dc1359
7
+ data.tar.gz: 80b9b7b2499f8a61a12499799f82d37ef973c01aae3d8d4e049d44deb2e9ad76857de05aa56305fa2d51718d2c84fb2b95b363ad27d85409491ba076a833cc1e
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = %w[lib]
21
21
 
22
- spec.add_runtime_dependency 'rails'
22
+ spec.add_runtime_dependency 'rails', '<= 5.1.6'
23
23
 
24
24
  spec.add_development_dependency 'bundler'
25
25
  spec.add_development_dependency 'database_cleaner'
@@ -85,6 +85,17 @@ module ActiveArchive
85
85
 
86
86
  begin
87
87
  should_ignore_validations?(force) ? record.save(validate: false) : record.save!
88
+
89
+ if ::ActiveRecord::VERSION::MAJOR >= 5 && ::ActiveRecord::VERSION::MINOR >= 2
90
+ # TODO
91
+ elsif ::ActiveRecord::VERSION::MAJOR >= 5
92
+ @changed_attributes = record.send(:saved_changes)
93
+ @previous_mutation_tracker = record.send(:previous_mutation_tracker)
94
+ @mutation_tracker = nil
95
+ elsif ::ActiveRecord::VERSION::MAJOR >= 4
96
+ @previously_changed = record.instance_variable_get('@previously_changed')
97
+ end
98
+
88
99
  @attributes = record.instance_variable_get('@attributes')
89
100
  rescue => error
90
101
  record.destroy
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveArchive
4
- VERSION ||= '5.2.0'
4
+ VERSION ||= '5.2.1'
5
5
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_archive
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.0
4
+ version: 5.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-07 00:00:00.000000000 Z
11
+ date: 2018-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "<="
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 5.1.6
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "<="
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 5.1.6
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement