blumquist 0.4.0 → 0.4.1

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: 3ee6152ea1367e4b7e55b943b64f0e299a29eb8a
4
- data.tar.gz: 3aa49823ff6acee7a49542e0029c88969d9c5ecc
3
+ metadata.gz: a56519a62c8cda5595755e7e4a02c59ceaf06fdb
4
+ data.tar.gz: 35fe0e245587b62219342a67541f86fa7f0cbf5a
5
5
  SHA512:
6
- metadata.gz: 438a17212917a8dd877ad8d0ad3ca0657f2c0a0e929a3c6104578dee237720bdb734603b99b6aeaf4dbd24ae7c7cb04e325a2a0fc5d38e71ba07f2cf2c55984f
7
- data.tar.gz: f0524889add5b31f04db920b48ffc378a264e538211282fa1da0872df4f60eee49751e796b2eefe6a3cd3966c302d79d4222496c34c96b4295df93144044988f
6
+ metadata.gz: 4d34430761c31b38a0800a3cb8c7f38e3d4ad673560f8a6fc5e2fbd195e1f76dc3db14730146e8c60ac25ba93a5387a5d1c8a55b5bae301f8599cb97032bf95e
7
+ data.tar.gz: 3ca561664c837fb74a0f2eea5e5de158dd263a0eaf2c4a17496a141cfaa49c7d00201d213dcdd2dbd3cbc415b78180f73702a126f503609384825b0110ca71f5
@@ -1,3 +1,6 @@
1
+ # 0.4.1
2
+ - Fix broken arrays of objects
3
+
1
4
  # 0.4.0
2
5
  - Support properties with multiple types
3
6
  (e.g. an object, but also null)
@@ -187,6 +187,16 @@ class Blumquist
187
187
  @data[property] = @data[property].map do |item|
188
188
  Blumquist.new(schema: sub_schema, data: item, validate: @validate)
189
189
  end
190
+ elsif type_def[:type] == 'object'
191
+ sub_schema = type_def.merge(
192
+ definitions: @schema[:definitions]
193
+ )
194
+
195
+ @data[property] ||= []
196
+ @data[property] = @data[property].map do |item|
197
+ Blumquist.new(schema: sub_schema, data: item, validate: @validate)
198
+ end
199
+
190
200
  elsif primitive_type?(type_def[:type])
191
201
 
192
202
  # We don't know what to do, so let's panic
@@ -1,3 +1,3 @@
1
1
  class Blumquist
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blumquist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jannis Hermanns