nakischema 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: 4d78fcac47a9551f79d2a35208246902c1330e71
4
- data.tar.gz: 9e4f2ac556c22c26669343e44e489808804c56b9
3
+ metadata.gz: e2f43f84837afad700ae5e280e871caab6c8ef85
4
+ data.tar.gz: 83e3763773cf849ffa066bc2ad333b5c65e4ff5e
5
5
  SHA512:
6
- metadata.gz: 1b2e80736ba9165d63dba0d13deb6d7286ab0af153c243a82d5826aa9a3cba996d24011e0f573f5b0b6d131ce89300d09bc693afecb34f987beadc273d51cd4f
7
- data.tar.gz: 0e4204ab10c47f1bdae7856be58acef6a75cf177fc73855e04154cb4aa03c635054b0b3445133082d8ca6503d3dd69484b80ede8aff6f58a7132fdfe2cbb45ae
6
+ metadata.gz: 28750ccd6f46dcf3dd4d8e2a8edd98eb5477d48d198e4f93d36fff73d063e8e7d5453eaf12042ee5a939382804036bae2d156f8436d881a48a89c1d2bd20dfe9
7
+ data.tar.gz: 3d8a8e2da496705ae17582add987165aa98161ebbe233013c45739415e804ad6b87c3b26ba48332255d4f319f77825ae31064e9a27c106a0aa9c2d11a4cea14f
data/lib/nakischema.rb CHANGED
@@ -99,7 +99,7 @@ module Nakischema
99
99
  selected = children.select{ |_| _.name == k }
100
100
  validate_oga_xml selected, v, [*path, k]
101
101
  end
102
- when :req ; v.each{ |k, v| validate_oga_xml object.xpath(k.start_with?("./") ? k : "./#{k}"), v, [*path, k] }
102
+ when :children ; v.each{ |k, v| validate_oga_xml object.xpath(k.start_with?("./") ? k : "./#{k}"), v, [*path, k] }
103
103
  when :attr_req ; v.each{ |k, v| raise_with_path.call "expected #{v} != #{object[k]}", [*path, k] unless v === object[k] }
104
104
  when :assertions
105
105
  v.each_with_index do |assertion, i|
data/nakischema.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "nakischema"
3
- spec.version = "0.1.1"
3
+ spec.version = "0.1.2"
4
4
  spec.summary = "compact yet powerful arbitrary nested objects validator"
5
5
  spec.description = "The most compact yet powerful arbitrary nested objects validator. Especially handy to validate JSONs."
6
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nakischema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Maslov aka Nakilon