lacerda 0.4.0 → 0.5.0

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: b38ae258b284fb13d0f4b2c7dd7dbfdcaa7c8f4f
4
- data.tar.gz: c323169f9eba263051bcc3b5a23bdc039bd6aedb
3
+ metadata.gz: 298ecf082332bf9df45f87e66fc8fb7443cc0bc7
4
+ data.tar.gz: 20be4385ca1139b1e6407e35f4ea4ed6669db242
5
5
  SHA512:
6
- metadata.gz: 0731fdf6c6d9b7611fdb05343deb6e6f0782b0e97dfc21e5b516b24f6066ea5356c8f7910f9db8e74f90e277a883922e881a9c01fc72edd5307f0ad3d86d7fd8
7
- data.tar.gz: 3d00c42ad44d8b2105cc71dbf0d35e8aca1f11825fc6f1ec8216fa4656579fb3252b1f24c5270907fea9a6f88de748b03b8a5a9e483a8ab56b653b3f459b386d
6
+ metadata.gz: bd79eee252403f379ea172ecdcae2d0337c31738c17ebcb90c9c5e6929b35799d07fdec85823e46dea7f63c62447416ea77101f087cbb8d02f9393f50a24534d
7
+ data.tar.gz: 30f65d7fa3eeb15f3de4681e1b536e46a50d27b763cee44fa316cf3a63b73911c7343700895ce8c2985f11bf0ed23d2b30899eed213bd1fcfa6a0075e8d3ddb2
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,6 @@
1
+ # 0.5.0 (29-Oct-15)
2
+ - add `consume_object` method that returns Blumquist wrapped data
3
+
1
4
  # 0.4.0 (29-Oct-15)
2
5
  - validation helpers for published and consumed objects
3
6
  - enhance some error messages
data/lacerda.gemspec CHANGED
@@ -24,6 +24,8 @@ Gem::Specification.new do |spec|
24
24
  spec.add_runtime_dependency "json-schema", ["~> 2.5"]
25
25
  spec.add_runtime_dependency "redsnow", ["~> 0.4"]
26
26
  spec.add_runtime_dependency "colorize"
27
+ spec.add_runtime_dependency "blumquist"
28
+
27
29
 
28
30
  spec.add_development_dependency "bundler", ["~> 1"]
29
31
  spec.add_development_dependency "guard-bundler", ["~> 2.1"]
@@ -1,4 +1,5 @@
1
1
  require 'active_support/core_ext/string'
2
+ require 'blumquist'
2
3
  require 'lacerda/service/error'
3
4
 
4
5
  module Lacerda
@@ -78,6 +79,11 @@ module Lacerda
78
79
  object_description.validate_data!(data)
79
80
  end
80
81
 
82
+ def consume_object(type, data)
83
+ object_description = @consume.object(type)
84
+ Blumquist.new(object_description.schema, data)
85
+ end
86
+
81
87
  private
82
88
 
83
89
  def load_contracts
@@ -1,3 +1,3 @@
1
1
  module Lacerda
2
- VERSION = '0.4.0'
2
+ VERSION = '0.5.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lacerda
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jannis Hermanns
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: blumquist
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: bundler
85
99
  requirement: !ruby/object:Gem::Requirement