motel-activerecord 1.0.0
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 +7 -0
- data/README.md +225 -0
- data/VERSION +1 -0
- data/lib/motel-activerecord.rb +10 -0
- data/lib/motel/connection_adapters.rb +3 -0
- data/lib/motel/connection_adapters/connection_handler.rb +96 -0
- data/lib/motel/connection_adapters/connection_specification.rb +2 -0
- data/lib/motel/connection_adapters/connection_specification/resolver.rb +92 -0
- data/lib/motel/errors.rb +28 -0
- data/lib/motel/lobby.rb +47 -0
- data/lib/motel/manager.rb +69 -0
- data/lib/motel/multi_tenant.rb +53 -0
- data/lib/motel/railtie.rb +63 -0
- data/lib/motel/sources.rb +3 -0
- data/lib/motel/sources/database.rb +120 -0
- data/lib/motel/sources/default.rb +54 -0
- data/lib/motel/sources/redis.rb +80 -0
- data/lib/motel/version.rb +6 -0
- data/spec/lib/motel/connection_adapters/connection_handler_spec.rb +184 -0
- data/spec/lib/motel/connection_adapters/connection_specification/resolver_spec.rb +120 -0
- data/spec/lib/motel/lobby_spec.rb +155 -0
- data/spec/lib/motel/manager_spec.rb +238 -0
- data/spec/lib/motel/multi_tenant_spec.rb +169 -0
- data/spec/lib/motel/sources/database_spec.rb +246 -0
- data/spec/lib/motel/sources/default_spec.rb +167 -0
- data/spec/lib/motel/sources/redis_spec.rb +188 -0
- data/spec/spec_helper.rb +14 -0
- data/spec/tmp/foo.sqlite3 +0 -0
- data/spec/tmp/tenants.sqlite3 +0 -0
- metadata +144 -0
@@ -0,0 +1,167 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Motel::Sources::Default do
|
4
|
+
|
5
|
+
before(:each) do
|
6
|
+
@tenants_source = Motel::Sources::Default.new(
|
7
|
+
configurations: {'foo' => FOO_SPEC, 'bar' => BAR_SPEC }
|
8
|
+
)
|
9
|
+
end
|
10
|
+
|
11
|
+
describe '#tenants' do
|
12
|
+
|
13
|
+
it 'exist foo key' do
|
14
|
+
expect(@tenants_source.tenants.key?('foo')).to be_true
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'tenant foo has a correct spec' do
|
18
|
+
expect(@tenants_source.tenants['foo']['adapter']).to eq FOO_SPEC['adapter']
|
19
|
+
expect(@tenants_source.tenants['foo']['database']).to eq FOO_SPEC['database']
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'exist bar key' do
|
23
|
+
expect(@tenants_source.tenants.key?('bar')).to be_true
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'tenant bar has a correct spec' do
|
27
|
+
expect(@tenants_source.tenants['bar']['adapter']).to eq BAR_SPEC['adapter']
|
28
|
+
expect(@tenants_source.tenants['bar']['database']).to eq BAR_SPEC['database']
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
describe '#tenant' do
|
34
|
+
|
35
|
+
context 'existing tenant' do
|
36
|
+
|
37
|
+
it 'tenant foo has a correct spec' do
|
38
|
+
expect(@tenants_source.tenant('foo')['adapter']).to eq FOO_SPEC['adapter']
|
39
|
+
expect(@tenants_source.tenant('foo')['database']).to eq FOO_SPEC['database']
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
context 'nonexistent tenant' do
|
45
|
+
|
46
|
+
it 'returns null' do
|
47
|
+
expect(@tenants_source.tenant('baz')).to be_nil
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
|
54
|
+
describe '#tenant?' do
|
55
|
+
|
56
|
+
it 'returns true if tenant does exist' do
|
57
|
+
expect(@tenants_source.tenant?('foo')).to be_true
|
58
|
+
end
|
59
|
+
|
60
|
+
it 'returns false if tenant does not exist' do
|
61
|
+
expect(@tenants_source.tenant?('baz')).to be_false
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
65
|
+
|
66
|
+
describe '#add_tenant' do
|
67
|
+
|
68
|
+
context 'existing tenant' do
|
69
|
+
|
70
|
+
it 'raise an error' do
|
71
|
+
expect{
|
72
|
+
@tenants_source.add_tenant('foo', FOO_SPEC)
|
73
|
+
}.to raise_error Motel::ExistingTenantError
|
74
|
+
end
|
75
|
+
|
76
|
+
end
|
77
|
+
|
78
|
+
context 'nonexistent tenant' do
|
79
|
+
|
80
|
+
context 'spec has keys as strings' do
|
81
|
+
|
82
|
+
it 'add new tenant to ActiveRecord::Base.configurations' do
|
83
|
+
@tenants_source.add_tenant(
|
84
|
+
'baz', {'adapter' => BAZ_SPEC['adapter'], 'database' => BAZ_SPEC['database']}
|
85
|
+
)
|
86
|
+
|
87
|
+
expect(@tenants_source.tenants.key?('baz')).to be_true
|
88
|
+
expect(@tenants_source.tenants['baz']['adapter']).to eq BAZ_SPEC['adapter']
|
89
|
+
expect(@tenants_source.tenants['baz']['database']).to eq BAZ_SPEC['database']
|
90
|
+
end
|
91
|
+
|
92
|
+
end
|
93
|
+
|
94
|
+
context 'spec has keys as symbols' do
|
95
|
+
|
96
|
+
it 'add new tenant to ActiveRecord::Base.configurations' do
|
97
|
+
@tenants_source.add_tenant(
|
98
|
+
'baz', {adapter: BAZ_SPEC['adapter'], database: BAZ_SPEC['database']}
|
99
|
+
)
|
100
|
+
|
101
|
+
expect(@tenants_source.tenants.key?('baz')).to be_true
|
102
|
+
expect(@tenants_source.tenants['baz']['adapter']).to eq BAZ_SPEC['adapter']
|
103
|
+
expect(@tenants_source.tenants['baz']['database']).to eq BAZ_SPEC['database']
|
104
|
+
end
|
105
|
+
|
106
|
+
end
|
107
|
+
|
108
|
+
end
|
109
|
+
|
110
|
+
end
|
111
|
+
|
112
|
+
describe '#update_tenant' do
|
113
|
+
|
114
|
+
context 'existing tenant' do
|
115
|
+
|
116
|
+
context 'full update' do
|
117
|
+
|
118
|
+
it 'update tenant from ActiveRecord::Base.configurations' do
|
119
|
+
@tenants_source.update_tenant(
|
120
|
+
'foo', {adapter: 'mysql2', database: 'foo'}
|
121
|
+
)
|
122
|
+
|
123
|
+
expect(@tenants_source.tenants['foo']['adapter']).to eq 'mysql2'
|
124
|
+
expect(@tenants_source.tenants['foo']['database']).to eq 'foo'
|
125
|
+
end
|
126
|
+
|
127
|
+
end
|
128
|
+
|
129
|
+
context 'partial update' do
|
130
|
+
|
131
|
+
it 'update tenant from ActiveRecord::Base.configurations' do
|
132
|
+
@tenants_source.update_tenant(
|
133
|
+
'foo', {adapter: 'mysql2'}
|
134
|
+
)
|
135
|
+
|
136
|
+
expect(@tenants_source.tenants['foo']['adapter']).to eq 'mysql2'
|
137
|
+
expect(@tenants_source.tenants['foo']['database']).to eq FOO_SPEC['database']
|
138
|
+
end
|
139
|
+
|
140
|
+
end
|
141
|
+
|
142
|
+
end
|
143
|
+
|
144
|
+
context 'nonexistent tenant' do
|
145
|
+
|
146
|
+
it 'raise an error' do
|
147
|
+
expect{
|
148
|
+
@tenants_source.update_tenant('baz', BAZ_SPEC)
|
149
|
+
}.to raise_error Motel::NonexistentTenantError
|
150
|
+
end
|
151
|
+
|
152
|
+
end
|
153
|
+
|
154
|
+
end
|
155
|
+
|
156
|
+
describe '#delete_tenant' do
|
157
|
+
|
158
|
+
it 'remove tenant from ActiveRecord::Base.configurations' do
|
159
|
+
@tenants_source.delete_tenant('foo')
|
160
|
+
|
161
|
+
expect(@tenants_source.tenants.key?('foo')).to be_false
|
162
|
+
end
|
163
|
+
|
164
|
+
end
|
165
|
+
|
166
|
+
end
|
167
|
+
|
@@ -0,0 +1,188 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Motel::Sources::Redis do
|
4
|
+
|
5
|
+
before(:all) do
|
6
|
+
@redis_server = ::Redis.new
|
7
|
+
@prefix_tenant_alias = 'test-tenant:'
|
8
|
+
@tenants_source = Motel::Sources::Redis.new(
|
9
|
+
prefix_tenant_alias: @prefix_tenant_alias
|
10
|
+
)
|
11
|
+
end
|
12
|
+
|
13
|
+
before(:each) do
|
14
|
+
@redis_server.hset "#{@prefix_tenant_alias}foo", 'adapter', FOO_SPEC['adapter']
|
15
|
+
@redis_server.hset "#{@prefix_tenant_alias}foo", 'database', FOO_SPEC['database']
|
16
|
+
@redis_server.hset "#{@prefix_tenant_alias}bar", 'adapter', BAR_SPEC['adapter']
|
17
|
+
@redis_server.hset "#{@prefix_tenant_alias}bar", 'database', BAR_SPEC['database']
|
18
|
+
end
|
19
|
+
|
20
|
+
after(:each) do
|
21
|
+
@redis_server.keys.each do |tenant_name|
|
22
|
+
if tenant_name.match(@prefix_tenant_alias)
|
23
|
+
fields = @redis_server.hkeys tenant_name
|
24
|
+
@redis_server.hdel(tenant_name, [*fields])
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe '#tenants' do
|
30
|
+
|
31
|
+
it 'there are only two tenants' do
|
32
|
+
expect(@tenants_source.tenants.count).to eq 2
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'exist foo key' do
|
36
|
+
expect(@tenants_source.tenants.key?('foo')).to be_true
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'tenant foo has a correct spec' do
|
40
|
+
expect(@tenants_source.tenants['foo']['adapter']).to eq FOO_SPEC['adapter']
|
41
|
+
expect(@tenants_source.tenants['foo']['database']).to eq FOO_SPEC['database']
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'exist bar key' do
|
45
|
+
expect(@tenants_source.tenants.key?('bar')).to be_true
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'tenant bar has a correct spec' do
|
49
|
+
expect(@tenants_source.tenants['bar']['adapter']).to eq BAR_SPEC['adapter']
|
50
|
+
expect(@tenants_source.tenants['bar']['database']).to eq BAR_SPEC['database']
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
|
55
|
+
describe '#tenant' do
|
56
|
+
|
57
|
+
context 'existing tenant' do
|
58
|
+
|
59
|
+
it 'tenant foo has a correct spec' do
|
60
|
+
expect(@tenants_source.tenant('foo')['adapter']).to eq FOO_SPEC['adapter']
|
61
|
+
expect(@tenants_source.tenant('foo')['database']).to eq FOO_SPEC['database']
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
65
|
+
|
66
|
+
context 'nonexistent tenant' do
|
67
|
+
|
68
|
+
it 'returns null' do
|
69
|
+
expect(@tenants_source.tenant('baz')).to be_nil
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|
73
|
+
|
74
|
+
end
|
75
|
+
|
76
|
+
describe '#tenant?' do
|
77
|
+
|
78
|
+
it 'returns true if tenant does exist' do
|
79
|
+
expect(@tenants_source.tenant?('foo')).to be_true
|
80
|
+
end
|
81
|
+
|
82
|
+
it 'returns false if tenant does not exist' do
|
83
|
+
expect(@tenants_source.tenant?('baz')).to be_false
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
describe '#add_tenant' do
|
89
|
+
|
90
|
+
context 'existing tenant' do
|
91
|
+
|
92
|
+
it 'raise an error' do
|
93
|
+
expect{
|
94
|
+
@tenants_source.add_tenant('foo', FOO_SPEC)
|
95
|
+
}.to raise_error Motel::ExistingTenantError
|
96
|
+
end
|
97
|
+
|
98
|
+
end
|
99
|
+
|
100
|
+
context 'nonexistent tenant' do
|
101
|
+
|
102
|
+
context 'spec has keys as strings' do
|
103
|
+
|
104
|
+
it 'add new tenant to redis server' do
|
105
|
+
@tenants_source.add_tenant(
|
106
|
+
'baz', {'adapter' => BAZ_SPEC['adapter'], 'database' => BAZ_SPEC['database']}
|
107
|
+
)
|
108
|
+
|
109
|
+
expect(@redis_server.hget("#{@prefix_tenant_alias}baz", 'adapter')).to eq BAZ_SPEC['adapter']
|
110
|
+
expect(@redis_server.hget("#{@prefix_tenant_alias}baz", 'database')).to eq BAZ_SPEC['database']
|
111
|
+
end
|
112
|
+
|
113
|
+
end
|
114
|
+
|
115
|
+
context 'spec has keys as symbols' do
|
116
|
+
|
117
|
+
it 'add new tenant to redis server' do
|
118
|
+
@tenants_source.add_tenant(
|
119
|
+
'baz', {adapter: BAZ_SPEC['adapter'] , database: BAZ_SPEC['database']}
|
120
|
+
)
|
121
|
+
|
122
|
+
expect(@redis_server.hget("#{@prefix_tenant_alias}baz", 'adapter')).to eq BAZ_SPEC['adapter']
|
123
|
+
expect(@redis_server.hget("#{@prefix_tenant_alias}baz", 'database')).to eq BAZ_SPEC['database']
|
124
|
+
end
|
125
|
+
|
126
|
+
end
|
127
|
+
|
128
|
+
end
|
129
|
+
|
130
|
+
end
|
131
|
+
|
132
|
+
describe '#update_tenant' do
|
133
|
+
|
134
|
+
context 'existing tenant' do
|
135
|
+
|
136
|
+
context 'full update' do
|
137
|
+
|
138
|
+
it 'update tenant in the redis server' do
|
139
|
+
@tenants_source.update_tenant(
|
140
|
+
'foo', {adapter: 'mysql2', database: 'foo'}
|
141
|
+
)
|
142
|
+
|
143
|
+
expect(@redis_server.hget("#{@prefix_tenant_alias}foo", 'adapter')).to eq 'mysql2'
|
144
|
+
expect(@redis_server.hget("#{@prefix_tenant_alias}foo", 'database')).to eq 'foo'
|
145
|
+
end
|
146
|
+
|
147
|
+
end
|
148
|
+
|
149
|
+
context 'partial update' do
|
150
|
+
|
151
|
+
it 'update tenant in the redis server' do
|
152
|
+
@tenants_source.update_tenant(
|
153
|
+
'foo', {adapter: 'mysql2'}
|
154
|
+
)
|
155
|
+
|
156
|
+
expect(@redis_server.hget("#{@prefix_tenant_alias}foo", 'adapter')).to eq 'mysql2'
|
157
|
+
expect(@redis_server.hget("#{@prefix_tenant_alias}foo", 'database')).to eq FOO_SPEC['database']
|
158
|
+
end
|
159
|
+
|
160
|
+
end
|
161
|
+
|
162
|
+
end
|
163
|
+
|
164
|
+
context 'nonexistent tenant' do
|
165
|
+
|
166
|
+
it 'raise an error' do
|
167
|
+
expect{
|
168
|
+
@tenants_source.update_tenant('baz', BAZ_SPEC)
|
169
|
+
}.to raise_error Motel::NonexistentTenantError
|
170
|
+
end
|
171
|
+
|
172
|
+
end
|
173
|
+
|
174
|
+
end
|
175
|
+
|
176
|
+
describe '#delete_tenant' do
|
177
|
+
|
178
|
+
it 'remove tenant from redis server' do
|
179
|
+
@tenants_source.delete_tenant('foo')
|
180
|
+
|
181
|
+
expect(@redis_server.hexists("#{@prefix_tenant_alias}foo", 'adapter')).to be_false
|
182
|
+
expect(@redis_server.hexists("#{@prefix_tenant_alias}foo", 'database')).to be_false
|
183
|
+
end
|
184
|
+
|
185
|
+
end
|
186
|
+
|
187
|
+
end
|
188
|
+
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require File.expand_path("../../lib/motel-activerecord", __FILE__)
|
2
|
+
|
3
|
+
TEMP_DIR = File.expand_path("../tmp/", __FILE__)
|
4
|
+
|
5
|
+
TENANTS_SPEC = {'adapter' => 'sqlite3', 'database' => 'spec/tmp/tenants.sqlite3'}
|
6
|
+
|
7
|
+
FOO_SPEC = {'adapter' => 'sqlite3', 'database' => "#{TEMP_DIR}/foo.sqlite3"}
|
8
|
+
BAR_SPEC = {'adapter' => 'sqlite3', 'database' => "#{TEMP_DIR}/bar.sqlite3"}
|
9
|
+
BAZ_SPEC = {'adapter' => 'sqlite3', 'database' => "#{TEMP_DIR}/baz.sqlite3"}
|
10
|
+
|
11
|
+
RSpec.configure do |config|
|
12
|
+
config.color_enabled = true
|
13
|
+
end
|
14
|
+
|
File without changes
|
Binary file
|
metadata
ADDED
@@ -0,0 +1,144 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: motel-activerecord
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Diego Martínez Valdelamar
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-02-21 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activerecord
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.0'
|
20
|
+
- - <=
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '5.0'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '4.0'
|
30
|
+
- - <=
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '5.0'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: activesupport
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - '>='
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: redis
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - '>='
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: rspec
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - '>='
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - '>='
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
description: ActiveRecord extension to use connections to multiple databases
|
76
|
+
email: dimarva.90@gmail.com
|
77
|
+
executables: []
|
78
|
+
extensions: []
|
79
|
+
extra_rdoc_files: []
|
80
|
+
files:
|
81
|
+
- lib/motel-activerecord.rb
|
82
|
+
- lib/motel/manager.rb
|
83
|
+
- lib/motel/sources.rb
|
84
|
+
- lib/motel/railtie.rb
|
85
|
+
- lib/motel/sources/database.rb
|
86
|
+
- lib/motel/sources/default.rb
|
87
|
+
- lib/motel/sources/redis.rb
|
88
|
+
- lib/motel/errors.rb
|
89
|
+
- lib/motel/version.rb
|
90
|
+
- lib/motel/connection_adapters.rb
|
91
|
+
- lib/motel/multi_tenant.rb
|
92
|
+
- lib/motel/connection_adapters/connection_specification/resolver.rb
|
93
|
+
- lib/motel/connection_adapters/connection_specification.rb
|
94
|
+
- lib/motel/connection_adapters/connection_handler.rb
|
95
|
+
- lib/motel/lobby.rb
|
96
|
+
- VERSION
|
97
|
+
- README.md
|
98
|
+
- spec/tmp/foo.sqlite3
|
99
|
+
- spec/tmp/tenants.sqlite3
|
100
|
+
- spec/spec_helper.rb
|
101
|
+
- spec/lib/motel/sources/default_spec.rb
|
102
|
+
- spec/lib/motel/sources/database_spec.rb
|
103
|
+
- spec/lib/motel/sources/redis_spec.rb
|
104
|
+
- spec/lib/motel/connection_adapters/connection_specification/resolver_spec.rb
|
105
|
+
- spec/lib/motel/connection_adapters/connection_handler_spec.rb
|
106
|
+
- spec/lib/motel/multi_tenant_spec.rb
|
107
|
+
- spec/lib/motel/lobby_spec.rb
|
108
|
+
- spec/lib/motel/manager_spec.rb
|
109
|
+
homepage: https://github.com/dimarval/motel-activerecord
|
110
|
+
licenses:
|
111
|
+
- MIT
|
112
|
+
metadata: {}
|
113
|
+
post_install_message:
|
114
|
+
rdoc_options: []
|
115
|
+
require_paths:
|
116
|
+
- lib
|
117
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - '>='
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0'
|
122
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - '>='
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0'
|
127
|
+
requirements: []
|
128
|
+
rubyforge_project:
|
129
|
+
rubygems_version: 2.0.3
|
130
|
+
signing_key:
|
131
|
+
specification_version: 4
|
132
|
+
summary: Multi-tenant gem
|
133
|
+
test_files:
|
134
|
+
- spec/tmp/foo.sqlite3
|
135
|
+
- spec/tmp/tenants.sqlite3
|
136
|
+
- spec/spec_helper.rb
|
137
|
+
- spec/lib/motel/sources/default_spec.rb
|
138
|
+
- spec/lib/motel/sources/database_spec.rb
|
139
|
+
- spec/lib/motel/sources/redis_spec.rb
|
140
|
+
- spec/lib/motel/connection_adapters/connection_specification/resolver_spec.rb
|
141
|
+
- spec/lib/motel/connection_adapters/connection_handler_spec.rb
|
142
|
+
- spec/lib/motel/multi_tenant_spec.rb
|
143
|
+
- spec/lib/motel/lobby_spec.rb
|
144
|
+
- spec/lib/motel/manager_spec.rb
|