active_archive 5.2.1 → 5.2.2
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 +6 -4
- data/lib/active_archive/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 282c657f059578c3f1771526ee61558e0d3b000740e7efd93d948330b34f89ab
|
4
|
+
data.tar.gz: c08408178d8f7738f1157154800bbdd967b6a1d1613dd9571efaf94bac1bde0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35268ef2457411db9f30c38923e330e53eed19185b2d87a5c2795492edcf37a27c0fb42341cdc6df31b741eb18779c3466018ec0507ee29fd91649cddc5bef36
|
7
|
+
data.tar.gz: 1d2359812759d3e3cf2ec97d94108f9c478560ff6a01919c35cfb35a45f72f4b0a09b10b5f2ed834463b77fd511853cbdd6cf0b887e35505fb97421d0c23cd9b
|
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'
|
23
23
|
|
24
24
|
spec.add_development_dependency 'bundler'
|
25
25
|
spec.add_development_dependency 'database_cleaner'
|
data/lib/active_archive/base.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# require "active_record/attribute_mutation_tracker"
|
4
|
+
|
3
5
|
module ActiveArchive
|
4
6
|
module Base
|
5
7
|
|
@@ -87,11 +89,11 @@ module ActiveArchive
|
|
87
89
|
should_ignore_validations?(force) ? record.save(validate: false) : record.save!
|
88
90
|
|
89
91
|
if ::ActiveRecord::VERSION::MAJOR >= 5 && ::ActiveRecord::VERSION::MINOR >= 2
|
90
|
-
|
91
|
-
elsif ::ActiveRecord::VERSION::MAJOR >= 5
|
92
|
+
@attributes_changed_by_setter = record.send(:saved_changes)
|
93
|
+
elsif ::ActiveRecord::VERSION::MAJOR >= 5 && ::ActiveRecord::VERSION::MINOR >= 1
|
92
94
|
@changed_attributes = record.send(:saved_changes)
|
93
|
-
|
94
|
-
@
|
95
|
+
elsif ::ActiveRecord::VERSION::MAJOR >= 5 && ::ActiveRecord::VERSION::MINOR >= 0
|
96
|
+
@changed_attributes = record.send(:previous_changes)
|
95
97
|
elsif ::ActiveRecord::VERSION::MAJOR >= 4
|
96
98
|
@previously_changed = record.instance_variable_get('@previously_changed')
|
97
99
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Gomez
|
@@ -14,16 +14,16 @@ dependencies:
|
|
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: '0'
|
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: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|