gene_pool 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/History.md +5 -1
- data/lib/gene_pool.rb +2 -1
- metadata +45 -34
data/History.md
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
GenePool Changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
1.2.4 / 2012-09-05
|
5
|
+
|
6
|
+
- require 'thread' under ruby 1.8 so that mutex is defined (Thanks soupmatt!)
|
7
|
+
|
4
8
|
1.2.3 / 2012-02-23
|
5
9
|
|
6
|
-
- Allow setting of options[:close_proc] to nil
|
10
|
+
- Allow setting of options[:close_proc] to nil
|
7
11
|
|
8
12
|
1.2.2 / 2012-02-23
|
9
13
|
|
data/lib/gene_pool.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'logger'
|
2
|
+
require 'thread' if RUBY_VERSION < '1.9'
|
2
3
|
|
3
4
|
# Generic connection pool class
|
4
5
|
class GenePool
|
@@ -221,8 +222,8 @@ class GenePool
|
|
221
222
|
end
|
222
223
|
|
223
224
|
# Perform the given block for each connection. Note that close should be used for safely closing all connections
|
225
|
+
# This should probably only ever be used to allow interrupt of a connection that is checked out?
|
224
226
|
def each
|
225
|
-
# TBD: Should this be removed? This should probably only ever be used to allow interrupt of a connection that is checked out?
|
226
227
|
@mutex.synchronize do
|
227
228
|
@connections.each { |connection| yield connection }
|
228
229
|
end
|
metadata
CHANGED
@@ -1,56 +1,67 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: gene_pool
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.3
|
3
|
+
version: !ruby/object:Gem::Version
|
5
4
|
prerelease:
|
5
|
+
version: 1.2.4
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
- Brad Pardee
|
7
|
+
authors:
|
8
|
+
- Brad Pardee
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
12
|
+
|
13
|
+
date: 2012-09-06 00:00:00 Z
|
13
14
|
dependencies: []
|
15
|
+
|
14
16
|
description: Generic pooling library for creating a connection pool
|
15
|
-
email:
|
16
|
-
- bradpardee@gmail.com
|
17
|
+
email:
|
18
|
+
- bradpardee@gmail.com
|
17
19
|
executables: []
|
20
|
+
|
18
21
|
extensions: []
|
22
|
+
|
19
23
|
extra_rdoc_files: []
|
20
|
-
|
21
|
-
|
22
|
-
-
|
23
|
-
-
|
24
|
-
-
|
25
|
-
-
|
26
|
-
-
|
27
|
-
-
|
24
|
+
|
25
|
+
files:
|
26
|
+
- lib/gene_pool.rb
|
27
|
+
- LICENSE.txt
|
28
|
+
- Rakefile
|
29
|
+
- Gemfile
|
30
|
+
- History.md
|
31
|
+
- README.md
|
32
|
+
- test/gene_pool_test.rb
|
28
33
|
homepage: http://github.com/bpardee/gene_pool
|
29
34
|
licenses: []
|
35
|
+
|
30
36
|
post_install_message:
|
31
37
|
rdoc_options: []
|
32
|
-
|
33
|
-
|
34
|
-
|
38
|
+
|
39
|
+
require_paths:
|
40
|
+
- lib
|
41
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
35
42
|
none: false
|
36
|
-
requirements:
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
hash: 2
|
47
|
+
segments:
|
48
|
+
- 0
|
49
|
+
version: "0"
|
50
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
44
51
|
none: false
|
45
|
-
requirements:
|
46
|
-
|
47
|
-
|
48
|
-
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
hash: 2
|
56
|
+
segments:
|
57
|
+
- 0
|
58
|
+
version: "0"
|
49
59
|
requirements: []
|
60
|
+
|
50
61
|
rubyforge_project:
|
51
|
-
rubygems_version: 1.8.
|
62
|
+
rubygems_version: 1.8.9
|
52
63
|
signing_key:
|
53
64
|
specification_version: 3
|
54
65
|
summary: Generic pooling library for creating a connection pool
|
55
|
-
test_files:
|
56
|
-
- test/gene_pool_test.rb
|
66
|
+
test_files:
|
67
|
+
- test/gene_pool_test.rb
|