dry-struct 0.1.1 → 0.2.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: 1790fc1589d3f1760722ec40a8ec0286f678f5b7
4
- data.tar.gz: 9f8abf1b69ff3751e798cd17ec8f2bd0c95ab538
3
+ metadata.gz: f92bd54e9b4872d61911a336c6b857d30190fcea
4
+ data.tar.gz: 7a25d4593e6e446fcb8a517b32e2d211cdb537b7
5
5
  SHA512:
6
- metadata.gz: 1498c341a9b852a685551226ad71aea5e2c82dcad82a404f961ecd5acd627bd686c9b300029419450c9d064ab0f9ae34c5cdba4c7ea434d4713a2d32da98df8d
7
- data.tar.gz: c9e356de3e967185a74afebfdbb5674df6d8c05281d7d9362ca22bde8a84c85f2f39ca81bba4a3ee2c9c35eaff30645313a25ba5de3e13eb665f914a8d95c7ca
6
+ metadata.gz: 7fe6a77efa675d9e65f1ee26c2ee3515e06ebae31ca1aa589a10b8c01ca2ffa575d2818bddd0bf44444eea66046a29e2541292806c9cc5b73e7c167a2b453fe7
7
+ data.tar.gz: 4883281f72251b304125b65fece24f269dfcf0103915e6bcaffa3090af45255a16b013bb4d4b56863bae9731fc3db0cdade686401bddb3fc776a13694ad9e6ff
@@ -1,3 +1,11 @@
1
+ # v0.2.0 2016-02-26
2
+
3
+ ## Changed
4
+
5
+ * Struct attributes can be overridden in a subclass (flash-gordon)
6
+
7
+ [Compare v0.1.1...v0.2.0](https://github.com/dry-rb/dry-struct/compare/v0.1.1...v0.2.0)
8
+
1
9
  # v0.1.1 2016-11-13
2
10
 
3
11
  ## Fixed
@@ -51,7 +51,7 @@ module Dry
51
51
  end
52
52
 
53
53
  def check_schema_duplication(new_schema)
54
- shared_keys = new_schema.keys & schema.keys
54
+ shared_keys = new_schema.keys & (schema.keys - superclass.schema.keys)
55
55
 
56
56
  raise RepeatedAttributeError, shared_keys.first if shared_keys.any?
57
57
  end
@@ -67,7 +67,7 @@ module Dry
67
67
 
68
68
  def schema
69
69
  super_schema = superclass.respond_to?(:schema) ? superclass.schema : {}
70
- super_schema.merge(@schema || {})
70
+ super_schema.merge(@schema)
71
71
  end
72
72
 
73
73
  def new(attributes = default_attributes)
@@ -1,5 +1,5 @@
1
1
  module Dry
2
2
  class Struct
3
- VERSION = '0.1.1'.freeze
3
+ VERSION = '0.2.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-struct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Solnica
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-13 00:00:00.000000000 Z
11
+ date: 2017-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-equalizer