bizness 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 +4 -4
- data/README.md +8 -1
- data/lib/bizness/filters/event_filter.rb +1 -1
- data/lib/bizness/version.rb +1 -1
- 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: bbc62c7f37f2569e45fa1eb3e49262d7724d9153
|
4
|
+
data.tar.gz: ff4592f89c4ddea5024faf92e1ae91d7d0a02bae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ed4818a1745adc1882e552cbcc1b93a4eef543781d029b4dbeb28120fe7d7c4e70160172880db51396240d21575edd46d9aee712d175ed862427c7cbb1df7ad
|
7
|
+
data.tar.gz: 7cddc1debfcb6714179ec8d7e3b9590e16865b87901fdfacb69b72087777b39e8b0bdb1b48cd4781d6492723b740062037c617d2f19efd86a68024d70b389ffa
|
data/README.md
CHANGED
@@ -90,8 +90,15 @@ op.to_h
|
|
90
90
|
|
91
91
|
Automatically publishing operations as events via the `EventFilter` is one of the primary reasons we developed Bizness. The `EventFilter` will always publish two events. For example, if your operation class is named `CompleteRegistrationOperation`, these events will be published:
|
92
92
|
|
93
|
+
This event will always be published:
|
94
|
+
|
93
95
|
* "operations:complete_registration:executed" - This event includes the start time, end time and duration of the operation
|
94
|
-
|
96
|
+
|
97
|
+
And additionally one of these events will be published as well:
|
98
|
+
|
99
|
+
* "operations:complete_registration:succeeded" if the operation did not abort and an error was not set
|
100
|
+
* "operations:complete_registration:failed" if the operation did not abort, but an error was set manually
|
101
|
+
* "operations:complete_registration:aborted" if a runtime exception was thrown during the operation's execution
|
95
102
|
|
96
103
|
#### Subscribing
|
97
104
|
|
@@ -10,7 +10,7 @@ module Bizness::Filters
|
|
10
10
|
|
11
11
|
def evented_call
|
12
12
|
result = filtered_operation.call
|
13
|
-
Hey.publish!("#{event_name}#{delimiter}#{successful? ? "succeeded" : "
|
13
|
+
Hey.publish!("#{event_name}#{delimiter}#{successful? ? "succeeded" : "failed"}", payload(result))
|
14
14
|
rescue Exception => e
|
15
15
|
Hey.publish!("#{event_name}#{delimiter}aborted", payload.merge(error: e.message, stacktrace: e.backtrace, exception: e.class.name))
|
16
16
|
raise e
|
data/lib/bizness/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bizness
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ShippingEasy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|