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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0af12e8d2f551b932ee863a1385ddc9a3f3140fff886cacaca25298a4c21d218
4
- data.tar.gz: 16bd7b78d7b35337d35befe063ceeb2cb749dfc9e68cd373e7f76bd856f6cba3
3
+ metadata.gz: '0993b72c233b027a1229d532a126b4a1623ef3f146a7b56502c539084f9a228d'
4
+ data.tar.gz: 274efa04fc445ca0044f62da29484a4ee9fb5e02b5f213fb873fedfd63cadff0
5
5
  SHA512:
6
- metadata.gz: edb345021997307fe736408ad3e3cbebd2ce86fcbdc636fe2d4f03d61258ecea22285a4f91e854d43631533513d6500c9f6cf2094f52d6756a2d61ee2daba256
7
- data.tar.gz: d58d7519b9d4be9bcf7b0628e2aa9d937df2d61d0d1a9423b43618685adf242810256b9decc22bca90cb3ee3eec88e8eabffb409aa9e49f28d56815f26056b81
6
+ metadata.gz: 17c5bea167386115e8672b394138e0f66b55e6371b803dcfee7be08e51c84353aa9cd0257f169ae04053bc95be6b0c9b06576579f4915e68271146b1c9d602a5
7
+ data.tar.gz: 4eeccb9eaf397e8e386a41f81005b10d43d7441297661ab0d7656b6be30ac7ff1e751a95ed5c5b5a412124a29a0af3f5c90ae2882d70d3fa29d9dc8b2df412e3
@@ -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", "truffleruby"]
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
@@ -1,5 +1,10 @@
1
1
  # connection_pool Changelog
2
2
 
3
+ 2.2.5
4
+ ------
5
+
6
+ - Fix argument forwarding on Ruby 2.7 [#149]
7
+
3
8
  2.2.4
4
9
  ------
5
10
 
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  connection\_pool
2
2
  =================
3
- [![Build Status](https://travis-ci.org/mperham/connection_pool.svg)](https://travis-ci.org/mperham/connection_pool)
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
 
@@ -1,3 +1,3 @@
1
1
  class ConnectionPool
2
- VERSION = "2.2.4"
2
+ VERSION = "2.2.5"
3
3
  end
@@ -32,12 +32,18 @@ class ConnectionPool
32
32
 
33
33
  # rubocop:disable Style/MethodMissingSuper
34
34
  # rubocop:disable Style/MissingRespondToMissing
35
- if ::RUBY_VERSION >= "2.7.0"
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
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 00:00:00.000000000 Z
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.2.3
98
+ rubygems_version: 3.1.4
99
99
  signing_key:
100
100
  specification_version: 4
101
101
  summary: Generic connection pool for Ruby