lacerda 0.12.4 → 0.12.5

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: 588430006c27bd1ea88993283adbc0eb49be000b
4
- data.tar.gz: cc255e3eecb951c9037b35b10aea65cd7b7560b2
3
+ metadata.gz: eb103cbaef02d7242cb5e6fca4394709496aa9b4
4
+ data.tar.gz: 133a8e88e4f034ddf4b1026355e240010a3f687c
5
5
  SHA512:
6
- metadata.gz: bd0795617cd98d03414c77d6c5ad3b17293003fc953ccd87dd036c6617b04b3b44c92334747140cc8ccef7e5ec731fecff98ebf0cd6fe19548560647efa84a90
7
- data.tar.gz: 5c7ca3268b8abcf1643df2cc04deff7903b44d63c14e79a6265f45f5fb881e9350e05d56534554ff508149e2722e578bf061984050a3ddd5e875a30bfd0cf024
6
+ metadata.gz: 3fa4c39961f7ffc8f39011661fbd2096e994c01e9a072e0a45c56bade9341fa90d725bd60adc41a78b986672eb0cab157fd6339b4d62f7469b590c1ed22b5ef3
7
+ data.tar.gz: 31b516bbad9d48abf2e61decb50f719a1faf46da940431369ba297f50adcc345be21e0dfdadab5823593f8c157e837a29f7e07412367c8649cc60cc903fd65f0
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.12.5
2
+ - fix https://github.com/moviepilot/zeta/issues/18 (infinite loops
3
+ for some cases where json pointers are used)
4
+
1
5
  # 0.12.4
2
6
  - fix https://github.com/moviepilot/lacerda/issues/17
3
7
 
@@ -50,12 +50,17 @@ module Lacerda
50
50
 
51
51
  def object(name)
52
52
  underscored_name = Lacerda.underscore(name)
53
- object_schema = Lacerda.deep_copy(@schema[:definitions][underscored_name])
53
+ schema_dup = Lacerda.deep_copy(@schema)
54
+
55
+ # It's critical to delete this object from the definitions
56
+ # or else the json validator gem will go into an endless loop
57
+ object_schema =schema_dup['definitions'].delete underscored_name.to_s
58
+
54
59
  raise Lacerda::Service::InvalidObjectTypeError.new("Invalid object type: #{underscored_name.to_s.to_json}") unless object_schema
55
60
 
56
61
  # Copy the definitions of our schema into the schema for the
57
62
  # object in case its properties include json pointers
58
- object_schema[:definitions] = Lacerda.deep_copy(@schema[:definitions])
63
+ object_schema['definitions'] = schema_dup['definitions']
59
64
 
60
65
  Lacerda::ConsumedObject.new(service, name, object_schema)
61
66
  end
@@ -27,12 +27,16 @@ module Lacerda
27
27
 
28
28
  def object(name)
29
29
  scoped_name = scopify_name(name)
30
- object_schema = @schema[:definitions][scoped_name]
30
+ schema_dup = Lacerda.deep_copy(@schema)
31
+
32
+ # It's critical to delete this object from the definitions
33
+ # or else the json validator gem will go into an endless loop
34
+ object_schema = schema_dup['definitions'].delete scoped_name.to_s
31
35
  raise Lacerda::Service::InvalidObjectTypeError.new(scoped_name) unless object_schema
32
36
 
33
37
  # Copy the definitions of our schema into the schema for the
34
38
  # object in case its properties include json pointers
35
- object_schema[:definitions] = Lacerda.deep_copy(@schema[:definitions])
39
+ object_schema['definitions'] = schema_dup['definitions']
36
40
 
37
41
  Lacerda::PublishedObject.new(service, scoped_name, object_schema)
38
42
  end
@@ -1,3 +1,3 @@
1
1
  module Lacerda
2
- VERSION = '0.12.4'
2
+ VERSION = '0.12.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lacerda
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.4
4
+ version: 0.12.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jannis Hermanns
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-08 00:00:00.000000000 Z
11
+ date: 2015-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport