skein 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/skein/client/worker.rb +1 -1
- data/skein.gemspec +2 -2
- data/test/unit/test_skein_worker.rb +23 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b32f15d7b24be749e57fd000f914ce2c6bebe627
|
4
|
+
data.tar.gz: 9b385eeed01567244a1a1840dbe0a85dbce02e09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81c8f2c46312e393ee8d226d353292e4cd83c56b209fe73f25165a42468ac55c4f8511b9afba0f66d075199b928259c56a2545a2c8f00584ca0909c9b158496b
|
7
|
+
data.tar.gz: 11e302e24b88f989c80e750c3f2da37ba8720d51c68bc4da93b473186dba9df800fb3d15bc5c02f3d4f175ed7fe79a1e07a8d185cdf9bf00a3d12a25b6c532ce
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.7
|
data/lib/skein/client/worker.rb
CHANGED
@@ -8,7 +8,7 @@ class Skein::Client::Worker < Skein::Connected
|
|
8
8
|
|
9
9
|
lock do
|
10
10
|
@reply_exchange = self.channel.default_exchange
|
11
|
-
@queue = self.channel.queue(queue_name, durable: queue_name.match(/\S/))
|
11
|
+
@queue = self.channel.queue(queue_name, durable: !!queue_name.match(/\S/))
|
12
12
|
|
13
13
|
if (exchange_name)
|
14
14
|
@exchange = self.channel.direct(exchange_name, durable: true)
|
data/skein.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: skein 0.3.
|
5
|
+
# stub: skein 0.3.7 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "skein".freeze
|
9
|
-
s.version = "0.3.
|
9
|
+
s.version = "0.3.7"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
@@ -1,6 +1,14 @@
|
|
1
1
|
require_relative '../helper'
|
2
2
|
|
3
|
-
class
|
3
|
+
class ExampleWorker < Skein::Client::Worker
|
4
|
+
attr_reader :initialized
|
5
|
+
|
6
|
+
def after_initialize
|
7
|
+
@initialized = true
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
class TestSkeinWorker < Test::Unit::TestCase
|
4
12
|
def test_default
|
5
13
|
client = Skein::Client.new
|
6
14
|
|
@@ -13,4 +21,18 @@ class TestSkeinWorker < Test::Unit::TestCase
|
|
13
21
|
ensure
|
14
22
|
client and client.close
|
15
23
|
end
|
24
|
+
|
25
|
+
def test_subclass_initialize
|
26
|
+
client = Skein::Client.new
|
27
|
+
|
28
|
+
worker = ExampleWorker.new('test_queue', connection: client.connection)
|
29
|
+
|
30
|
+
assert worker
|
31
|
+
|
32
|
+
assert_equal false, worker.async?
|
33
|
+
assert_equal true, worker.initialized
|
34
|
+
|
35
|
+
ensure
|
36
|
+
client and client.close
|
37
|
+
end
|
16
38
|
end
|