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 +4 -4
- data/CHANGELOG.markdown +4 -0
- data/lib/lacerda/consume_specification.rb +7 -2
- data/lib/lacerda/publish_specification.rb +6 -2
- data/lib/lacerda/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb103cbaef02d7242cb5e6fca4394709496aa9b4
|
4
|
+
data.tar.gz: 133a8e88e4f034ddf4b1026355e240010a3f687c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fa4c39961f7ffc8f39011661fbd2096e994c01e9a072e0a45c56bade9341fa90d725bd60adc41a78b986672eb0cab157fd6339b4d62f7469b590c1ed22b5ef3
|
7
|
+
data.tar.gz: 31b516bbad9d48abf2e61decb50f719a1faf46da940431369ba297f50adcc345be21e0dfdadab5823593f8c157e837a29f7e07412367c8649cc60cc903fd65f0
|
data/CHANGELOG.markdown
CHANGED
@@ -50,12 +50,17 @@ module Lacerda
|
|
50
50
|
|
51
51
|
def object(name)
|
52
52
|
underscored_name = Lacerda.underscore(name)
|
53
|
-
|
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[
|
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
|
-
|
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[
|
39
|
+
object_schema['definitions'] = schema_dup['definitions']
|
36
40
|
|
37
41
|
Lacerda::PublishedObject.new(service, scoped_name, object_schema)
|
38
42
|
end
|
data/lib/lacerda/version.rb
CHANGED
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
|
+
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-
|
11
|
+
date: 2015-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|