minimum-term 0.2.2 → 0.2.3

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: d00cfb058534de45750322a23caa34a4ec250e22
4
- data.tar.gz: 9b5a47d2c08c605c2fe7b984a3c206d8d4d472a3
3
+ metadata.gz: bd99082e8bf637a89f103afa0d127ea4041bbccd
4
+ data.tar.gz: 7b64bef3c97149111aedbbf8a7f8fdb148c490e4
5
5
  SHA512:
6
- metadata.gz: 73454fb46034bf3b3a3797775e49bc2df28179feb2d1a9fcccf9e2581661b58ff0ba20ae7a5ab2beb60048ef3e903cfea35e4dff8e76ee9f2baffdbf0a78e931
7
- data.tar.gz: f66f5ae1e7be3fc040f675b02366323466de77ea123342faa172a8706a64507d1c48686f54003282579ef46808f8871760c1335aece51132a2215e9cb144d19c
6
+ metadata.gz: bf9603e5b45344d5f69c635ce0dcf00036965a8c753d7e8a72b6c665ba1d6629726a99aac983e7e9f5543ac4c61c9b41dc90e1f8e1fc044f8dc354ce7005ba7b
7
+ data.tar.gz: ba5b5ca716bfbd8013afb287723de872fb39c743f7f1a446ac11d7582e2879a9dbfba66ea0fe751a9e70a477cbeb82df5a85e44c35f0f7134e27a5cfdcca3ffe
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,5 @@
1
- 0.2.2
2
- =====
1
+ # 0.2.3 (22-Oct-15)
2
+ - ignore consumed objects from other publishers when validating
3
+
4
+ # 0.2.2
3
5
  - allow missing property type in MSON and default to 'object'
@@ -5,5 +5,13 @@ module MinimumTerm
5
5
  def object_description_class
6
6
  MinimumTerm::ConsumedObject
7
7
  end
8
+
9
+ def scoped_schema(service)
10
+ filtered_schema = schema.clone
11
+ schema['definitions'].select! do |k|
12
+ k.underscore.start_with?(service.name.underscore+MinimumTerm::SCOPE_SEPARATOR)
13
+ end
14
+ filtered_schema
15
+ end
8
16
  end
9
17
  end
@@ -10,7 +10,7 @@ module MinimumTerm
10
10
 
11
11
  def satisfies?(consumer)
12
12
  @comparator = Compare::JsonSchema.new(@schema)
13
- @comparator.contains?(consumer.consume.schema)
13
+ @comparator.contains?(consumer.consume.scoped_schema(service))
14
14
  end
15
15
 
16
16
  private
@@ -1,3 +1,3 @@
1
1
  module MinimumTerm
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minimum-term
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jannis Hermanns