qs 0.7.1 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/qs/error_handler.rb +12 -5
- data/lib/qs/version.rb +1 -1
- data/test/unit/error_handler_tests.rb +7 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8c3eb7457d2aa2b07408a10c0c34e6ad9ce5588
|
4
|
+
data.tar.gz: e4b921440c2b445c6b8c1d587730959b9addce55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 905e5298a81cfa7bb54be9504363539e8b025837173fba984a53efc5820b734ace3379278b0e0cf815fa6495e915ae1bcd46f650582cfc2956232e91e5865bef
|
7
|
+
data.tar.gz: a0c8052fa0bc783a570c0548ec4f23895ecfe0625e0207be7b654ed93dd9f33f515d63d5c1986801fb4a7482597059f39bc16ea6d7ca9dc5f0a5abe2b52a3eb3
|
data/lib/qs/error_handler.rb
CHANGED
@@ -41,11 +41,11 @@ module Qs
|
|
41
41
|
attr_reader :message, :handler_class
|
42
42
|
|
43
43
|
def initialize(args)
|
44
|
-
@daemon_data = args
|
45
|
-
@queue_name =
|
46
|
-
@encoded_payload = args
|
47
|
-
@message = args
|
48
|
-
@handler_class = args
|
44
|
+
@daemon_data = args.fetch(:daemon_data)
|
45
|
+
@queue_name = get_queue_name(args.fetch(:queue_redis_key))
|
46
|
+
@encoded_payload = args.fetch(:encoded_payload)
|
47
|
+
@message = args.fetch(:message)
|
48
|
+
@handler_class = args.fetch(:handler_class)
|
49
49
|
end
|
50
50
|
|
51
51
|
def ==(other)
|
@@ -59,6 +59,13 @@ module Qs
|
|
59
59
|
super
|
60
60
|
end
|
61
61
|
end
|
62
|
+
|
63
|
+
private
|
64
|
+
|
65
|
+
def get_queue_name(redis_key)
|
66
|
+
Queue::RedisKey.parse_name(redis_key.to_s)
|
67
|
+
end
|
68
|
+
|
62
69
|
end
|
63
70
|
|
64
71
|
end
|
data/lib/qs/version.rb
CHANGED
@@ -128,7 +128,13 @@ class Qs::ErrorHandler
|
|
128
128
|
exp = Qs::ErrorContext.new(@context_hash)
|
129
129
|
assert_equal exp, subject
|
130
130
|
|
131
|
-
exp = Qs::ErrorContext.new({
|
131
|
+
exp = Qs::ErrorContext.new({
|
132
|
+
:daemon_data => Qs::DaemonData.new,
|
133
|
+
:queue_redis_key => Qs::Queue::RedisKey.new(Factory.string),
|
134
|
+
:encoded_payload => Factory.string,
|
135
|
+
:message => Factory.string,
|
136
|
+
:handler_class => Factory.string
|
137
|
+
})
|
132
138
|
assert_not_equal exp, subject
|
133
139
|
end
|
134
140
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kelly Redding
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-09-15 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: assert
|
@@ -194,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
194
194
|
requirements: []
|
195
195
|
|
196
196
|
rubyforge_project:
|
197
|
-
rubygems_version: 2.
|
197
|
+
rubygems_version: 2.6.4
|
198
198
|
signing_key:
|
199
199
|
specification_version: 4
|
200
200
|
summary: Define message queues. Process jobs and events. Profit.
|