property_sets 3.5.5 → 3.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/property_sets/delegator.rb +8 -2
- data/lib/property_sets/version.rb +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b451948a4cd57b5387dcd5cd4869b07d0fca6b6107cc9a9ee3ca8cfdd63af8cd
|
4
|
+
data.tar.gz: d40876f744ec7d356173ec010f197e3252986bfc80679fbe9212ab847b15fe73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc88f6195a44c5da452f19652cfa0ca5c2e59c315ebc95933182c286d03553779f0f8a8bd3fbe5d11ce7a27d0dc3702619dc2c5662556b874604cccb7635c202
|
7
|
+
data.tar.gz: db1a33e34e8ba06d0a0db052b0fb08fafd6d644acfbbb13fcada92471f7a2cae90801855cc815608b99471dbf65e68ece98c0bc4fca20ff18b2f0dac1195c184
|
@@ -40,9 +40,15 @@ module PropertySets
|
|
40
40
|
alias_method "#{old_attr}_before_type_cast", old_attr
|
41
41
|
define_method("#{old_attr}?") { send(setname).send("#{new_attr}?") }
|
42
42
|
define_method("#{old_attr}=") do |value|
|
43
|
-
|
43
|
+
if send(old_attr) != value
|
44
|
+
send("#{old_attr}_will_change!")
|
45
|
+
end
|
44
46
|
send(setname).send("#{new_attr}=", value)
|
45
|
-
super(value) if defined?(super)
|
47
|
+
super(value) if defined?(super) # Rails 4 does not define this
|
48
|
+
end
|
49
|
+
|
50
|
+
define_method("#{old_attr}_will_change!") do
|
51
|
+
attribute_will_change!(old_attr)
|
46
52
|
end
|
47
53
|
|
48
54
|
define_method("#{old_attr}_changed?") do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: property_sets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Morten Primdahl
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -146,7 +146,7 @@ homepage: http://github.com/zendesk/property_sets
|
|
146
146
|
licenses:
|
147
147
|
- MIT
|
148
148
|
metadata: {}
|
149
|
-
post_install_message:
|
149
|
+
post_install_message:
|
150
150
|
rdoc_options: []
|
151
151
|
require_paths:
|
152
152
|
- lib
|
@@ -161,9 +161,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
161
|
- !ruby/object:Gem::Version
|
162
162
|
version: '0'
|
163
163
|
requirements: []
|
164
|
-
|
165
|
-
|
166
|
-
signing_key:
|
164
|
+
rubygems_version: 3.0.3
|
165
|
+
signing_key:
|
167
166
|
specification_version: 4
|
168
167
|
summary: Property sets for ActiveRecord.
|
169
168
|
test_files: []
|