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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 627e0236127d263cb8d8a9a04146d13c64f280eb
4
- data.tar.gz: d78a718458b648e9fc75ff2589820d799dc54b6a
3
+ metadata.gz: bbc62c7f37f2569e45fa1eb3e49262d7724d9153
4
+ data.tar.gz: ff4592f89c4ddea5024faf92e1ae91d7d0a02bae
5
5
  SHA512:
6
- metadata.gz: fbcd7756c2bf5161d1edf5b18432e99f099348fe0aedcd03c1052fcf9ff9d4236e993b8b86079dfb7de84d1af558e439421dd4d4739d65d2be0fe4ab00cbe3a9
7
- data.tar.gz: 9100bf843b3850762dbd1f396474cf30c74181dadca2a2ad6c5965fa6299a71772d3f806bfd7fd42ef74674126d26d66ca6be27177e25b03dba615b955be5d6f
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
- * "operations:complete_registration:succeeded" or "operations:complete_registration:aborted" depending on if an exception was raised or not
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" : "aborted"}", payload(result))
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
@@ -1,3 +1,3 @@
1
1
  module Bizness
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.0"
3
3
  end
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.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-21 00:00:00.000000000 Z
11
+ date: 2015-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord