sidekiq-eventbus 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sidekiq/event_bus/consumer.rb +6 -1
- data/lib/sidekiq/event_bus/version.rb +2 -2
- 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: 7061dd705796ed74b0ee5cf0728d269b06ac341e
|
4
|
+
data.tar.gz: 1f44778cbd38de46eb79f8e2f291da182d2f4f20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b98e138821232d05837624b86c653de82af593d7678139a9071f91963760ea647f0447c11fbe3f8da08101406707edd0bbaa4b752c6471dfc1fd6cb35de900b4
|
7
|
+
data.tar.gz: aea550b45556040b2dee7d0dbd0c6a7baeb8626f45c6dcf962d370aca66549aad390295da83e0cc22323a7a8ac5ff2932ad8126fd87875e0b4d193b5719bd5b6
|
@@ -22,11 +22,16 @@ class Sidekiq::EventBus::Consumer
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
+
PAYLOAD_WITH_INDIFFERENT_ACCESS = defined?(ActiveSupport::HashWithIndifferentAccess)
|
25
26
|
|
26
27
|
def consume topic, event, payload
|
27
28
|
if self.class.handlers.key? event
|
28
29
|
_payload = payload.merge('topic'.freeze => topic, 'event'.freeze => event).freeze
|
29
30
|
|
31
|
+
if PAYLOAD_WITH_INDIFFERENT_ACCESS
|
32
|
+
_payload = ActiveSupport::HashWithIndifferentAccess.new(_payload)
|
33
|
+
end
|
34
|
+
|
30
35
|
self.class.handlers[event].each do |handler|
|
31
36
|
begin
|
32
37
|
if handler.is_a? Proc
|
@@ -40,4 +45,4 @@ class Sidekiq::EventBus::Consumer
|
|
40
45
|
end
|
41
46
|
end
|
42
47
|
end
|
43
|
-
end
|
48
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-eventbus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Phil Monroe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|