rails_multisite 1.0.6 → 1.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rails_multisite might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/rails_multisite/connection_management.rb +12 -2
- data/lib/rails_multisite/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 958eecb6498ade6f581642320bf1e23c84dbc0ba
|
4
|
+
data.tar.gz: ed8b705c788f25a4d937aec1bae318e70aab7a12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de54734d1edddcb516525bcd55b4906fc71c85a7a0e00832c7d88abe247ad2cffa98268c926c09600309633b13296e844f8eb7d86905c188558c8e0da9bf6940
|
7
|
+
data.tar.gz: 7d1ca0c110e48f18e99a31997ed6f4ba93f28629163e9f56753d3bc7e9d12620168add8af264fbfd5aba1b919c22dedca1da85758a924066bb7c5d13175190a0
|
@@ -24,13 +24,13 @@ module RailsMultisite
|
|
24
24
|
handler = @@connection_handlers[spec]
|
25
25
|
unless handler
|
26
26
|
handler = ActiveRecord::ConnectionAdapters::ConnectionHandler.new
|
27
|
-
|
27
|
+
self.handler_establish_connection(handler, spec)
|
28
28
|
@@connection_handlers[spec] = handler
|
29
29
|
end
|
30
30
|
else
|
31
31
|
handler = @@default_connection_handler
|
32
32
|
if !@@established_default
|
33
|
-
|
33
|
+
self.handler_establish_connection(handler, spec)
|
34
34
|
@@established_default = true
|
35
35
|
end
|
36
36
|
end
|
@@ -237,5 +237,15 @@ module RailsMultisite
|
|
237
237
|
end
|
238
238
|
end
|
239
239
|
|
240
|
+
private
|
241
|
+
|
242
|
+
def self.handler_establish_connection(handler, spec)
|
243
|
+
if Rails::VERSION::MAJOR >= 5
|
244
|
+
handler.establish_connection(spec.config)
|
245
|
+
else
|
246
|
+
handler.establish_connection(ActiveRecord::Base, spec)
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
240
250
|
end
|
241
251
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_multisite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.1.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '4.2'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '6'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '4.2'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '6'
|
33
33
|
description: Multi tenancy support for Rails
|
34
34
|
email:
|
35
35
|
- sam.saffron@gmail.com
|
@@ -60,12 +60,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
60
60
|
version: '0'
|
61
61
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
62
|
requirements:
|
63
|
-
- - "
|
63
|
+
- - ">"
|
64
64
|
- !ruby/object:Gem::Version
|
65
|
-
version:
|
65
|
+
version: 1.3.1
|
66
66
|
requirements: []
|
67
67
|
rubyforge_project:
|
68
|
-
rubygems_version: 2.
|
68
|
+
rubygems_version: 2.6.11
|
69
69
|
signing_key:
|
70
70
|
specification_version: 4
|
71
71
|
summary: Multi tenancy support for Rails
|