mimi-messaging 1.1.0 → 1.1.1

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: 54a536d257b3a394b605e80e1b24167e5912f785
4
- data.tar.gz: 03374246a36903692068863563ec7a111cd18b8b
3
+ metadata.gz: f4392d50097d139e224851c8d8609a7f3e092772
4
+ data.tar.gz: 587ba9c7a31e84d732e377c02df969dcecd2a296
5
5
  SHA512:
6
- metadata.gz: '0295bb31beb00e6370340e4db43bab2a145e9d463d514bcdf1eba944a171edb614133afc7384a9e1e3010b832c4ff4b547ae9a27e307efb19d4abe3acee0782d'
7
- data.tar.gz: 5e3a7f512fc58d688551c9601c26b863872dfeafaf860554796f2493ba30234045c591520c453fa973cae529069516cc19653553cf369eca7f31bc7c5ac29395
6
+ metadata.gz: c07418b84dc02e2e5d33cdf3c4b836b2aef84710ae6f53c539a99e918c3f5f488ee6efcd30e36b668dc81559808fed04baa9a6841cb5ebe8a5c9bc2d61c29c56
7
+ data.tar.gz: 8c7a7441e4b5eed3b2013daf7450f52cf9127449257b692508d8d3f6c580d4a695aa1a360b2cb3faa737b6680e3d4ed3298f5ab76fcb4189c2dfc3d82ee967a8
@@ -179,7 +179,7 @@ module Mimi
179
179
  # Mimi::Messaging.command("users/create", name: "John Smith")
180
180
  #
181
181
  # @param target [String] "<queue>/<method>"
182
- # @param message [Hash]
182
+ # @param message [Hash,Mimi::Messaging::Message]
183
183
  # @param opts [Hash] additional adapter-specific options
184
184
  #
185
185
  # @return nil
@@ -196,6 +196,9 @@ module Mimi
196
196
  #
197
197
  # Raises Timeout::Error if the response from the target was not received in time.
198
198
  #
199
+ # Example:
200
+ # result = Mimi::Messaging.query("users/find", id: 157)
201
+ #
199
202
  # @param target [String] "<queue>/<method>"
200
203
  # @param message [Hash,Mimi::Messaging::Message]
201
204
  # @param opts [Hash] additional options, e.g. :timeout
@@ -213,7 +216,7 @@ module Mimi
213
216
  # Broadcasts the event with the given target
214
217
  #
215
218
  # @param target [String] "<topic>/<event_type>", e.g. "customers/created"
216
- # @param message [Hash]
219
+ # @param message [Hash,Mimi::Messaging::Message]
217
220
  # @param opts [Hash] additional options
218
221
  #
219
222
  def self.event(target, message = {}, opts = {})
@@ -63,7 +63,7 @@ module Mimi
63
63
  # Sends the command to the given target
64
64
  #
65
65
  # @param target [String] "<queue>/<method>"
66
- # @param message [Hash]
66
+ # @param message [Mimi::Messaging::Message]
67
67
  # @param opts [Hash] additional options
68
68
  #
69
69
  # @return nil
@@ -76,7 +76,7 @@ module Mimi
76
76
  # Executes the query to the given target and returns response
77
77
  #
78
78
  # @param target [String] "<queue>/<method>"
79
- # @param message [Hash]
79
+ # @param message [Mimi::Messaging::Message]
80
80
  # @param opts [Hash] additional options, e.g. :timeout
81
81
  #
82
82
  # @return [Hash]
@@ -89,7 +89,7 @@ module Mimi
89
89
  # Broadcasts the event with the given target
90
90
  #
91
91
  # @param target [String] "<topic>/<event_type>", e.g. "customers/created"
92
- # @param message [Hash]
92
+ # @param message [Mimi::Messaging::Message]
93
93
  # @param opts [Hash] additional options
94
94
  #
95
95
  def event(_target, _message, _opts = {})
@@ -124,7 +124,7 @@ module Mimi
124
124
  raise(
125
125
  ArgumentError,
126
126
  "Invalid request processor passed to #{self.class}##{__method__}(), " \
127
- "expected to respond to #call_command(...) AND #call_query(method_name, request, opts)"
127
+ "expected to respond to #call_command(method_name, message, opts) AND #call_query(...)"
128
128
  )
129
129
  end
130
130
 
@@ -149,7 +149,7 @@ module Mimi
149
149
  raise(
150
150
  ArgumentError,
151
151
  "Invalid event processor passed to #{self.class}##{__method__}(), " \
152
- "expected to respond to #call_event(method_name, request, opts)"
152
+ "expected to respond to #call_event(event_type, message, opts)"
153
153
  )
154
154
  end
155
155
 
@@ -175,7 +175,7 @@ module Mimi
175
175
  raise(
176
176
  ArgumentError,
177
177
  "Invalid event processor passed to #{self.class}##{__method__}(), " \
178
- "expected to respond to #call_event(method_name, request, opts)"
178
+ "expected to respond to #call_event(event_type, message, opts)"
179
179
  )
180
180
  end
181
181
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Mimi
4
4
  module Messaging
5
- VERSION = "1.1.0"
5
+ VERSION = "1.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mimi-messaging
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Kukushkin