bizness 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bizness/filters/event_filter.rb +9 -7
- 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: 58e5f8d83a30e855fdc66fd073da2dfd8e618607
|
4
|
+
data.tar.gz: 11a82527d7502d42cbe4fb2170f4b013cdd9c0d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7566b9564a3c1d05605639ef7e074b8ab99d3d6eb954ce766350058070fee043075f31d92985ed8d0bd4a385851c6d514c508a7dcff109951d94bc7064546da7
|
7
|
+
data.tar.gz: 6c5e178e9dc68a4318bc42a46d9310097f8dcd718bd7893f9ac2171ddd8c3e3a11ea8b6b0e015d5d7a7a7ce46bb7b20ed7d065448319c2a5bd93a845e699c5d8
|
@@ -1,10 +1,8 @@
|
|
1
1
|
module Bizness::Filters
|
2
2
|
class EventFilter < Bizness::Filters::BaseFilter
|
3
3
|
def call
|
4
|
-
Hey.
|
5
|
-
|
6
|
-
evented_call
|
7
|
-
end
|
4
|
+
Hey.publish!("#{event_name}#{delimiter}executed", payload) do
|
5
|
+
evented_call
|
8
6
|
end
|
9
7
|
end
|
10
8
|
|
@@ -12,14 +10,14 @@ module Bizness::Filters
|
|
12
10
|
|
13
11
|
def evented_call
|
14
12
|
result = filtered_operation.call
|
15
|
-
Hey.publish!(successful? ? "succeeded" : "aborted", payload(result))
|
13
|
+
Hey.publish!("#{event_name}#{delimiter}#{successful? ? "succeeded" : "aborted"}", payload(result))
|
16
14
|
rescue Exception => e
|
17
|
-
Hey.publish!("aborted", payload.merge(error: e.message, stacktrace: e.backtrace, exception: e.class.name))
|
15
|
+
Hey.publish!("#{event_name}#{delimiter}aborted", payload.merge(error: e.message, stacktrace: e.backtrace, exception: e.class.name))
|
18
16
|
raise e
|
19
17
|
end
|
20
18
|
|
21
19
|
def event_name
|
22
|
-
__original_operation__.class.name.underscore.gsub("/",
|
20
|
+
__original_operation__.class.name.underscore.gsub("/", delimiter)
|
23
21
|
end
|
24
22
|
|
25
23
|
def payload(result = nil)
|
@@ -31,5 +29,9 @@ module Bizness::Filters
|
|
31
29
|
Hash.new
|
32
30
|
end
|
33
31
|
end
|
32
|
+
|
33
|
+
def delimiter
|
34
|
+
Hey.configuration.delimiter
|
35
|
+
end
|
34
36
|
end
|
35
37
|
end
|
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.3.
|
4
|
+
version: 0.3.3
|
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-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|