active_record_host_pool 2.1.0 → 2.2.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: 0ba0aa0ff3c0b19e4895118e76f84cc57f46481baa482c59925946ecd56765bb
4
- data.tar.gz: e276dbda95168a03b511a5d7da14f94411ca7b8bc910ea2684631f25c9a22cf1
3
+ metadata.gz: cc285794dcf2d9fd3d54249bc94aea1a9ae64d76868040dc583aa669388cd444
4
+ data.tar.gz: fe57775f7b80266bddb5f019b48eb7f5a741a7a9f8e0858604e6a74e12df5501
5
5
  SHA512:
6
- metadata.gz: 5b455f5fd116f96035fa816b39e0baf7f698d885decece79fd213c690c07db6b2f54e2328d4fa8dab68c536e86b58a9261b3c1a4c8aa45ccf35c1cb7b237168e
7
- data.tar.gz: aa7295a9be8e2892ff34452de014ea7627255d58e6eccd6a0d4a18d3b03152adb18fb2e453df017a058eeaf26bf8d4a768db3e436cef7da498f69e03d5f50917
6
+ metadata.gz: 76037970cdd4288865b5e7e02d233d64699c60cc9054887465b21442e136da7f336d77623be76222ee45a75daac74b5e34581942793bf379fcb7df0b6229a4c4
7
+ data.tar.gz: e8ae94a9a9141891e5a4dbb0a61d08b13499546603b409f73d9a0de799112c68ca2705670a200c08cbb7ce3178135040808ac14323ac223afbc9519e21bff960
data/Changelog.md CHANGED
@@ -6,6 +6,19 @@ and as of v1.0.0 this project adheres to [Semantic Versioning](https://semver.or
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [2.2.0]
10
+ ### Removed
11
+ - Support for Ruby 3.0.
12
+
13
+ ### Added
14
+ - Rails 6.1 testing with Trilogy.
15
+
16
+ ### Fixed
17
+ - Fixed using ActiveRecordHostPool and the `activerecord-trilogy-adapter v3.1+`.
18
+
19
+ ### Changed
20
+ - ActiveRecordHostPool will now raise an exception if you try to use a version of `activerecord-trilogy-adapter < 3.1`.
21
+
9
22
  ## [2.1.0]
10
23
 
11
24
  ### Changed
@@ -7,7 +7,6 @@ when :trilogy
7
7
  case "#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}"
8
8
  when "6.1", "7.0"
9
9
  require "trilogy_adapter/connection"
10
- require "trilogy_adapter/errors"
11
10
  ActiveRecord::Base.extend(TrilogyAdapter::Connection)
12
11
  when "7.1"
13
12
  require "active_record/connection_adapters/trilogy_adapter"
@@ -29,7 +28,7 @@ module ActiveRecordHostPool
29
28
  @config[:database] = _host_pool_current_database
30
29
  end
31
30
 
32
- if ActiveRecord.version >= Gem::Version.new("7.1")
31
+ if ActiveRecord.version >= Gem::Version.new("7.1") || ActiveRecordHostPool.loaded_db_adapter == :trilogy
33
32
  # Patch `raw_execute` instead of `execute` since this commit:
34
33
  # https://github.com/rails/rails/commit/f69bbcbc0752ca5d5af327d55922614a26f5c7e9
35
34
  def raw_execute(...)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveRecordHostPool
4
- VERSION = "2.1.0"
4
+ VERSION = "2.2.0"
5
5
  end
@@ -15,7 +15,11 @@ if Gem.loaded_specs.include?("mysql2")
15
15
  ActiveRecordHostPool.loaded_db_adapter = :mysql2
16
16
  elsif Gem.loaded_specs.include?("trilogy")
17
17
  require "trilogy"
18
- require "activerecord-trilogy-adapter" if ActiveRecord.version < Gem::Version.new("7.1")
18
+ if ActiveRecord.version < Gem::Version.new("7.1")
19
+ require "activerecord-trilogy-adapter"
20
+ require "trilogy_adapter/version"
21
+ raise "ActiveRecordHostPool is only compatible with activerecord-trilogy-adapter v3.1+" if Gem::Version.new("3.1") > TrilogyAdapter::VERSION
22
+ end
19
23
  ActiveRecordHostPool.loaded_db_adapter = :trilogy
20
24
  end
21
25
 
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.1.0
4
+ version: 2.2.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: 2024-04-19 00:00:00.000000000 Z
14
+ date: 2024-07-22 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activerecord
@@ -20,9 +20,6 @@ dependencies:
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
22
  version: 6.1.0
23
- - - "<"
24
- - !ruby/object:Gem::Version
25
- version: '7.2'
26
23
  type: :runtime
27
24
  prerelease: false
28
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -30,9 +27,6 @@ dependencies:
30
27
  - - ">="
31
28
  - !ruby/object:Gem::Version
32
29
  version: 6.1.0
33
- - - "<"
34
- - !ruby/object:Gem::Version
35
- version: '7.2'
36
30
  description: ''
37
31
  email:
38
32
  - bquorning@zendesk.com
@@ -65,14 +59,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
65
59
  requirements:
66
60
  - - ">="
67
61
  - !ruby/object:Gem::Version
68
- version: 3.0.0
62
+ version: 3.1.0
69
63
  required_rubygems_version: !ruby/object:Gem::Requirement
70
64
  requirements:
71
65
  - - ">="
72
66
  - !ruby/object:Gem::Version
73
67
  version: '0'
74
68
  requirements: []
75
- rubygems_version: 3.5.3
69
+ rubygems_version: 3.5.11
76
70
  signing_key:
77
71
  specification_version: 4
78
72
  summary: Allow ActiveRecord to share a connection to multiple databases on the same