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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4a6b54d25c28b9abcb0050951ae47ede341016a9
4
- data.tar.gz: d6891e68b077770fc5159566a24c369254046bf4
3
+ metadata.gz: b32f15d7b24be749e57fd000f914ce2c6bebe627
4
+ data.tar.gz: 9b385eeed01567244a1a1840dbe0a85dbce02e09
5
5
  SHA512:
6
- metadata.gz: ca859cf3dd03676f651609d016abc0d5a1aeec3b00b8b803012d448b53d4a588e9f026271d61a00236771c34bd8a2f2d2f81aa87697eb0e24354386ae443a12c
7
- data.tar.gz: d5761799cf2f920976f34672cd53a979384630e4b1a7c512d9b02c97d5fa6f36e18c69fb025b8191d63adcbb5045e1855aad0f125f994de7202e1ebd19ba67b3
6
+ metadata.gz: 81c8f2c46312e393ee8d226d353292e4cd83c56b209fe73f25165a42468ac55c4f8511b9afba0f66d075199b928259c56a2545a2c8f00584ca0909c9b158496b
7
+ data.tar.gz: 11e302e24b88f989c80e750c3f2da37ba8720d51c68bc4da93b473186dba9df800fb3d15bc5c02f3d4f175ed7fe79a1e07a8d185cdf9bf00a3d12a25b6c532ce
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.6
1
+ 0.3.7
@@ -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)
@@ -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.6 ruby lib
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.6"
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 TestSkeinWorker < Test::Unit::TestCase
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skein
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Tadman