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 +4 -4
- data/CHANGELOG.markdown +3 -0
- data/lib/lacerda/consume_specification.rb +3 -2
- data/lib/lacerda/publish_specification.rb +1 -1
- data/lib/lacerda/reporters/stdout.rb +8 -6
- 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: 5d13d07da5f62eb1d31defc9ff7a5df151d52b94
|
|
4
|
+
data.tar.gz: c85b1ef422c6b99bcb6fff0367b4f7a4bb84f77b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d2272ca821f679ff74d6e2048dc1a7aa9f9e30ac804151f431ee0a5fbde8933f295076186cf5d6a8ffd3400fbe1f9fd0e8d0dacf1be45d815d5061ec5796ef8b
|
|
7
|
+
data.tar.gz: cd1c3930cb02b110787c3d2a0bf686cebd38823ba20baf20e0cb5003066e02bd3629cec72f85d61cefd8abe2baab5f25677165c898277598acf9b2b3421a47a7
|
data/CHANGELOG.markdown
CHANGED
|
@@ -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
|
-
|
|
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
|
|
35
|
+
@io.print " OK".green
|
|
36
36
|
else
|
|
37
|
-
@io.print " ERROR".red
|
|
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 "
|
|
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
|
-
|
|
56
|
+
return unless @verbose
|
|
57
57
|
if errors.blank?
|
|
58
|
-
@io.puts "
|
|
58
|
+
@io.puts "\n----------------------"
|
|
59
|
+
@io.puts "All contracts valid 🙌 ".green
|
|
59
60
|
else
|
|
60
|
-
@io.puts "
|
|
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
|
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.14.
|
|
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-
|
|
11
|
+
date: 2016-08-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|