switchman 3.6.1 → 3.6.2

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: 30e02a7b02e23693a5bab2272c0d51d452ca8f22aac18bf869c68280a002a333
4
- data.tar.gz: c6e252c1c8fae37d78d801f446ebb6ddeb83c82b89690eda4bff7f8157e93c07
3
+ metadata.gz: c7011fb3c1b2fdf36652a28d0a7f912e507068a7e7a725b041c24502fbf5d6aa
4
+ data.tar.gz: 71dffe2e2d7634032d0e6a7a6cf72d8be149d27ea63c532d0debe39f43f58e9c
5
5
  SHA512:
6
- metadata.gz: 2ad549fbd26947a8ae1fc61e966741d1541b767429be8f4c3c57b1955390bbab2481629e88450ad31ea6d8ae219801713740841c70a07283028c7ccbcfd60caf
7
- data.tar.gz: 9f2481438cdc6d232e758174f405aeb641c1d02467172679cd2cb72ea4cd18569c0a00c626e9514de4dadd76cca2cc7c72dd80e28287e60e9bdd2c2632360021
6
+ metadata.gz: 1f0274a7d8f60ce1914747073a238411f5583b41daa08d1590db7795b0d2f877a54e1608942103ecb8c3c1d4e6adb8865be22adf4be86dc1643c75db1f2f60af
7
+ data.tar.gz: ecff381064d9c71e014cdc1739b09b742ec3c3a134f48b547aa410aedb5dd0e8e2ef22c57a132e705d69115dbeefed24984b7cacdaf33c7a452373cd0f370407
@@ -3,8 +3,14 @@
3
3
  module Switchman
4
4
  module ActiveRecord
5
5
  module PendingMigrationConnection
6
- def self.current_switchman_shard
7
- ::ActiveRecord::Base.current_switchman_shard
6
+ module ClassMethods
7
+ def current_role
8
+ ::ActiveRecord::Base.current_role
9
+ end
10
+
11
+ def current_switchman_shard
12
+ ::ActiveRecord::Base.current_switchman_shard
13
+ end
8
14
  end
9
15
  end
10
16
  end
@@ -79,7 +79,8 @@ module Switchman
79
79
  ::ActiveRecord::Migrator.prepend(ActiveRecord::Migrator)
80
80
 
81
81
  if ::Rails.version > "7.1.3"
82
- ::ActiveRecord::PendingMigrationConnection.include(ActiveRecord::PendingMigrationConnection)
82
+ ::ActiveRecord::PendingMigrationConnection.singleton_class
83
+ .include(ActiveRecord::PendingMigrationConnection::ClassMethods)
83
84
  end
84
85
 
85
86
  ::ActiveRecord::Reflection::AbstractReflection.include(ActiveRecord::Reflection::AbstractReflection)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Switchman
4
- VERSION = "3.6.1"
4
+ VERSION = "3.6.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: switchman
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.1
4
+ version: 3.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer