rails_multisite 1.0.4 → 1.0.5
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/README.md +1 -1
- data/lib/rails_multisite/connection_management.rb +3 -4
- data/lib/rails_multisite/formatter.rb +2 -0
- data/lib/rails_multisite/railtie.rb +1 -1
- data/lib/rails_multisite/version.rb +1 -1
- metadata +24 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7e2c205099ae33332f61e37a6d3f332a3c2ae53
|
4
|
+
data.tar.gz: 8d999119d228ae6fbff1034276f3182e668bec5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a63767fe5db853f5ae53722cd821847dbd86d947fcdd900c2f7bd2076e9a6f3613ef07a24a244c856b83f049c8d85f94061d34e8ba321d9a7632f69cca4013b
|
7
|
+
data.tar.gz: e975e2ca70ab0c9bfbdd4761c311cbd9dc8983788594cd77910ee2dfeba8e1eebb0d1bca0c195b5b50d43d85cb17417d82233147a47c7409764909b616e5ba7a
|
data/README.md
CHANGED
@@ -180,9 +180,8 @@ module RailsMultisite
|
|
180
180
|
v[:prepared_statements] = false if no_prepared_statements
|
181
181
|
end
|
182
182
|
|
183
|
-
|
184
|
-
|
185
|
-
end.flatten]
|
183
|
+
resolver = spec_klass::Resolver.new(configs)
|
184
|
+
@@db_spec_cache = Hash[*configs.map { |k, _| [k, resolver.spec(k.to_sym)] }.flatten]
|
186
185
|
|
187
186
|
@@host_spec_cache = {}
|
188
187
|
configs.each do |k,v|
|
@@ -192,7 +191,7 @@ module RailsMultisite
|
|
192
191
|
end
|
193
192
|
end
|
194
193
|
|
195
|
-
@@default_spec = spec_klass::Resolver.new(ActiveRecord::Base.configurations).spec(Rails.env)
|
194
|
+
@@default_spec = spec_klass::Resolver.new(ActiveRecord::Base.configurations).spec(Rails.env.to_sym)
|
196
195
|
ActiveRecord::Base.configurations[Rails.env]["host_names"].each do |host|
|
197
196
|
@@host_spec_cache[host] = @@default_spec
|
198
197
|
end
|
@@ -13,7 +13,7 @@ module RailsMultisite
|
|
13
13
|
app.middleware.insert_after(ActiveRecord::ConnectionAdapters::ConnectionManagement, RailsMultisite::ConnectionManagement)
|
14
14
|
app.middleware.delete(ActiveRecord::ConnectionAdapters::ConnectionManagement)
|
15
15
|
if ENV['RAILS_DB']
|
16
|
-
ConnectionManagement.establish_connection(:
|
16
|
+
ConnectionManagement.establish_connection(db: ENV['RAILS_DB'].to_sym)
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
metadata
CHANGED
@@ -1,15 +1,35 @@
|
|
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.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
12
|
-
dependencies:
|
11
|
+
date: 2016-11-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.2'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '5'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '4.2'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '5'
|
13
33
|
description: Multi tenancy support for Rails
|
14
34
|
email:
|
15
35
|
- sam.saffron@gmail.com
|
@@ -45,9 +65,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
45
65
|
version: '0'
|
46
66
|
requirements: []
|
47
67
|
rubyforge_project:
|
48
|
-
rubygems_version: 2.
|
68
|
+
rubygems_version: 2.6.7
|
49
69
|
signing_key:
|
50
70
|
specification_version: 4
|
51
71
|
summary: Multi tenancy support for Rails
|
52
72
|
test_files: []
|
53
|
-
has_rdoc:
|