connection_pool 2.2.4 → 2.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +6 -1
- data/Changes.md +5 -0
- data/README.md +1 -1
- data/lib/connection_pool/version.rb +1 -1
- data/lib/connection_pool/wrapper.rb +7 -1
- data/test/test_connection_pool.rb +7 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0993b72c233b027a1229d532a126b4a1623ef3f146a7b56502c539084f9a228d'
|
4
|
+
data.tar.gz: 274efa04fc445ca0044f62da29484a4ee9fb5e02b5f213fb873fedfd63cadff0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17c5bea167386115e8672b394138e0f66b55e6371b803dcfee7be08e51c84353aa9cd0257f169ae04053bc95be6b0c9b06576579f4915e68271146b1c9d602a5
|
7
|
+
data.tar.gz: 4eeccb9eaf397e8e386a41f81005b10d43d7441297661ab0d7656b6be30ac7ff1e751a95ed5c5b5a412124a29a0af3f5c90ae2882d70d3fa29d9dc8b2df412e3
|
data/.github/workflows/ci.yml
CHANGED
@@ -5,10 +5,15 @@ on: [push, pull_request]
|
|
5
5
|
jobs:
|
6
6
|
test:
|
7
7
|
runs-on: ubuntu-latest
|
8
|
+
continue-on-error: ${{ matrix.experimental }}
|
8
9
|
strategy:
|
9
10
|
fail-fast: false
|
10
11
|
matrix:
|
11
|
-
ruby: ["2.4", "2.5", "2.6", "2.7", "3.0", "jruby"
|
12
|
+
ruby: ["2.4", "2.5", "2.6", "2.7", "3.0", "jruby"]
|
13
|
+
experimental: [false]
|
14
|
+
include:
|
15
|
+
- ruby: "truffleruby"
|
16
|
+
experimental: true
|
12
17
|
steps:
|
13
18
|
- uses: actions/checkout@v2
|
14
19
|
- uses: ruby/setup-ruby@v1
|
data/Changes.md
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
connection\_pool
|
2
2
|
=================
|
3
|
-
[![Build Status](https://
|
3
|
+
[![Build Status](https://github.com/mperham/connection_pool/actions/workflows/ci.yml/badge.svg)](https://github.com/mperham/connection_pool/actions/workflows/ci.yml)
|
4
4
|
|
5
5
|
Generic connection pooling for Ruby.
|
6
6
|
|
@@ -32,12 +32,18 @@ class ConnectionPool
|
|
32
32
|
|
33
33
|
# rubocop:disable Style/MethodMissingSuper
|
34
34
|
# rubocop:disable Style/MissingRespondToMissing
|
35
|
-
if ::RUBY_VERSION >= "
|
35
|
+
if ::RUBY_VERSION >= "3.0.0"
|
36
36
|
def method_missing(name, *args, **kwargs, &block)
|
37
37
|
with do |connection|
|
38
38
|
connection.send(name, *args, **kwargs, &block)
|
39
39
|
end
|
40
40
|
end
|
41
|
+
elsif ::RUBY_VERSION >= "2.7.0"
|
42
|
+
ruby2_keywords def method_missing(name, *args, &block)
|
43
|
+
with do |connection|
|
44
|
+
connection.send(name, *args, &block)
|
45
|
+
end
|
46
|
+
end
|
41
47
|
else
|
42
48
|
def method_missing(name, *args, &block)
|
43
49
|
with do |connection|
|
@@ -14,6 +14,12 @@ class TestConnectionPool < Minitest::Test
|
|
14
14
|
@x
|
15
15
|
end
|
16
16
|
|
17
|
+
def do_something_with_positional_hash(options)
|
18
|
+
@x += options[:increment] || 1
|
19
|
+
sleep SLEEP_TIME
|
20
|
+
@x
|
21
|
+
end
|
22
|
+
|
17
23
|
def fast
|
18
24
|
@x += 1
|
19
25
|
end
|
@@ -333,6 +339,7 @@ class TestConnectionPool < Minitest::Test
|
|
333
339
|
assert_equal 5, pool.do_something_with_block { 3 }
|
334
340
|
assert_equal 6, pool.with { |net| net.fast }
|
335
341
|
assert_equal 8, pool.do_something(increment: 2)
|
342
|
+
assert_equal 10, pool.do_something_with_positional_hash({ increment: 2, symbol_key: 3, "string_key" => 4 })
|
336
343
|
end
|
337
344
|
|
338
345
|
def test_passthru_respond_to
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: connection_pool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Perham
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-04-
|
12
|
+
date: 2021-04-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
requirements: []
|
98
|
-
rubygems_version: 3.
|
98
|
+
rubygems_version: 3.1.4
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
101
|
summary: Generic connection pool for Ruby
|