distribute_reads 1.1.0 → 1.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 36b8a9d3d95b5a8437e4af916ad0f35b90b13ad33b18a839fdb9ec4cf841f420
4
- data.tar.gz: 026a081ed28190c4bbe363eb5695c8759df2cb547741db588bf882f4f2003eb7
3
+ metadata.gz: 9a43321a7a1a24c19fe118b6ad299596b2594677492d3d502486bb4ae7f36131
4
+ data.tar.gz: 8e3443a8b1090e39f5b84c00889119885029afbe9c59b655c99f62fd837588ae
5
5
  SHA512:
6
- metadata.gz: c85dec0ba2da8cdf3b9be2bb6e3a81d26380effe378fc7fa9dca116b3daafe4d9f5dc411612067848aec1bacf2a825ede4eada74bbb275f7fa0e40138a77b814
7
- data.tar.gz: 8f98d172b59c0db79defd693bca174774df081bf96d30d07ab45a6d5b0078912c4c4f17147970e17ea79ed79a68c4ed6c52b15b51aec1d10cdd393a20e9e8adb
6
+ metadata.gz: 81186ba1595219307d435acb20544d4f6c993cf3de552040ab4b4858d62350baa19b2f04b0db1772d17819045a1d27b660cd4bdf7dee306cd0639d420560b2dc
7
+ data.tar.gz: a02f26a874cceb05ef1b410bbb94dbcd575087fdb3d08a436691792af53ee0d03f091d15d1b165d94352101c3446ed1c5469a29e49da42e6423dcca5de051e98
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.1.1 (2026-10-27)
2
+
3
+ - Fixed connection leasing for ActiveRecordProxyAdapters 0.11.1
4
+
1
5
  ## 1.1.0 (2026-04-01)
2
6
 
3
7
  - Dropped support for Ruby < 3.3 and Active Record < 7.2
data/README.md CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  Scale database reads to replicas in Rails
4
4
 
5
- **Distribute Reads 1.0 was recently released** - see [how to upgrade](#upgrading)
6
-
7
5
  :tangerine: Battle-tested at [Instacart](https://www.instacart.com/opensource) with [Makara](https://github.com/instacart/makara)
8
6
 
9
7
  [![Build Status](https://github.com/ankane/distribute_reads/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/distribute_reads/actions)
@@ -34,8 +34,14 @@ module DistributeReads
34
34
  end
35
35
 
36
36
  # defer error handling to connection_for
37
- def checkout_replica_connection
38
- replica_pool.checkout(proxy_checkout_timeout)
37
+ if Gem::Version.new(ActiveRecordProxyAdapters::VERSION) >= Gem::Version.new("0.11.1")
38
+ def checkout_replica_connection
39
+ replica_pool.lease_connection
40
+ end
41
+ else
42
+ def checkout_replica_connection
43
+ replica_pool.checkout(proxy_checkout_timeout)
44
+ end
39
45
  end
40
46
 
41
47
  def update_primary_latest_write_timestamp(...)
@@ -1,3 +1,3 @@
1
1
  module DistributeReads
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
@@ -1,6 +1,7 @@
1
1
  # dependencies
2
2
  require "active_support"
3
3
  require "active_record_proxy_adapters"
4
+ require "active_record_proxy_adapters/version"
4
5
 
5
6
  # modules
6
7
  require_relative "distribute_reads/appropriate_pool"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: distribute_reads
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  requirements: []
71
- rubygems_version: 4.0.6
71
+ rubygems_version: 4.0.20
72
72
  specification_version: 4
73
73
  summary: Scale database reads with replicas in Rails
74
74
  test_files: []