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 +4 -4
- data/active_archive.gemspec +1 -1
- data/lib/active_archive/base.rb +11 -0
- data/lib/active_archive/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5c3258e987f6798e5a2ab49dccb556ca2095baf2f328ac7cf5444ea4413a9b8
|
4
|
+
data.tar.gz: f93139e3ae7c6ac944d0d9a61470963389109d1b2790024171059491542454e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2449abc9b4b29e57a1c23019535d520c667c3d11e7771a1034b99765194e369f035a88262ab441405e08a5117b59e21b124789ec981f660ed4d76126e4dc1359
|
7
|
+
data.tar.gz: 80b9b7b2499f8a61a12499799f82d37ef973c01aae3d8d4e049d44deb2e9ad76857de05aa56305fa2d51718d2c84fb2b95b363ad27d85409491ba076a833cc1e
|
data/active_archive.gemspec
CHANGED
@@ -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'
|
data/lib/active_archive/base.rb
CHANGED
@@ -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
|
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.
|
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-
|
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:
|
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:
|
26
|
+
version: 5.1.6
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|