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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4c99be0433d92bea15d4c49896f356536455e944e7b11e2ae7f7ea53b3e7d1a
4
- data.tar.gz: 96a0b0d168ea82987e4e128263351c23dd80c390abed82d187e73393f0003b80
3
+ metadata.gz: d6c85e552706dd86fe493aadff36c1c3cc6d9115ab9ee7bbfd627b3d684a02bd
4
+ data.tar.gz: 7effa38f67de9456d748027f27544bbc4f07afacba671c505dd8d23645648572
5
5
  SHA512:
6
- metadata.gz: 2fadaf3620e2adad2931483ad3d6f1d379e3ab252872245c7cf1e3fe3133bfc2dda16ecb8f83632d4898fd850621d064393a84078edc0e2c62338cb67aecd080
7
- data.tar.gz: b28ac1e4864dc7c0d9ed8924132af7394b9144ec5a77a55e1d99ce2a3863209f8cb1967732dc628675bbc580ef252189c49891f473fd56ccbff00aca42464c50
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.pre.2]
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveRecordHostPool
4
- VERSION = "2.0.0.pre.2"
4
+ VERSION = "2.0.0"
5
5
  end
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.pre.2
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: 2023-11-21 00:00:00.000000000 Z
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: 1.3.1
73
+ version: '0'
74
74
  requirements: []
75
75
  rubygems_version: 3.0.3.1
76
76
  signing_key: