coordinator 0.0.4 → 0.0.5

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: 3977947a36473a9ec30b992909e3dfdc076ba561
4
- data.tar.gz: f579516fbf00bc9a8f802f5fbea6ea0ed05c59c8
3
+ metadata.gz: f66708844197caa57e7e913f69c715efcb652dc9
4
+ data.tar.gz: d5cd8fed2ad8715ab68ea8acaede0b21c72f81d2
5
5
  SHA512:
6
- metadata.gz: 1fd505b8207d20fe21e7a03adf0ba181a01e60406e051ebd7abf164ac1efbf86cde3d31a43268f7fc0ff90fca985d1f39b74d06e8ef89853558683bf65edccc4
7
- data.tar.gz: 1ea977c6f093a99cfc34266c1f4a601682c310ae670d12d4c8e9324b38b75254a0a4f4ab68736da3f0acbe90e2d4abb874a70ee77ee2a2c489e410106bc79e86
6
+ metadata.gz: 0da397ca8c9462beb8b3ab3beb8ecd1e7864ca72a671e8f883c136fc74e54e6823eb19f9bca3b62b582064a42ddd2b1079abf704ed777a22617699e1a6f857fd
7
+ data.tar.gz: bd1ec9dd92c33e236ab1ba51215782485ab8f6772a6f31d0992398a456745d567f57311c7f5e8e4098861a6390a60b4c1c3281f130d58c5529fb0f9b8f46afc8
@@ -31,7 +31,7 @@ module Coordinator
31
31
  def info(skill)
32
32
  queue = queue_for_skill(skill)
33
33
  {
34
- :skill => queue.skill,
34
+ :name => queue.name,
35
35
  :capacity => queue.capacity,
36
36
  :count => queue.length,
37
37
  :items => queue.items
@@ -41,7 +41,7 @@ module Coordinator
41
41
  private
42
42
 
43
43
  def queue_for_skill(skill)
44
- queue = @queues.find {|q| q.skill == skill}
44
+ queue = @queues.find {|q| q.name == skill}
45
45
  raise Coordinator::Error, "No matching queue for #{skill}" unless queue
46
46
  queue
47
47
  end
@@ -1,7 +1,5 @@
1
1
  module Coordinator
2
2
  class Queue
3
- attr_reader :skill, :rules
4
-
5
3
  def initialize(skill, capacity=nil, &block)
6
4
  @skill = skill
7
5
  @store = Coordinator::RedisQueue.new(@skill)
@@ -40,6 +38,10 @@ module Coordinator
40
38
  @store.capacity = capacity
41
39
  end
42
40
 
41
+ def name
42
+ @skill
43
+ end
44
+
43
45
  def items
44
46
  @store.items
45
47
  end
@@ -1,3 +1,3 @@
1
1
  module Coordinator
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coordinator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Mercier