rails_multisite 4.0.1 → 5.0.1
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9b49ebb943b1cf7656cce41a93e6100b50159a5c7e389ef9629247b385b38c94
|
|
4
|
+
data.tar.gz: 93e51dcd1d7e91056e5643dc2b6220397e8c2672ed267aef342ebbb27efe15a1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 430d520b818f54f3b78eef444bc929542149c17852041ae42bd221d47188dacf927fead066ec49feae6c776d1ad2446c6ec27dae60a7d4e7e2758f407ec64921
|
|
7
|
+
data.tar.gz: adac4e78e18303464728db9b26f5124f4ebcf01ebf5081e8aa15d7a8103464b46ab0698facefe0d668e78e34600282cc74e53ba93a0de0ac1909b4db44d9e60d
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module RailsMultisite
|
|
4
|
+
class ConnectionManagement
|
|
5
|
+
class NullInstance
|
|
6
|
+
include Singleton
|
|
7
|
+
|
|
8
|
+
def clear_settings!
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def config_filename
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def default_connection_handler=(_connection_handler)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def establish_connection(_opts)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def reload
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def all_dbs
|
|
24
|
+
[DEFAULT]
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def connection_spec(_opts)
|
|
28
|
+
ConnectionSpecification.current
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def current_db
|
|
32
|
+
DEFAULT
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def each_connection(_opts = nil, &blk)
|
|
36
|
+
with_connection(&blk)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def has_db?(db)
|
|
40
|
+
db == DEFAULT
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def host(env)
|
|
44
|
+
env["HTTP_HOST"]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def with_connection(db = DEFAULT, &blk)
|
|
48
|
+
connected = ActiveRecord::Base.connection_pool.connected?
|
|
49
|
+
result = blk.call(db)
|
|
50
|
+
unless connected
|
|
51
|
+
ActiveRecord::Base.connection_handler.clear_active_connections!
|
|
52
|
+
end
|
|
53
|
+
result
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def with_hostname(hostname, &blk)
|
|
57
|
+
blk.call(hostname)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -1,173 +1,94 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
if Rails.version >=
|
|
4
|
-
require
|
|
3
|
+
if Rails.version >= "6.1"
|
|
4
|
+
require "rails_multisite/connection_management/rails_61_compat"
|
|
5
5
|
else
|
|
6
|
-
require
|
|
6
|
+
require "rails_multisite/connection_management/rails_60_compat"
|
|
7
7
|
end
|
|
8
|
+
require "rails_multisite/connection_management/null_instance"
|
|
8
9
|
|
|
9
10
|
module RailsMultisite
|
|
10
11
|
class ConnectionManagement
|
|
11
|
-
DEFAULT =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
DEFAULT = "default"
|
|
13
|
+
|
|
14
|
+
cattr_accessor :connection_handlers, default: {}
|
|
15
|
+
|
|
16
|
+
attr_reader :config_filename, :db_spec_cache
|
|
17
|
+
|
|
18
|
+
class << self
|
|
19
|
+
attr_accessor :asset_hostnames
|
|
20
|
+
|
|
21
|
+
delegate :all_dbs,
|
|
22
|
+
:config_filename,
|
|
23
|
+
:connection_spec,
|
|
24
|
+
:current_db,
|
|
25
|
+
:default_connection_handler=,
|
|
26
|
+
:each_connection,
|
|
27
|
+
:establish_connection,
|
|
28
|
+
:has_db?,
|
|
29
|
+
:host,
|
|
30
|
+
:reload,
|
|
31
|
+
:with_connection,
|
|
32
|
+
:with_hostname,
|
|
33
|
+
to: :instance
|
|
34
|
+
|
|
35
|
+
def default_config_filename
|
|
36
|
+
File.absolute_path(Rails.root.to_s + "/config/multisite.yml")
|
|
20
37
|
end
|
|
21
38
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
def self.load_settings!
|
|
26
|
-
# no op only here backwards compat
|
|
27
|
-
STDERR.puts "RailsMultisite::ConnectionManagement.load_settings! is deprecated"
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
def self.instance
|
|
31
|
-
@instance
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
def self.config_filename=(config_filename)
|
|
35
|
-
if config_filename.nil?
|
|
39
|
+
def clear_settings!
|
|
40
|
+
instance.clear_settings!
|
|
36
41
|
@instance = nil
|
|
37
|
-
else
|
|
38
|
-
@instance = new(config_filename)
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
def self.asset_hostnames
|
|
43
|
-
@asset_hostnames
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
def self.asset_hostnames=(h)
|
|
47
|
-
@asset_hostnames = h
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
def self.config_filename
|
|
51
|
-
@instance.config_filename
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
def self.reload
|
|
55
|
-
@instance.reload
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
def self.has_db?(db)
|
|
59
|
-
return true if db == DEFAULT
|
|
60
|
-
!!(@instance && @instance.has_db?(db))
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
def self.establish_connection(opts)
|
|
64
|
-
@instance.establish_connection(opts) if @instance
|
|
65
|
-
end
|
|
66
|
-
|
|
67
|
-
def self.with_hostname(hostname, &blk)
|
|
68
|
-
if @instance
|
|
69
|
-
@instance.with_hostname(hostname, &blk)
|
|
70
|
-
else
|
|
71
|
-
blk.call hostname
|
|
72
42
|
end
|
|
73
|
-
end
|
|
74
43
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
else
|
|
79
|
-
connected = ActiveRecord::Base.connection_pool.connected?
|
|
80
|
-
result = blk.call db
|
|
81
|
-
ActiveRecord::Base.clear_active_connections! unless connected
|
|
82
|
-
result
|
|
44
|
+
def load_settings!
|
|
45
|
+
# no op only here backwards compat
|
|
46
|
+
STDERR.puts "RailsMultisite::ConnectionManagement.load_settings! is deprecated"
|
|
83
47
|
end
|
|
84
|
-
end
|
|
85
48
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
@instance.each_connection(opts, &blk)
|
|
89
|
-
else
|
|
90
|
-
with_connection(&blk)
|
|
49
|
+
def instance
|
|
50
|
+
@instance || NullInstance.instance
|
|
91
51
|
end
|
|
92
|
-
end
|
|
93
52
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
def self.current_db
|
|
103
|
-
if @instance
|
|
104
|
-
instance.current_db
|
|
105
|
-
else
|
|
106
|
-
DEFAULT
|
|
107
|
-
end
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
def self.current_hostname
|
|
111
|
-
current_db_hostnames.first
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
def self.current_db_hostnames
|
|
115
|
-
config = (@instance&.connection_spec(db: current_db) || ConnectionSpecification.current).config
|
|
116
|
-
config[:host_names].nil? ? [config[:host]] : config[:host_names]
|
|
117
|
-
end
|
|
118
|
-
|
|
119
|
-
def self.connection_spec(opts)
|
|
120
|
-
if @instance
|
|
121
|
-
@instance.connection_spec(opts)
|
|
122
|
-
else
|
|
123
|
-
ConnectionSpecification.current
|
|
53
|
+
def config_filename=(config_filename)
|
|
54
|
+
if config_filename.blank?
|
|
55
|
+
@instance = nil
|
|
56
|
+
else
|
|
57
|
+
@instance = new(config_filename)
|
|
58
|
+
end
|
|
124
59
|
end
|
|
125
|
-
end
|
|
126
60
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
@instance.host(env)
|
|
130
|
-
else
|
|
131
|
-
env["HTTP_HOST"]
|
|
61
|
+
def current_hostname
|
|
62
|
+
current_db_hostnames.first
|
|
132
63
|
end
|
|
133
|
-
end
|
|
134
64
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
end
|
|
65
|
+
def current_db_hostnames
|
|
66
|
+
config =
|
|
67
|
+
(
|
|
68
|
+
connection_spec(db: current_db) || ConnectionSpecification.current
|
|
69
|
+
).config
|
|
70
|
+
config[:host_names] || [config[:host]]
|
|
142
71
|
end
|
|
143
72
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
73
|
+
def handler_key(spec)
|
|
74
|
+
@handler_key_suffix ||=
|
|
75
|
+
begin
|
|
76
|
+
if ActiveRecord.respond_to?(:writing_role)
|
|
77
|
+
"_#{ActiveRecord.writing_role}"
|
|
78
|
+
elsif ActiveRecord::Base.respond_to?(:writing_role)
|
|
79
|
+
"_#{ActiveRecord::Base.writing_role}"
|
|
80
|
+
else
|
|
81
|
+
""
|
|
82
|
+
end
|
|
83
|
+
end
|
|
152
84
|
|
|
153
|
-
@
|
|
85
|
+
:"#{spec.name}#{@handler_key_suffix}"
|
|
154
86
|
end
|
|
155
87
|
end
|
|
156
88
|
|
|
157
|
-
attr_reader :config_filename, :db_spec_cache, :connection_handlers
|
|
158
|
-
attr_writer :default_connection_handler
|
|
159
|
-
|
|
160
89
|
def initialize(config_filename)
|
|
161
90
|
@config_filename = config_filename
|
|
162
91
|
|
|
163
|
-
@connection_handlers = begin
|
|
164
|
-
if ActiveRecord::Base.respond_to?(:connection_handlers)
|
|
165
|
-
ActiveRecord::Base.connection_handlers
|
|
166
|
-
else
|
|
167
|
-
{}
|
|
168
|
-
end
|
|
169
|
-
end
|
|
170
|
-
|
|
171
92
|
@db_spec_cache = {}
|
|
172
93
|
@default_spec = ConnectionSpecification.default
|
|
173
94
|
@default_connection_handler = ActiveRecord::Base.connection_handler
|
|
@@ -178,12 +99,15 @@ module RailsMultisite
|
|
|
178
99
|
end
|
|
179
100
|
|
|
180
101
|
def load_config!
|
|
181
|
-
configs = YAML.safe_load(File.open(
|
|
102
|
+
configs = YAML.safe_load(File.open(config_filename))
|
|
182
103
|
|
|
183
|
-
no_prepared_statements =
|
|
104
|
+
no_prepared_statements =
|
|
105
|
+
@default_spec.config[:prepared_statements] == false
|
|
184
106
|
|
|
185
107
|
configs.each do |k, v|
|
|
186
|
-
|
|
108
|
+
if k == DEFAULT
|
|
109
|
+
raise ArgumentError.new("Please do not name any db default!")
|
|
110
|
+
end
|
|
187
111
|
v[:db_key] = k
|
|
188
112
|
v[:prepared_statements] = false if no_prepared_statements
|
|
189
113
|
end
|
|
@@ -192,8 +116,8 @@ module RailsMultisite
|
|
|
192
116
|
new_db_spec_cache = ConnectionSpecification.db_spec_cache(configs)
|
|
193
117
|
new_db_spec_cache.each do |k, v|
|
|
194
118
|
# If spec already existed, use the old version
|
|
195
|
-
if v&.to_hash ==
|
|
196
|
-
new_db_spec_cache[k] =
|
|
119
|
+
if v&.to_hash == db_spec_cache[k]&.to_hash
|
|
120
|
+
new_db_spec_cache[k] = db_spec_cache[k]
|
|
197
121
|
end
|
|
198
122
|
end
|
|
199
123
|
|
|
@@ -211,25 +135,22 @@ module RailsMultisite
|
|
|
211
135
|
new_host_spec_cache[host] = @default_spec
|
|
212
136
|
end
|
|
213
137
|
|
|
214
|
-
removed_dbs =
|
|
215
|
-
removed_specs =
|
|
138
|
+
removed_dbs = db_spec_cache.keys - new_db_spec_cache.keys
|
|
139
|
+
removed_specs = db_spec_cache.values_at(*removed_dbs)
|
|
216
140
|
|
|
217
141
|
@host_spec_cache = new_host_spec_cache
|
|
218
142
|
@db_spec_cache = new_db_spec_cache
|
|
219
143
|
|
|
220
144
|
# Clean up connection handler cache.
|
|
221
|
-
removed_specs.each { |s|
|
|
145
|
+
removed_specs.each { |s| connection_handlers.delete(handler_key(s)) }
|
|
222
146
|
end
|
|
223
147
|
|
|
224
148
|
def reload
|
|
225
|
-
@reload_mutex.synchronize
|
|
226
|
-
load_config!
|
|
227
|
-
end
|
|
149
|
+
@reload_mutex.synchronize { load_config! }
|
|
228
150
|
end
|
|
229
151
|
|
|
230
152
|
def has_db?(db)
|
|
231
|
-
|
|
232
|
-
@db_spec_cache[db]
|
|
153
|
+
db == DEFAULT || !!db_spec_cache[db]
|
|
233
154
|
end
|
|
234
155
|
|
|
235
156
|
def establish_connection(opts)
|
|
@@ -246,11 +167,11 @@ module RailsMultisite
|
|
|
246
167
|
spec ||= @default_spec
|
|
247
168
|
handler = nil
|
|
248
169
|
if spec != @default_spec
|
|
249
|
-
handler =
|
|
170
|
+
handler = connection_handlers[handler_key(spec)]
|
|
250
171
|
unless handler
|
|
251
172
|
handler = ActiveRecord::ConnectionAdapters::ConnectionHandler.new
|
|
252
|
-
|
|
253
|
-
|
|
173
|
+
handler.establish_connection(spec.config)
|
|
174
|
+
connection_handlers[handler_key(spec)] = handler
|
|
254
175
|
end
|
|
255
176
|
else
|
|
256
177
|
handler = @default_connection_handler
|
|
@@ -270,7 +191,9 @@ module RailsMultisite
|
|
|
270
191
|
ActiveRecord::Base.connection_handler.clear_active_connections!
|
|
271
192
|
|
|
272
193
|
establish_connection(host: old)
|
|
273
|
-
|
|
194
|
+
unless connected
|
|
195
|
+
ActiveRecord::Base.connection_handler.clear_active_connections!
|
|
196
|
+
end
|
|
274
197
|
end
|
|
275
198
|
|
|
276
199
|
rval
|
|
@@ -287,14 +210,15 @@ module RailsMultisite
|
|
|
287
210
|
ActiveRecord::Base.connection_handler.clear_active_connections!
|
|
288
211
|
|
|
289
212
|
establish_connection(db: old)
|
|
290
|
-
|
|
213
|
+
unless connected
|
|
214
|
+
ActiveRecord::Base.connection_handler.clear_active_connections!
|
|
215
|
+
end
|
|
291
216
|
end
|
|
292
217
|
|
|
293
218
|
rval
|
|
294
219
|
end
|
|
295
220
|
|
|
296
221
|
def each_connection(opts = nil, &blk)
|
|
297
|
-
|
|
298
222
|
old = current_db
|
|
299
223
|
connected = ActiveRecord::Base.connection_pool.connected?
|
|
300
224
|
|
|
@@ -309,30 +233,32 @@ module RailsMultisite
|
|
|
309
233
|
errors = nil
|
|
310
234
|
|
|
311
235
|
if queue
|
|
312
|
-
threads
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
236
|
+
threads
|
|
237
|
+
.times
|
|
238
|
+
.map do
|
|
239
|
+
Thread.new do
|
|
240
|
+
while true
|
|
241
|
+
begin
|
|
242
|
+
db = queue.deq(true)
|
|
243
|
+
rescue ThreadError
|
|
244
|
+
db = nil
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
break unless db
|
|
248
|
+
|
|
249
|
+
establish_connection(db: db)
|
|
250
|
+
# no choice but to rescue, should probably log
|
|
251
|
+
|
|
252
|
+
begin
|
|
253
|
+
blk.call(db)
|
|
254
|
+
rescue => e
|
|
255
|
+
(errors ||= []) << e
|
|
256
|
+
end
|
|
257
|
+
ActiveRecord::Base.connection_handler.clear_active_connections!
|
|
320
258
|
end
|
|
321
|
-
|
|
322
|
-
break unless db
|
|
323
|
-
|
|
324
|
-
establish_connection(db: db)
|
|
325
|
-
# no choice but to rescue, should probably log
|
|
326
|
-
|
|
327
|
-
begin
|
|
328
|
-
blk.call(db)
|
|
329
|
-
rescue => e
|
|
330
|
-
(errors ||= []) << e
|
|
331
|
-
end
|
|
332
|
-
ActiveRecord::Base.connection_handler.clear_active_connections!
|
|
333
259
|
end
|
|
334
260
|
end
|
|
335
|
-
|
|
261
|
+
.map(&:join)
|
|
336
262
|
else
|
|
337
263
|
all_dbs.each do |db|
|
|
338
264
|
establish_connection(db: db)
|
|
@@ -344,14 +270,15 @@ module RailsMultisite
|
|
|
344
270
|
if errors && errors.length > 0
|
|
345
271
|
raise StandardError, "Failed to run queries #{errors.inspect}"
|
|
346
272
|
end
|
|
347
|
-
|
|
348
273
|
ensure
|
|
349
274
|
establish_connection(db: old)
|
|
350
|
-
|
|
275
|
+
unless connected
|
|
276
|
+
ActiveRecord::Base.connection_handler.clear_active_connections!
|
|
277
|
+
end
|
|
351
278
|
end
|
|
352
279
|
|
|
353
280
|
def all_dbs
|
|
354
|
-
[DEFAULT] +
|
|
281
|
+
[DEFAULT] + db_spec_cache.keys.to_a
|
|
355
282
|
end
|
|
356
283
|
|
|
357
284
|
def current_db
|
|
@@ -370,9 +297,9 @@ module RailsMultisite
|
|
|
370
297
|
request = Rack::Request.new(env)
|
|
371
298
|
|
|
372
299
|
host =
|
|
373
|
-
if request[
|
|
300
|
+
if request["__ws"] && self.class.asset_hostnames&.include?(request.host)
|
|
374
301
|
request.cookies.clear
|
|
375
|
-
request[
|
|
302
|
+
request["__ws"]
|
|
376
303
|
else
|
|
377
304
|
request.host
|
|
378
305
|
end
|
|
@@ -381,22 +308,29 @@ module RailsMultisite
|
|
|
381
308
|
end
|
|
382
309
|
|
|
383
310
|
def connection_spec(opts)
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
311
|
+
opts[:host] ? @host_spec_cache[opts[:host]] : db_spec_cache[opts[:db]]
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
def clear_settings!
|
|
315
|
+
db_spec_cache.each do |key, spec|
|
|
316
|
+
connection_handlers.delete(handler_key(spec))
|
|
388
317
|
end
|
|
389
318
|
end
|
|
390
319
|
|
|
391
|
-
|
|
320
|
+
def default_connection_handler=(connection_handler)
|
|
321
|
+
unless connection_handler.is_a?(
|
|
322
|
+
ActiveRecord::ConnectionAdapters::ConnectionHandler
|
|
323
|
+
)
|
|
324
|
+
raise ArgumentError.new("Invalid connection handler")
|
|
325
|
+
end
|
|
392
326
|
|
|
393
|
-
|
|
394
|
-
handler.establish_connection(spec.config)
|
|
327
|
+
@default_connection_handler = connection_handler
|
|
395
328
|
end
|
|
396
329
|
|
|
330
|
+
private
|
|
331
|
+
|
|
397
332
|
def handler_key(spec)
|
|
398
333
|
self.class.handler_key(spec)
|
|
399
334
|
end
|
|
400
|
-
|
|
401
335
|
end
|
|
402
336
|
end
|
data/lib/tasks/generators.rake
CHANGED
|
@@ -3,7 +3,7 @@ desc "generate multisite config file (if missing)"
|
|
|
3
3
|
task "multisite:generate:config" => :environment do
|
|
4
4
|
filename = RailsMultisite::ConnectionManagement.config_filename
|
|
5
5
|
|
|
6
|
-
if File.
|
|
6
|
+
if File.exist?(filename)
|
|
7
7
|
puts "Config is already generated at #{RailsMultisite::ConnectionManagement::CONFIG_FILE}"
|
|
8
8
|
else
|
|
9
9
|
puts "Generated config file at #{RailsMultisite::ConnectionManagement::CONFIG_FILE}"
|
metadata
CHANGED
|
@@ -1,55 +1,43 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_multisite
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 5.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sam Saffron
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-03-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - "
|
|
17
|
+
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
20
|
-
- - "<"
|
|
21
|
-
- !ruby/object:Gem::Version
|
|
22
|
-
version: '7.1'
|
|
19
|
+
version: '6.0'
|
|
23
20
|
type: :runtime
|
|
24
21
|
prerelease: false
|
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
23
|
requirements:
|
|
27
|
-
- - "
|
|
28
|
-
- !ruby/object:Gem::Version
|
|
29
|
-
version: '5.0'
|
|
30
|
-
- - "<"
|
|
24
|
+
- - ">="
|
|
31
25
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: '
|
|
26
|
+
version: '6.0'
|
|
33
27
|
- !ruby/object:Gem::Dependency
|
|
34
28
|
name: railties
|
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
|
36
30
|
requirements:
|
|
37
|
-
- - "
|
|
31
|
+
- - ">="
|
|
38
32
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: '
|
|
40
|
-
- - "<"
|
|
41
|
-
- !ruby/object:Gem::Version
|
|
42
|
-
version: '7.1'
|
|
33
|
+
version: '6.0'
|
|
43
34
|
type: :runtime
|
|
44
35
|
prerelease: false
|
|
45
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
46
37
|
requirements:
|
|
47
|
-
- - "
|
|
48
|
-
- !ruby/object:Gem::Version
|
|
49
|
-
version: '5.0'
|
|
50
|
-
- - "<"
|
|
38
|
+
- - ">="
|
|
51
39
|
- !ruby/object:Gem::Version
|
|
52
|
-
version: '
|
|
40
|
+
version: '6.0'
|
|
53
41
|
description: Multi tenancy support for Rails
|
|
54
42
|
email:
|
|
55
43
|
- sam.saffron@gmail.com
|
|
@@ -61,6 +49,7 @@ files:
|
|
|
61
49
|
- README.md
|
|
62
50
|
- lib/rails_multisite.rb
|
|
63
51
|
- lib/rails_multisite/connection_management.rb
|
|
52
|
+
- lib/rails_multisite/connection_management/null_instance.rb
|
|
64
53
|
- lib/rails_multisite/connection_management/rails_60_compat.rb
|
|
65
54
|
- lib/rails_multisite/connection_management/rails_61_compat.rb
|
|
66
55
|
- lib/rails_multisite/cookie_salt.rb
|
|
@@ -73,7 +62,7 @@ files:
|
|
|
73
62
|
homepage: ''
|
|
74
63
|
licenses: []
|
|
75
64
|
metadata: {}
|
|
76
|
-
post_install_message:
|
|
65
|
+
post_install_message:
|
|
77
66
|
rdoc_options: []
|
|
78
67
|
require_paths:
|
|
79
68
|
- lib
|
|
@@ -81,15 +70,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
81
70
|
requirements:
|
|
82
71
|
- - ">="
|
|
83
72
|
- !ruby/object:Gem::Version
|
|
84
|
-
version:
|
|
73
|
+
version: 3.0.0
|
|
85
74
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
75
|
requirements:
|
|
87
76
|
- - ">="
|
|
88
77
|
- !ruby/object:Gem::Version
|
|
89
78
|
version: '0'
|
|
90
79
|
requirements: []
|
|
91
|
-
rubygems_version: 3.
|
|
92
|
-
signing_key:
|
|
80
|
+
rubygems_version: 3.5.3
|
|
81
|
+
signing_key:
|
|
93
82
|
specification_version: 4
|
|
94
83
|
summary: Multi tenancy support for Rails
|
|
95
84
|
test_files: []
|