lacerda 0.10.1 → 0.10.2

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: 550936c551bd765ba5b199bfe6beb3fa2966e0eb
4
- data.tar.gz: a7372456d4e8e4dc037818021d418e1932f56ec9
3
+ metadata.gz: df7a0e578ebe770967b35f9a0e2bb6279a12f721
4
+ data.tar.gz: fc7b2c819b292131386d96ee82ef074f564c9a7e
5
5
  SHA512:
6
- metadata.gz: 0c30762c452624929eaa7b949933cdcce4cd125c053d3dac7ae63a6c3f1c1113969c74e04f9f6763454cb9d1ab3abd1e87a504ca87d7ac29b3843be08d91037e
7
- data.tar.gz: 5e925bebc841005fa09f4cf86626aa6a5a3c2bdaa6e41257f2a9c30d2446bbec728fc27f4b7e156171f50aab795f4037e401149c72edc17d528b7efea0531c7a
6
+ metadata.gz: 304c14f4567c78f02454ac992ab2d512a5fa8b7a2bcdfdf6559535462e01fa33c31227ee7f0ada642a2dc2e4a002b617018646f7b08c007316933b642d56c718
7
+ data.tar.gz: 3f226bd986dde94bd80ebdbec1efb8f0848a8dfe08d0bde1a94cb0880c2eea0dbaabc82543bf595f66c3bcf5b88c47e527f0741168c6b7b71cb87b5d811d1e4d
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,6 @@
1
+ # 0.10.2 (04-Nov-15)
2
+ - report all missing definitions instead of just the first (fixes #8)
3
+
1
4
  # 0.10.1 (03-Nov-15)
2
5
  - Use `# Data Structures` with an s
3
6
 
@@ -30,10 +30,13 @@ module Lacerda
30
30
  def definitions_contained?
31
31
  @contained_schema['definitions'].each do |property, contained_property|
32
32
  containing_property = @containing_schema['definitions'][property]
33
- return _e(:ERR_MISSING_DEFINITION, [@initial_location, property]) unless containing_property
34
- return false unless schema_contains?(containing_property, contained_property, [property])
33
+ if !containing_property
34
+ _e(:ERR_MISSING_DEFINITION, [@initial_location, property])
35
+ else
36
+ schema_contains?(containing_property, contained_property, [property])
37
+ end
35
38
  end
36
- true
39
+ @errors.empty?
37
40
  end
38
41
 
39
42
  def _e(error, location, extra = nil)
@@ -46,7 +49,7 @@ module Lacerda
46
49
 
47
50
  # We can only compare types and $refs, so let's make
48
51
  # sure they're there
49
- return _e!(:ERR_MISSING_TYPE_AND_REF) unless
52
+ return _e(:ERR_MISSING_TYPE_AND_REF) unless
50
53
  (consume['type'] or consume['$ref']) and
51
54
  (publish['type'] or publish['$ref'])
52
55
 
@@ -54,7 +54,7 @@ module Lacerda
54
54
  missing_publishers.each do |publisher, consumers|
55
55
  missing << "#{publisher} (consumed by #{consumers.join(', ')})"
56
56
  end
57
- errors["Missing publishers: "] = missing
57
+ errors["Missing publishers"] = missing
58
58
  end
59
59
 
60
60
  reporter.try(:result, @errors)
@@ -1,3 +1,3 @@
1
1
  module Lacerda
2
- VERSION = '0.10.1'
2
+ VERSION = '0.10.2'
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.10.1
4
+ version: 0.10.2
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-11-03 00:00:00.000000000 Z
11
+ date: 2015-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport