coordinator 0.0.10 → 0.0.11

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: 951f9d028d3168801aa1c5290154533a3d8052f1
4
- data.tar.gz: 830fa381045f0024b419320258992b1896a0b8d6
3
+ metadata.gz: 3a50fe82e05aa838a2e83128cdae98480b8affd6
4
+ data.tar.gz: 9b206dde729cc0b783f02ab160f4c684b8191355
5
5
  SHA512:
6
- metadata.gz: 4c522e99cdf40060bf51807190858eb825d3cc8ca3388940460511c9cf7a17f5fbc6d0e8a21e548eadcf09ea9d8bd1271ba5b9f41f480d930275053c361727c8
7
- data.tar.gz: f814051065ef4f6d32149f5529538ec06345ca5157c21e1ff27db8d197111614f9cc94c6bae332847346600d558af3a9e48b9bd05e1ebba148c956947510b250
6
+ metadata.gz: cf60ae757af09e7ae69be4b042a4359f1fa43afb0cd99e7f73c15e9febfb1f69d005e19a0bec81b8db0bf181cc18edfc1782dc30659374c9642692f6761636b1
7
+ data.tar.gz: ccc63e3039946241838f5cb8e93a3672a8ad85740018ddc46236c751f3d5e11a1f423399fa318f15a38e27c2c0edfb3f9c687fde49ca86ab588b21886cf725d5
@@ -4,10 +4,11 @@ module Coordinator
4
4
 
5
5
  def initialize(skill, capacity=nil, &block)
6
6
  @skill = skill
7
- self.capacity = capacity if capacity
8
7
  @custom_block = block if block_given?
9
8
 
10
9
  super(skill)
10
+
11
+ self.capacity = capacity if capacity
11
12
  end
12
13
 
13
14
  def next_task(skills)
@@ -1,3 +1,3 @@
1
1
  module Coordinator
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
@@ -6,6 +6,13 @@ describe "Coordinator::Queue" do
6
6
  Redis.current.flushall
7
7
  end
8
8
 
9
+ describe 'initialize' do
10
+ it 'can capacity when option argument is passed in' do
11
+ @queue = Coordinator::Queue.new("high", 500)
12
+ assert_equal 500, @queue.capacity
13
+ end
14
+ end
15
+
9
16
  describe 'next_task' do
10
17
  it 'returns task when eligible' do
11
18
  @queue.push(1)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coordinator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Mercier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-22 00:00:00.000000000 Z
11
+ date: 2014-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http