rails_multisite 1.1.1 → 1.1.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 996ac1e0d01f6f24f9d3ed47e89bca743b49b11c
|
4
|
+
data.tar.gz: f0bd440331fad84e9272b4e1727db7c3f12bf34a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1baf84b410cf26fcc2a053c2fb644d144125a87be633469d6113b114da8f7c8c18f1c5aa81abeb2788d6ff45ad0285b24469a480754119ceb3a05e92047a2f36
|
7
|
+
data.tar.gz: 070f97d29cba5729b71aeb5e2c159dd9b6ddb85c65d20cc6dfe10423496cbbda0f8dd1e5a2e4562ffa4b91f7992489ba6057d7b4ed812d89888b740eb3e5838e
|
@@ -20,7 +20,11 @@ module RailsMultisite
|
|
20
20
|
if opts[:db] == DEFAULT && (!defined?(@@default_spec) || !@@default_spec)
|
21
21
|
# don't do anything .. handled implicitly
|
22
22
|
else
|
23
|
-
spec = connection_spec(opts)
|
23
|
+
spec = connection_spec(opts)
|
24
|
+
if (!spec && opts[:raise_on_missing])
|
25
|
+
raise "ERROR: #{opts[:db]} not found!"
|
26
|
+
end
|
27
|
+
spec ||= @@default_spec
|
24
28
|
handler = nil
|
25
29
|
if spec != @@default_spec
|
26
30
|
handler = @@connection_handlers[spec]
|
@@ -16,8 +16,8 @@ module RailsMultisite
|
|
16
16
|
app.middleware.insert_after(ActionDispatch::Executor, RailsMultisite::ConnectionManagement)
|
17
17
|
app.middleware.delete(ActionDispatch::Executor)
|
18
18
|
|
19
|
-
if ENV['RAILS_DB']
|
20
|
-
ConnectionManagement.establish_connection(db: ENV['RAILS_DB'])
|
19
|
+
if ENV['RAILS_DB'].present?
|
20
|
+
ConnectionManagement.establish_connection(db: ENV['RAILS_DB'], raise_on_missing: true)
|
21
21
|
end
|
22
22
|
else
|
23
23
|
ConnectionManagement.set_current_db
|
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.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|