json_schema_spec 0.0.8 → 0.0.9

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: c8fdc6d05168b5673a8df3323e5ec20013706055
4
- data.tar.gz: a209d077423e0994ede08e330a51e12b446e9caf
3
+ metadata.gz: fa6cb1f2bc26111b92f3ad0f69607355098ce2b1
4
+ data.tar.gz: 7ab3aa8ad52d3b24688e9bec601084054bc0dc2d
5
5
  SHA512:
6
- metadata.gz: f309a56c8f687ad0daf4d233336a06ab723d509d193e82b61ad9f71c556171a25683e5c12d14ff23a980f741fc6988264fa70cda5f330eac2b6662360959b2b7
7
- data.tar.gz: 760a7d2ae493dfa427e7ff86a4a3d85dd9826f21345016da97bc042933008dc5d5622dc47d65336a070e93845ae48c7e39694bae95994967a5243f2da6c6e4ef
6
+ metadata.gz: 839992a15fb2060fc7e21833baf9fb0b7cb0bd73cd571c70371bba5d25af025761ff96719cc335a13fea0c0164d620e1410f6cdac33b6967531a589acb77ac10
7
+ data.tar.gz: c4755baa8fa4778ef7e9ac11b7240d9c2663f1cf6aa9f3c6bd914fa70f4e4c94f71268452e10b9fd100cf376f7e5d819946cb0ba0bfcc942337be29dd7d439f9
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "json_schema_spec"
7
- spec.version = "0.0.8"
7
+ spec.version = "0.0.9"
8
8
  spec.authors = ["Winton Welsh"]
9
9
  spec.email = ["mail@wintoni.us"]
10
10
  spec.description = %q{Generate fixtures from JSON schemas.}
@@ -13,7 +13,11 @@ module JsonSchemaSpec
13
13
  def deep_merge(value, other_value)
14
14
  if value.is_a?(Hash) && other_value.is_a?(Hash)
15
15
  other_value.each_pair do |k, v|
16
- value[k] = deep_merge(value[k], v)
16
+ if v == :_DEL
17
+ value.delete(k)
18
+ else
19
+ value[k] = deep_merge(value[k], v)
20
+ end
17
21
  end
18
22
 
19
23
  elsif value.is_a?(Array) && other_value.is_a?(Array)
@@ -5,8 +5,8 @@ describe JsonSchemaSpec::Util do
5
5
 
6
6
  let(:input) do
7
7
  [
8
- { :a => [ { :b => 1, :d => 3 } ], :a2 => true },
9
- { :a => [ { :c => 2, :e => 4 } ] }
8
+ { :a => [ { :b => 1, :d => 3, :f => 5 } ], :a2 => true },
9
+ { :a => [ { :c => 2, :e => 4, :f => :_DEL } ] }
10
10
  ]
11
11
  end
12
12
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_schema_spec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Winton Welsh