switchman 3.6.1 → 3.6.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7011fb3c1b2fdf36652a28d0a7f912e507068a7e7a725b041c24502fbf5d6aa
|
4
|
+
data.tar.gz: 71dffe2e2d7634032d0e6a7a6cf72d8be149d27ea63c532d0debe39f43f58e9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
7
|
-
|
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
|
data/lib/switchman/engine.rb
CHANGED
@@ -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.
|
82
|
+
::ActiveRecord::PendingMigrationConnection.singleton_class
|
83
|
+
.include(ActiveRecord::PendingMigrationConnection::ClassMethods)
|
83
84
|
end
|
84
85
|
|
85
86
|
::ActiveRecord::Reflection::AbstractReflection.include(ActiveRecord::Reflection::AbstractReflection)
|
data/lib/switchman/version.rb
CHANGED