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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d5c3258e987f6798e5a2ab49dccb556ca2095baf2f328ac7cf5444ea4413a9b8
4
- data.tar.gz: f93139e3ae7c6ac944d0d9a61470963389109d1b2790024171059491542454e8
3
+ metadata.gz: 282c657f059578c3f1771526ee61558e0d3b000740e7efd93d948330b34f89ab
4
+ data.tar.gz: c08408178d8f7738f1157154800bbdd967b6a1d1613dd9571efaf94bac1bde0d
5
5
  SHA512:
6
- metadata.gz: 2449abc9b4b29e57a1c23019535d520c667c3d11e7771a1034b99765194e369f035a88262ab441405e08a5117b59e21b124789ec981f660ed4d76126e4dc1359
7
- data.tar.gz: 80b9b7b2499f8a61a12499799f82d37ef973c01aae3d8d4e049d44deb2e9ad76857de05aa56305fa2d51718d2c84fb2b95b363ad27d85409491ba076a833cc1e
6
+ metadata.gz: 35268ef2457411db9f30c38923e330e53eed19185b2d87a5c2795492edcf37a27c0fb42341cdc6df31b741eb18779c3466018ec0507ee29fd91649cddc5bef36
7
+ data.tar.gz: 1d2359812759d3e3cf2ec97d94108f9c478560ff6a01919c35cfb35a45f72f4b0a09b10b5f2ed834463b77fd511853cbdd6cf0b887e35505fb97421d0c23cd9b
@@ -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', '<= 5.1.6'
22
+ spec.add_runtime_dependency 'rails'
23
23
 
24
24
  spec.add_development_dependency 'bundler'
25
25
  spec.add_development_dependency 'database_cleaner'
@@ -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
- # TODO
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
- @previous_mutation_tracker = record.send(:previous_mutation_tracker)
94
- @mutation_tracker = nil
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveArchive
4
- VERSION ||= '5.2.1'
4
+ VERSION ||= '5.2.2'
5
5
  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.1
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: 5.1.6
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: 5.1.6
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement