message_bus_client_worker 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +3 -3
- data/README.md +1 -1
- data/lib/message_bus_client_worker/services/polling/process_payload.rb +20 -3
- data/lib/message_bus_client_worker/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 560c4dac8cd9a38d137c89279e61752d8a927f4313069754ee09bf2605a31a03
|
4
|
+
data.tar.gz: 6d3006363e0daf8dbabe6d66a8884f4e9957f22b008ec3bb236a111d9ee7d313
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b74d6e16af245b641910cfa7f1eb168d342ea8ec8e4e63f30bee77bb95629d9047b69165ad26117372f9d922e5b67eba2f954a8648237b9b1df6da69c38b32ab
|
7
|
+
data.tar.gz: e22be9e812ec11b4f76e7d7479013b042fb1968d78e85ceff30f732fc3260b0ccef19a8bffc524dbbfd8b24ae6a0c67d24de3791738f04965aa62aed3155f942
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [1.1.0] - 2018-02-13
|
8
|
+
### Added
|
9
|
+
- Add a third argument support for processor which passes the request headers.
|
10
|
+
|
7
11
|
## [1.0.0] - 2018-02-12
|
8
12
|
### Changed
|
9
13
|
- Change structure of `subscriptions` config to include headers and channels.
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
message_bus_client_worker (1.
|
4
|
+
message_bus_client_worker (1.1.0)
|
5
5
|
activesupport
|
6
6
|
addressable
|
7
7
|
excon
|
@@ -17,7 +17,7 @@ GEM
|
|
17
17
|
i18n (>= 0.7, < 2)
|
18
18
|
minitest (~> 5.1)
|
19
19
|
tzinfo (~> 1.1)
|
20
|
-
addressable (2.
|
20
|
+
addressable (2.6.0)
|
21
21
|
public_suffix (>= 2.0.2, < 4.0)
|
22
22
|
byebug (10.0.2)
|
23
23
|
coderay (1.1.2)
|
@@ -26,7 +26,7 @@ GEM
|
|
26
26
|
diff-lcs (1.3)
|
27
27
|
excon (0.62.0)
|
28
28
|
gem_config (0.3.1)
|
29
|
-
i18n (1.
|
29
|
+
i18n (1.5.3)
|
30
30
|
concurrent-ruby (~> 1.0)
|
31
31
|
light-service (0.11.0)
|
32
32
|
activesupport (>= 3.0)
|
data/README.md
CHANGED
@@ -3,7 +3,15 @@ module MessageBusClientWorker
|
|
3
3
|
class ProcessPayload
|
4
4
|
extend LightService::Action
|
5
5
|
|
6
|
-
expects
|
6
|
+
expects(
|
7
|
+
:host,
|
8
|
+
:subscriptions,
|
9
|
+
:payload,
|
10
|
+
:headers
|
11
|
+
)
|
12
|
+
|
13
|
+
TWO_ARGS = 2
|
14
|
+
THREE_ARGS = 3
|
7
15
|
|
8
16
|
executed do |c|
|
9
17
|
payload = c.payload
|
@@ -13,9 +21,18 @@ module MessageBusClientWorker
|
|
13
21
|
next c if channel_config.nil?
|
14
22
|
|
15
23
|
processor_class = Kernel.const_get(channel_config[:processor])
|
16
|
-
|
17
24
|
SetLastId.(c.host, channel, payload["message_id"])
|
18
|
-
|
25
|
+
|
26
|
+
data = payload["data"]
|
27
|
+
|
28
|
+
case processor_class.method(:call).arity
|
29
|
+
when TWO_ARGS
|
30
|
+
processor_class.(data, payload)
|
31
|
+
when THREE_ARGS
|
32
|
+
processor_class.(data, payload, c.headers)
|
33
|
+
else
|
34
|
+
processor_class.(data)
|
35
|
+
end
|
19
36
|
end
|
20
37
|
|
21
38
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: message_bus_client_worker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ramon Tayag
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_config
|