lacerda 0.14.4 → 0.14.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b0dba276ebefe21f102870b1921d0f4e3d69c47
4
- data.tar.gz: 1907a3b8c378c8e316f9c6a9d2b840e989ed9d9e
3
+ metadata.gz: 5d13d07da5f62eb1d31defc9ff7a5df151d52b94
4
+ data.tar.gz: c85b1ef422c6b99bcb6fff0367b4f7a4bb84f77b
5
5
  SHA512:
6
- metadata.gz: 435b5e0263c1beee9d4d272c06cfd935e255b8c794620b16d241e847e4dc72049092c5ff99205df04c9a7b51a73263abc3479fffb9de0e69da671ec5f212ea20
7
- data.tar.gz: ac3dbd9bbca84a199c83ce29911ba6f7d1f6c47d52d536450813b8963f3b783ec44daa83e197c764effd5f227ac56faf6be75e22a5ba26fa7fd9589a317037c6
6
+ metadata.gz: d2272ca821f679ff74d6e2048dc1a7aa9f9e30ac804151f431ee0a5fbde8933f295076186cf5d6a8ffd3400fbe1f9fd0e8d0dacf1be45d815d5061ec5796ef8b
7
+ data.tar.gz: cd1c3930cb02b110787c3d2a0bf686cebd38823ba20baf20e0cb5003066e02bd3629cec72f85d61cefd8abe2baab5f25677165c898277598acf9b2b3421a47a7
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,6 @@
1
+ # 0.14.5
2
+ - more verbose description for InvalidObjectTypeErrors
3
+
1
4
  # 0.14.4
2
5
  - don't raise an error when a sub schema is missing a property/definition
3
6
 
@@ -54,9 +54,10 @@ module Lacerda
54
54
 
55
55
  # It's critical to delete this object from the definitions
56
56
  # or else the json validator gem will go into an endless loop
57
- object_schema =schema_dup['definitions'].delete underscored_name.to_s
57
+ object_schema = schema_dup['definitions'].delete underscored_name.to_s
58
58
 
59
- raise Lacerda::Service::InvalidObjectTypeError.new("Unknown object type: #{underscored_name.to_s.to_json} - did you specify it in consume.mson?") unless object_schema
59
+ msg = "Unknown object type: #{underscored_name.to_s.to_json} not in #{schema['definitions'].keys.to_json} - did you specify it in consume.mson?"
60
+ raise Lacerda::Service::InvalidObjectTypeError.new(msg) unless object_schema
60
61
 
61
62
  # Copy the definitions of our schema into the schema for the
62
63
  # object in case its properties include json pointers
@@ -34,7 +34,7 @@ module Lacerda
34
34
  object_schema = schema_dup['definitions'].delete scoped_name.to_s
35
35
 
36
36
  unless object_schema
37
- msg = "Unknown object type: #{scoped_name.to_s.to_json} - did you specify it in publish.mson?"
37
+ msg = "Unknown object type: #{scoped_name.to_s.to_json} not in #{schema['definitions'].keys.to_json} - did you specify it in publish.mson?"
38
38
  raise Lacerda::Service::InvalidObjectTypeError.new(msg)
39
39
  end
40
40
 
@@ -32,15 +32,15 @@ module Lacerda
32
32
  if @consumers == 0
33
33
  @io.print " (no consumers)".yellow + "\n"
34
34
  elsif @consume_errors == 0
35
- @io.print " OK".green + "\n"
35
+ @io.print " OK".green
36
36
  else
37
- @io.print " ERROR".red + "\n"
37
+ @io.print " ERROR".red
38
38
  end
39
39
  end
40
40
 
41
41
  def check_consumer(consuming_service)
42
42
  return unless @verbose
43
- @io.print "Objects consumed by #{consuming_service.name.camelize}: "
43
+ @io.print "\nObjects consumed by #{consuming_service.name.camelize}: "
44
44
  end
45
45
 
46
46
  def object_publisher_existing(consumed_object, is_published)
@@ -53,11 +53,13 @@ module Lacerda
53
53
  end
54
54
 
55
55
  def result(errors)
56
- @io.puts "\n" if @verbose
56
+ return unless @verbose
57
57
  if errors.blank?
58
- @io.puts "All contracts valid 🙌".green if @verbose
58
+ @io.puts "\n----------------------"
59
+ @io.puts "All contracts valid 🙌 ".green
59
60
  else
60
- @io.puts "Violations:".red
61
+ @io.puts "--------------"
62
+ @io.puts "😱 Violations:".red
61
63
  @io.puts JSON.pretty_generate(errors)
62
64
  @io.puts "#{errors.length} contract violations".red
63
65
  end
@@ -1,3 +1,3 @@
1
1
  module Lacerda
2
- VERSION = '0.14.4'
2
+ VERSION = '0.14.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.14.4
4
+ version: 0.14.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: 2016-08-15 00:00:00.000000000 Z
11
+ date: 2016-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport