servus 0.5.1 → 0.5.2
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/lib/servus/events/emitter.rb +2 -3
- data/lib/servus/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 15cec1ebe831437428e84374b7b7a83cc34c1f4cbcdc13bfe1c847eca5c1c9b3
|
|
4
|
+
data.tar.gz: 2b371d1069a549fab5af3de5aca80d8be029850cc0c1e3378e7643c742b917dd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a66d2a07c3c564148e612fac96ab22e350c9483938226a495cc7b97b3b96ad979a4dba26b3bc2b5090bb3fc4c3c5016647f186f34cbe93bdc9f8f0f329205572
|
|
7
|
+
data.tar.gz: 56d23b1caac58e6d1c62062b80ecd85bb50784f034709fb5228d742e5de0c76e6a096bf59d45d67d84b0e024e2a0ba7f8f283db2027e543aa5543ad383eee2b3
|
|
@@ -189,7 +189,7 @@ module Servus
|
|
|
189
189
|
# @return [Object] truthy or falsy value
|
|
190
190
|
# @api private
|
|
191
191
|
def evaluate_emission_condition(condition, result)
|
|
192
|
-
condition.is_a?(Proc) ?
|
|
192
|
+
condition.is_a?(Proc) ? instance_exec(result, &condition) : send(condition, result)
|
|
193
193
|
end
|
|
194
194
|
|
|
195
195
|
# Validates the payload against the Event class's schema registered for the event.
|
|
@@ -216,8 +216,7 @@ module Servus
|
|
|
216
216
|
builder = emission[:payload_builder]
|
|
217
217
|
|
|
218
218
|
if builder.is_a?(Proc)
|
|
219
|
-
|
|
220
|
-
builder.call(result)
|
|
219
|
+
instance_exec(result, &builder)
|
|
221
220
|
elsif builder.is_a?(Symbol)
|
|
222
221
|
# Method-based payload builder
|
|
223
222
|
send(builder, result)
|
data/lib/servus/version.rb
CHANGED