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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d8323a541fe5820763e01fd9bc86e1ce69e5c64d
4
- data.tar.gz: 5470362402e0cab14f67f96005001d61c62925c0
3
+ metadata.gz: b8c3eb7457d2aa2b07408a10c0c34e6ad9ce5588
4
+ data.tar.gz: e4b921440c2b445c6b8c1d587730959b9addce55
5
5
  SHA512:
6
- metadata.gz: 1d6d9367d3e72939e184a40271e5a413bd15f695d7e28ad5efe5d08fc92f80409e5e6c4a2e9701b999633a97d793af63622aeaa4857ea2011bd7b7582aac68fd
7
- data.tar.gz: 05df115c14aa8d118b5c9582d25eca88f6008c13ab84c42009d7ed022b84fd027113f0708cf6c68ad92d8a7e115ca6f140b3c60247d7fda6c196d6add4f848a4
6
+ metadata.gz: 905e5298a81cfa7bb54be9504363539e8b025837173fba984a53efc5820b734ace3379278b0e0cf815fa6495e915ae1bcd46f650582cfc2956232e91e5865bef
7
+ data.tar.gz: a0c8052fa0bc783a570c0548ec4f23895ecfe0625e0207be7b654ed93dd9f33f515d63d5c1986801fb4a7482597059f39bc16ea6d7ca9dc5f0a5abe2b52a3eb3
@@ -41,11 +41,11 @@ module Qs
41
41
  attr_reader :message, :handler_class
42
42
 
43
43
  def initialize(args)
44
- @daemon_data = args[:daemon_data]
45
- @queue_name = Queue::RedisKey.parse_name(args[:queue_redis_key].to_s)
46
- @encoded_payload = args[:encoded_payload]
47
- @message = args[:message]
48
- @handler_class = args[:handler_class]
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
@@ -1,3 +1,3 @@
1
1
  module Qs
2
- VERSION = "0.7.1"
2
+ VERSION = "0.8.0"
3
3
  end
@@ -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.7.1
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-06-29 00:00:00 Z
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.5.1
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.