spaceborne 0.1.42 → 0.1.43

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: 66c180d30b3917866f8729f651f22862158acb805ac7411494afd9bfcd2b8387
4
- data.tar.gz: 435b8c3d85815b31eb853c71f882ae2d5ccba9597f187d21bd39b9821741d62e
3
+ metadata.gz: 19e97691f8756aaeecafb192cd726205e85ba69c98dfc40f1990aaa1b770bf30
4
+ data.tar.gz: 7c3fd96cbd3c684494e7f9a28ab485aac083ddac59ab001d39d5da09ca288bca
5
5
  SHA512:
6
- metadata.gz: 01f34ca4e5cf037f0d5a33e5739f67e542409d9ce9acb6350009e937f435cc199ad136f95ae67e2f156801d453e4f1c99a93098d9b04e7341231f90bd4092ec6
7
- data.tar.gz: bb5bf155fa4f106c410c680948b796506b53e3972f6d932ae8efd51660362a7de95de858a122689da2d7b05da6f09e43839779a4701d96335445461b044602c6
6
+ metadata.gz: bb75f8a4d79c6b4cdc76ba22d3daaa556a7d1482a3c0f8c27291bc4686c8f487e3f77539c987ca8a8fccbf573413e09ee0d318281dea561692aa345949d9df1d
7
+ data.tar.gz: 1bdcde6c073c90d29f8fe735fe9776b7122a20279474ceb0bdbdff87e4c153d26daaa50cf731d0314949a07208c9a1842c255986ae6fc3bc88998ac1af519264
@@ -1,3 +1,3 @@
1
1
  module Spaceborne
2
- VERSION = '0.1.42'.freeze
2
+ VERSION = '0.1.43'.freeze
3
3
  end
data/lib/spaceborne.rb CHANGED
@@ -236,21 +236,21 @@ module Airborne
236
236
 
237
237
  # extension to handle hash value checking
238
238
  module PathMatcher
239
- def handle_container(json, &block)
239
+ def handle_container(path, json, &block)
240
240
  case json.class.name
241
241
  when 'Array'
242
242
  expect_all(json, &block)
243
243
  when 'Hash'
244
244
  json.each { |k, _v| yield json[k] }
245
245
  else
246
- raise ExpectationError, "expected array or hash, got #{json.class.name}"
246
+ raise ExpectationError, "expected array or hash at #{path}, got #{json.class.name}"
247
247
  end
248
248
  end
249
249
 
250
250
  def handle_type(type, path, json, &block)
251
251
  case type.to_s
252
252
  when '*'
253
- handle_container(json, &block)
253
+ handle_container(path, json, &block)
254
254
  when '?'
255
255
  expect_one(path, json, &block)
256
256
  else
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spaceborne
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.42
4
+ version: 0.1.43
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Williams
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-01 00:00:00.000000000 Z
11
+ date: 2021-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport