smart_properties 1.16.0 → 1.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/smart_properties/property_collection.rb +5 -4
- data/lib/smart_properties/version.rb +1 -1
- data/spec/inheritance_spec.rb +10 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 044a13ef450738b8342644983451e7659ba6e33116801be84206fa9197e42c94
|
4
|
+
data.tar.gz: 709f79b9de54975dc92c8b47bb68db67b81c14f20f60d21358098060b34629db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a9d6e5383e26cc9143553fe54c5f030be3d40d1927b4613f0f87c751fb3fdf3741afb0aeaaf22336a229070f3e05a1bbe25751736b50e7f8cf3d4d1c8b74909
|
7
|
+
data.tar.gz: bf90c5eec8fa7059a044f14b810583492d3775f254c3a59c0cf1985b0a2343fa2830777a0c6e28b91b2e7eed5ca528189862f6effa8724d094775168cf17d0a8
|
@@ -11,9 +11,10 @@ module SmartProperties
|
|
11
11
|
ancestor != SmartProperties
|
12
12
|
end
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
collection = new
|
15
|
+
|
16
|
+
parents.each do |parent|
|
17
|
+
parent.properties.register(collection)
|
17
18
|
end
|
18
19
|
|
19
20
|
collection
|
@@ -75,7 +76,7 @@ module SmartProperties
|
|
75
76
|
end
|
76
77
|
|
77
78
|
def refresh(parent_collection)
|
78
|
-
@collection_with_parent_collection
|
79
|
+
@collection_with_parent_collection.merge!(parent_collection)
|
79
80
|
notify_children
|
80
81
|
nil
|
81
82
|
end
|
data/spec/inheritance_spec.rb
CHANGED
@@ -254,5 +254,15 @@ RSpec.describe SmartProperties, 'intheritance' do
|
|
254
254
|
expect(instance.m).to eq(1)
|
255
255
|
expect(instance.n).to eq(2)
|
256
256
|
expect(instance.p).to eq(3)
|
257
|
+
|
258
|
+
expect { klass.new(m: 4, n: 5, p: 6) }.to_not raise_error
|
259
|
+
|
260
|
+
klass2 = Class.new do
|
261
|
+
include n
|
262
|
+
include m
|
263
|
+
end
|
264
|
+
|
265
|
+
expect { klass.new(m: 4, n: 5, p: 6) }.to_not raise_error
|
266
|
+
expect { klass2.new(m: 4, n: 5, p: 6) }.to_not raise_error
|
257
267
|
end
|
258
268
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smart_properties
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.16.
|
4
|
+
version: 1.16.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Tennhard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
113
|
- !ruby/object:Gem::Version
|
114
114
|
version: '0'
|
115
115
|
requirements: []
|
116
|
-
rubygems_version: 3.2.
|
116
|
+
rubygems_version: 3.2.20
|
117
117
|
signing_key:
|
118
118
|
specification_version: 4
|
119
119
|
summary: SmartProperties – Ruby accessors on steroids
|