changes_are_logged 1.0.0 → 1.1.0

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
  SHA1:
3
- metadata.gz: 0db78111e08142c80966e125fefc9b785bf750b3
4
- data.tar.gz: 5ce3fa303c8e88475b20f42643fdaf7b6761fc6e
3
+ metadata.gz: 4d90d72f1008b87901b0fba752fada04b4aeedb3
4
+ data.tar.gz: 75b748b04d97a23f087d561b2906f547f7e56104
5
5
  SHA512:
6
- metadata.gz: 2dffbcd9dd09a96c0808d43616726758749a6c2c6a38b70ebeff2ec69a9259fd804e68b7e1870d509b547b7381afdc73463988f90eee52c5dffac8878ab3bfd3
7
- data.tar.gz: ad110b572a752c1163e0f1cb7a058391a9efe612325307708b40433053eddcfce6d2f5e7e207ade2881842396a7abacb2b29ef09f8e4cb83902038e9d8aac900
6
+ metadata.gz: 7ce9d121191517b0175fd3622c8abda82dd6e135778a9f59c091f932ffc750e29ac10892cd49af456beb8a69f5f4e609e72481c4c9681ead8ea61a7efec8d191
7
+ data.tar.gz: cebba36a943ec5ba20c5c2584fe9743c798ea654f14a5aa4c9ec9196cc29ddbe058b0551988c40d3910407c1ebb9ea291af67f7506faaef8c0e7c2dd79d7648d
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.3.3
1
+ 2.4.1
data/CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
1
+ # 1.1.0
2
+ * Don't monkey patch 'attribute_change' method from ActiveModel::Dirty
3
+
1
4
  # 1.0.0
2
5
  * Interface changed: call `automatically_log_changes` in your model instead of setting up an `after_initialize` callback.
3
- * `automatically_log_changes` now supports list of columns to exclude.
6
+ * `automatically_log_changes` accepts a block to alter the values of logged attributes.
4
7
 
5
8
  # 0.0.2
6
9
  * Birthday
@@ -1,3 +1,3 @@
1
1
  module ChangesAreLogged
2
- VERSION = '1.0.0'
2
+ VERSION = '1.1.0'
3
3
  end
@@ -48,12 +48,6 @@ module ChangesAreLogged
48
48
  )
49
49
  @change_comments = nil
50
50
  end
51
-
52
- # this modifies dirty.rb behavior. previously #changes returned the change in the accessor method
53
- # now, #changes will return raw changes made to actual database attributes
54
- def attribute_change(attr)
55
- [changed_attributes[attr], __send__(:read_attribute, attr)] if attribute_changed?(attr)
56
- end
57
51
  end
58
52
 
59
53
  module ClassMethods
@@ -73,7 +67,7 @@ module ChangesAreLogged
73
67
  attr_accessor :change_comments
74
68
  attr_accessor :log_changes
75
69
  attr_reader :log_changes_callback
76
- before_save :log_it
70
+ after_save :log_it
77
71
  has_many :change_logs, :as => :target
78
72
  end
79
73
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: changes_are_logged
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lawrence Wang
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-12-20 00:00:00.000000000 Z
12
+ date: 2017-07-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  version: '0'
93
93
  requirements: []
94
94
  rubyforge_project:
95
- rubygems_version: 2.5.2
95
+ rubygems_version: 2.6.11
96
96
  signing_key:
97
97
  specification_version: 4
98
98
  summary: Tracks changes to your activerecord models