active_record_host_pool 2.0.0.pre.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +4 -1
- data/lib/active_record_host_pool/connection_proxy.rb +13 -0
- data/lib/active_record_host_pool/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6c85e552706dd86fe493aadff36c1c3cc6d9115ab9ee7bbfd627b3d684a02bd
|
4
|
+
data.tar.gz: 7effa38f67de9456d748027f27544bbc4f07afacba671c505dd8d23645648572
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8119ce55b8f44d7e29f195228c7055c1fe3c771916fc3ff31cc51e2db3ed7064c14db2424b6fdebf0a0a086e894cfb33faa97d87f1a16d272bff54957d3e20b0
|
7
|
+
data.tar.gz: 885cb1e3676d698f93394eb8686af27d5b2d2f2d194f3e533a3a20f3272678a08caf92d6819d08002c989f637430f8eb4d9fddd66d5bbbdccafbbd006da44c57
|
data/Changelog.md
CHANGED
@@ -6,7 +6,7 @@ and as of v1.0.0 this project adheres to [Semantic Versioning](https://semver.or
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
-
## [2.0.0
|
9
|
+
## [2.0.0]
|
10
10
|
|
11
11
|
### Added
|
12
12
|
- Add support for Rails 7.1.
|
@@ -16,6 +16,9 @@ and as of v1.0.0 this project adheres to [Semantic Versioning](https://semver.or
|
|
16
16
|
- Remove `mysql2` as a direct dependency, test Rails 7.0 with `mysql2` and `activerecord-trilogy-adapter`.
|
17
17
|
- Remove support for Rails 5.1, 5.2, and 6.0.
|
18
18
|
|
19
|
+
### Fixed
|
20
|
+
- Implement equality for connection proxies to consider database; allows fixture loading for different databases
|
21
|
+
|
19
22
|
## [1.2.5] - 2023-07-14
|
20
23
|
### Added
|
21
24
|
- Start testing with Ruby 3.2.
|
@@ -6,6 +6,7 @@ require "delegate"
|
|
6
6
|
# for each call to the connection. upon executing a statement, the connection will switch to that database.
|
7
7
|
module ActiveRecordHostPool
|
8
8
|
class ConnectionProxy < Delegator
|
9
|
+
attr_reader :database
|
9
10
|
def initialize(cx, database)
|
10
11
|
super(cx)
|
11
12
|
@cx = cx
|
@@ -52,6 +53,18 @@ module ActiveRecordHostPool
|
|
52
53
|
end
|
53
54
|
ruby2_keywords :send if respond_to?(:ruby2_keywords, true)
|
54
55
|
|
56
|
+
def ==(other)
|
57
|
+
self.class == other.class &&
|
58
|
+
other.respond_to?(:unproxied) && @cx == other.unproxied &&
|
59
|
+
other.respond_to?(:database) && @database == other.database
|
60
|
+
end
|
61
|
+
|
62
|
+
alias_method :eql?, :==
|
63
|
+
|
64
|
+
def hash
|
65
|
+
[self.class, @cx, @database].hash
|
66
|
+
end
|
67
|
+
|
55
68
|
private
|
56
69
|
|
57
70
|
def select(*args)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record_host_pool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Quorning
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2024-01-08 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activerecord
|
@@ -68,9 +68,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
68
68
|
version: 2.7.0
|
69
69
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
|
-
- - "
|
71
|
+
- - ">="
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version:
|
73
|
+
version: '0'
|
74
74
|
requirements: []
|
75
75
|
rubygems_version: 3.0.3.1
|
76
76
|
signing_key:
|