spaceborne 0.1.39 → 0.1.40

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: 47de2c6cb6679f19995cba98157fcf914e181ca5cfc1a7c2be9f011fd593851f
4
- data.tar.gz: 1d598c51e65a741cfa8431c6d603aecca8efe4e6077f4a08f39461a8f1bd980b
3
+ metadata.gz: c11204f7139c5e5507dfae5c022cfbacaa4f09d9311b85c3e32824497b5e0828
4
+ data.tar.gz: 785da01072d57bb89c32fc9c021c42a0b188c1f2a188843b5c86e011a1bbac69
5
5
  SHA512:
6
- metadata.gz: 2d08b29b7f93b28aa1f0c1a54b9576483ac0e35d30c42c5c8f9ac62fe157ebea7832175e46df61997398b2f7c3f5f2cbc097b79dcee40b39a84d92e09c3e8167
7
- data.tar.gz: ef1903aa05502a28b612046382a2b06612a6231a2582b6e9555c3f138d54b10fbee6cc2fbc5c0c1f16413f733f34d015c53f837ec1531d677de067d9b80c6e27
6
+ metadata.gz: '090ba089dd166f14cd0dc259fc9887982493e4e433beafd12bb0e645e6fa2deaaade5d183868463e5325ab926508dd799e42bed866cc337004a0f196f2a8b87e'
7
+ data.tar.gz: a537d9b3bc27c998931ed409481f39cea26c2efcda803d5556848dc8f8fcca8559628ef03223b02db214cc17970794c3f6f6c0469187af91933f4ccdffc7f7a1
@@ -1,3 +1,3 @@
1
1
  module Spaceborne
2
- VERSION = '0.1.39'.freeze
2
+ VERSION = '0.1.40'.freeze
3
3
  end
data/lib/spaceborne.rb CHANGED
@@ -246,7 +246,7 @@ module Airborne
246
246
  end
247
247
 
248
248
  def handle_type(type, path, json, &block)
249
- case type
249
+ case type.to_s
250
250
  when '*'
251
251
  handle_container(json, &block)
252
252
  when '?'
@@ -275,19 +275,16 @@ module Airborne
275
275
  end
276
276
 
277
277
  def shortcut_validation(path, json)
278
- return true if json.nil? && path.is_a?(Airborne::OptionalPathExpectations)
279
-
280
- ensure_array_or_hash(path, json)
281
- false
278
+ json.nil? && path.is_a?(Airborne::OptionalPathExpectations)
282
279
  end
283
280
 
284
281
  def get_by_path(path, json, type: false, &block)
285
282
  iterate_path(path) do |parts, part, index|
286
- if %w[* ?].include?(part.to_s)
287
- return if shortcut_validation(path, json)
283
+ return if shortcut_validation(path, json)
288
284
 
285
+ if %w[* ?].include?(part.to_s)
289
286
  type = part
290
- walk_with_path(type, index, path, parts, json, &block) && return if index < parts.length.pred
287
+ walk_with_path(type.to_s, index, path, parts, json, &block) && return if index < parts.length.pred
291
288
 
292
289
  next
293
290
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spaceborne
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.39
4
+ version: 0.1.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Williams