work_queue 2.5.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +6 -6
- data/lib/work_queue.rb +2 -2
- metadata +4 -4
data/README.rdoc
CHANGED
@@ -46,12 +46,12 @@ Download multiple files in parallel:
|
|
46
46
|
wq = WorkQueue.new 5
|
47
47
|
|
48
48
|
(1..6605).each do |number|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
49
|
+
wq.enqueue_b do
|
50
|
+
open("rfc#{number}.txt", "wb") do |file|
|
51
|
+
file.write open("http://www.rfc-editor.org/rfc/rfc#{number}.txt").read
|
52
|
+
puts "rfc#{number} downloaded"
|
53
|
+
end
|
54
|
+
end
|
55
55
|
end
|
56
56
|
|
57
57
|
wq.join
|
data/lib/work_queue.rb
CHANGED
@@ -9,7 +9,7 @@ require 'monitor'
|
|
9
9
|
# This file contains an implementation of a work queue structure.
|
10
10
|
#
|
11
11
|
# == Version
|
12
|
-
# 2.5.
|
12
|
+
# 2.5.1
|
13
13
|
#
|
14
14
|
# == Author
|
15
15
|
# Miguel Fonseca <contact@miguelfonseca.com>
|
@@ -22,7 +22,7 @@ require 'monitor'
|
|
22
22
|
#
|
23
23
|
|
24
24
|
class WorkQueue
|
25
|
-
VERSION = "2.5.
|
25
|
+
VERSION = "2.5.1"
|
26
26
|
|
27
27
|
##
|
28
28
|
# Creates a new work queue with the desired parameters.
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: work_queue
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 2.5.
|
9
|
+
- 1
|
10
|
+
version: 2.5.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Miguel Fonseca
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-04-
|
18
|
+
date: 2012-04-20 00:00:00 Z
|
19
19
|
dependencies: []
|
20
20
|
|
21
21
|
description:
|