smart_properties 1.16.0 → 1.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 76b840210991bfec855a2e1159426635bc29e3994269bf305b5f0a8fe40fb0cf
4
- data.tar.gz: f10d37b213920338b36b8a2da7bbecc1e8e0caf1d6eecf66084b6cbb4914a95e
3
+ metadata.gz: 044a13ef450738b8342644983451e7659ba6e33116801be84206fa9197e42c94
4
+ data.tar.gz: 709f79b9de54975dc92c8b47bb68db67b81c14f20f60d21358098060b34629db
5
5
  SHA512:
6
- metadata.gz: 30f8ed85cd3db3e2c17ddc30b63f85cba5541d26d8c8747a92529320531c11a58ae20435f08175061faedc7edf8f3bad2899ff32f2aa36465d4de2a78c8ca75e
7
- data.tar.gz: fb602a52c408989d44c9ef0dd232f5891c6bc96f64444d077d498bb06ed1f63dfa671712abfe9ab0680214fb442ee4b029b6e0e518df01a35860e5fc6c072151
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
- parents.reduce(collection = new) do |previous, current|
15
- current.properties.register(previous)
16
- current.properties
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 = parent_collection.merge(collection)
79
+ @collection_with_parent_collection.merge!(parent_collection)
79
80
  notify_children
80
81
  nil
81
82
  end
@@ -1,3 +1,3 @@
1
1
  module SmartProperties
2
- VERSION = "1.16.0"
2
+ VERSION = "1.16.1"
3
3
  end
@@ -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.0
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-08-18 00:00:00.000000000 Z
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.3
116
+ rubygems_version: 3.2.20
117
117
  signing_key:
118
118
  specification_version: 4
119
119
  summary: SmartProperties – Ruby accessors on steroids