queue_bundle 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/queue_bundle.rb +0 -16
- data/lib/queue_bundle/version.rb +1 -1
- data/test/helper.rb +0 -0
- data/test/test_queue_bundle.rb +0 -0
- metadata +26 -30
data/lib/queue_bundle.rb
CHANGED
@@ -119,22 +119,6 @@ class QueueBundle
|
|
119
119
|
end
|
120
120
|
end
|
121
121
|
end
|
122
|
-
def empty?(index = nil)
|
123
|
-
if index.nil?
|
124
|
-
active_queues.inject{|total,y| (!total || !y) ? false : true } # if it sees a false then it is not empty
|
125
|
-
else
|
126
|
-
queue = @queues[index]
|
127
|
-
|
128
|
-
if queue.nil?
|
129
|
-
raise QueueNotFound.new("Queue not found for #{key}")
|
130
|
-
elsif queue == :reassigned
|
131
|
-
raise QueueNotFound.new("Queue reassigned")
|
132
|
-
else
|
133
|
-
queue.empty?
|
134
|
-
end
|
135
|
-
end
|
136
|
-
end
|
137
|
-
|
138
122
|
def length(index = nil)
|
139
123
|
if index.nil?
|
140
124
|
active_queues.map {|queue| queue.length}.inject{|sum,x| sum + x }
|
data/lib/queue_bundle/version.rb
CHANGED
data/test/helper.rb
CHANGED
File without changes
|
data/test/test_queue_bundle.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,59 +1,55 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: queue_bundle
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
4
5
|
prerelease:
|
5
|
-
version: 0.0.1
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Pete Brumm
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
12
|
+
date: 2011-08-12 00:00:00.000000000 -05:00
|
13
|
+
default_executable:
|
14
14
|
dependencies: []
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
description: Allows queue work to be distributed to seperate threads that need a consistent
|
16
|
+
end point. Allows you to provide a hashing algorithm for which thread handles
|
17
|
+
the work.
|
18
|
+
email:
|
18
19
|
- pbrumm@edgenet.com
|
19
20
|
executables: []
|
20
|
-
|
21
21
|
extensions: []
|
22
|
-
|
23
22
|
extra_rdoc_files: []
|
24
|
-
|
25
|
-
files:
|
23
|
+
files:
|
26
24
|
- lib/queue_bundle.rb
|
27
25
|
- lib/queue_bundle/version.rb
|
28
26
|
- test/helper.rb
|
29
27
|
- test/test_queue_bundle.rb
|
30
|
-
|
28
|
+
has_rdoc: true
|
29
|
+
homepage: ''
|
31
30
|
licenses: []
|
32
|
-
|
33
31
|
post_install_message:
|
34
32
|
rdoc_options: []
|
35
|
-
|
36
|
-
require_paths:
|
33
|
+
require_paths:
|
37
34
|
- lib
|
38
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
35
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
39
36
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version:
|
44
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
45
42
|
none: false
|
46
|
-
requirements:
|
47
|
-
- -
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version:
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
50
47
|
requirements: []
|
51
|
-
|
52
48
|
rubyforge_project: queue_bundle
|
53
|
-
rubygems_version: 1.
|
49
|
+
rubygems_version: 1.5.2
|
54
50
|
signing_key:
|
55
51
|
specification_version: 3
|
56
52
|
summary: Provides a way to split queue put's into multiple seperate queue pulls
|
57
|
-
test_files:
|
53
|
+
test_files:
|
58
54
|
- test/helper.rb
|
59
55
|
- test/test_queue_bundle.rb
|