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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ec20448b7611d9a88bad99dd6054acb756b53b4a1245566140c1c69d9fddf83
4
- data.tar.gz: 2f1f2ba401def86c3c0b417002c02f7242b44150d4f98ee329b0d0cc816d0030
3
+ metadata.gz: b451948a4cd57b5387dcd5cd4869b07d0fca6b6107cc9a9ee3ca8cfdd63af8cd
4
+ data.tar.gz: d40876f744ec7d356173ec010f197e3252986bfc80679fbe9212ab847b15fe73
5
5
  SHA512:
6
- metadata.gz: 9da8220c3444cd8f71daafa64172bffcd17efb0f7b60b98ced8f4e8a5193ad7defbcbb8e13be1c914fc01c756c4f147316fe42af833e9edd85eb80032ff86144
7
- data.tar.gz: 1e70f7eb188f60600ff770b5b0034e43de5575b471b88194b6c736d3eeabe13319c1281e65c6512ab12958e0c31079f4961fe0d1b976666ceccc12a1bbdbfd3b
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
- attribute_will_change!(old_attr) if old_attr != value && !defined?(super)
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
@@ -1,3 +1,3 @@
1
1
  module PropertySets
2
- VERSION = "3.5.5"
2
+ VERSION = "3.5.6"
3
3
  end
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.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-07-18 00:00:00.000000000 Z
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
- rubyforge_project:
165
- rubygems_version: 2.7.6.2
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: []