ros-apartment 2.3.0 → 2.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +78 -0
  3. data/.github/workflows/changelog.yml +63 -0
  4. data/.github/workflows/reviewdog.yml +22 -0
  5. data/.pryrc +5 -3
  6. data/.rubocop.yml +32 -0
  7. data/.rubocop_todo.yml +233 -0
  8. data/.ruby-version +1 -0
  9. data/.story_branch.yml +5 -0
  10. data/Appraisals +29 -42
  11. data/CHANGELOG.md +963 -0
  12. data/Gemfile +2 -7
  13. data/Guardfile +3 -16
  14. data/HISTORY.md +159 -68
  15. data/README.md +101 -21
  16. data/Rakefile +39 -22
  17. data/TODO.md +0 -1
  18. data/gemfiles/rails_5_2.gemfile +0 -5
  19. data/gemfiles/rails_6_0.gemfile +4 -9
  20. data/gemfiles/rails_6_1.gemfile +17 -0
  21. data/gemfiles/rails_7_0.gemfile +17 -0
  22. data/gemfiles/rails_master.gemfile +3 -8
  23. data/lib/apartment/active_record/connection_handling.rb +20 -0
  24. data/lib/apartment/active_record/internal_metadata.rb +9 -0
  25. data/lib/apartment/active_record/postgresql_adapter.rb +39 -0
  26. data/lib/apartment/active_record/schema_migration.rb +11 -0
  27. data/lib/apartment/adapters/abstract_adapter.rb +52 -46
  28. data/lib/apartment/adapters/abstract_jdbc_adapter.rb +5 -3
  29. data/lib/apartment/adapters/jdbc_mysql_adapter.rb +3 -3
  30. data/lib/apartment/adapters/jdbc_postgresql_adapter.rb +19 -13
  31. data/lib/apartment/adapters/mysql2_adapter.rb +15 -9
  32. data/lib/apartment/adapters/postgis_adapter.rb +3 -2
  33. data/lib/apartment/adapters/postgresql_adapter.rb +79 -31
  34. data/lib/apartment/adapters/sqlite3_adapter.rb +18 -8
  35. data/lib/apartment/console.rb +23 -11
  36. data/lib/apartment/custom_console.rb +42 -0
  37. data/lib/apartment/deprecation.rb +2 -1
  38. data/lib/apartment/elevators/domain.rb +4 -3
  39. data/lib/apartment/elevators/first_subdomain.rb +3 -2
  40. data/lib/apartment/elevators/generic.rb +4 -3
  41. data/lib/apartment/elevators/host.rb +6 -1
  42. data/lib/apartment/elevators/host_hash.rb +6 -2
  43. data/lib/apartment/elevators/subdomain.rb +9 -5
  44. data/lib/apartment/log_subscriber.rb +33 -0
  45. data/lib/apartment/migrator.rb +4 -3
  46. data/lib/apartment/model.rb +29 -0
  47. data/lib/apartment/railtie.rb +16 -20
  48. data/lib/apartment/tasks/enhancements.rb +4 -6
  49. data/lib/apartment/tasks/task_helper.rb +52 -0
  50. data/lib/apartment/tenant.rb +7 -10
  51. data/lib/apartment/version.rb +3 -1
  52. data/lib/apartment.rb +56 -15
  53. data/lib/generators/apartment/install/install_generator.rb +4 -3
  54. data/lib/generators/apartment/install/templates/apartment.rb +10 -3
  55. data/lib/tasks/apartment.rake +48 -87
  56. data/ros-apartment.gemspec +59 -0
  57. metadata +148 -240
  58. data/.travis.yml +0 -65
  59. data/apartment.gemspec +0 -47
  60. data/gemfiles/rails_4_2.gemfile +0 -23
  61. data/gemfiles/rails_5_0.gemfile +0 -22
  62. data/gemfiles/rails_5_1.gemfile +0 -22
  63. data/lib/apartment/reloader.rb +0 -21
  64. data/spec/adapters/jdbc_mysql_adapter_spec.rb +0 -19
  65. data/spec/adapters/jdbc_postgresql_adapter_spec.rb +0 -41
  66. data/spec/adapters/mysql2_adapter_spec.rb +0 -59
  67. data/spec/adapters/postgresql_adapter_spec.rb +0 -61
  68. data/spec/adapters/sqlite3_adapter_spec.rb +0 -83
  69. data/spec/apartment_spec.rb +0 -11
  70. data/spec/config/database.yml.sample +0 -49
  71. data/spec/dummy/Rakefile +0 -7
  72. data/spec/dummy/app/controllers/application_controller.rb +0 -6
  73. data/spec/dummy/app/helpers/application_helper.rb +0 -2
  74. data/spec/dummy/app/models/company.rb +0 -3
  75. data/spec/dummy/app/models/user.rb +0 -3
  76. data/spec/dummy/app/views/application/index.html.erb +0 -1
  77. data/spec/dummy/app/views/layouts/application.html.erb +0 -14
  78. data/spec/dummy/config/application.rb +0 -49
  79. data/spec/dummy/config/boot.rb +0 -11
  80. data/spec/dummy/config/database.yml.sample +0 -44
  81. data/spec/dummy/config/environment.rb +0 -5
  82. data/spec/dummy/config/environments/development.rb +0 -28
  83. data/spec/dummy/config/environments/production.rb +0 -51
  84. data/spec/dummy/config/environments/test.rb +0 -34
  85. data/spec/dummy/config/initializers/apartment.rb +0 -4
  86. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  87. data/spec/dummy/config/initializers/inflections.rb +0 -10
  88. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  89. data/spec/dummy/config/initializers/secret_token.rb +0 -7
  90. data/spec/dummy/config/initializers/session_store.rb +0 -8
  91. data/spec/dummy/config/locales/en.yml +0 -5
  92. data/spec/dummy/config/routes.rb +0 -3
  93. data/spec/dummy/config.ru +0 -4
  94. data/spec/dummy/db/migrate/20110613152810_create_dummy_models.rb +0 -39
  95. data/spec/dummy/db/migrate/20111202022214_create_table_books.rb +0 -14
  96. data/spec/dummy/db/migrate/20180415260934_create_public_tokens.rb +0 -13
  97. data/spec/dummy/db/schema.rb +0 -55
  98. data/spec/dummy/db/seeds/import.rb +0 -5
  99. data/spec/dummy/db/seeds.rb +0 -5
  100. data/spec/dummy/db/test.sqlite3 +0 -0
  101. data/spec/dummy/public/404.html +0 -26
  102. data/spec/dummy/public/422.html +0 -26
  103. data/spec/dummy/public/500.html +0 -26
  104. data/spec/dummy/public/favicon.ico +0 -0
  105. data/spec/dummy/public/stylesheets/.gitkeep +0 -0
  106. data/spec/dummy/script/rails +0 -6
  107. data/spec/dummy_engine/.gitignore +0 -8
  108. data/spec/dummy_engine/Gemfile +0 -15
  109. data/spec/dummy_engine/Rakefile +0 -34
  110. data/spec/dummy_engine/bin/rails +0 -12
  111. data/spec/dummy_engine/config/initializers/apartment.rb +0 -51
  112. data/spec/dummy_engine/dummy_engine.gemspec +0 -24
  113. data/spec/dummy_engine/lib/dummy_engine/engine.rb +0 -4
  114. data/spec/dummy_engine/lib/dummy_engine/version.rb +0 -3
  115. data/spec/dummy_engine/lib/dummy_engine.rb +0 -4
  116. data/spec/dummy_engine/test/dummy/Rakefile +0 -6
  117. data/spec/dummy_engine/test/dummy/config/application.rb +0 -22
  118. data/spec/dummy_engine/test/dummy/config/boot.rb +0 -5
  119. data/spec/dummy_engine/test/dummy/config/database.yml +0 -25
  120. data/spec/dummy_engine/test/dummy/config/environment.rb +0 -5
  121. data/spec/dummy_engine/test/dummy/config/environments/development.rb +0 -37
  122. data/spec/dummy_engine/test/dummy/config/environments/production.rb +0 -78
  123. data/spec/dummy_engine/test/dummy/config/environments/test.rb +0 -39
  124. data/spec/dummy_engine/test/dummy/config/initializers/assets.rb +0 -8
  125. data/spec/dummy_engine/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  126. data/spec/dummy_engine/test/dummy/config/initializers/cookies_serializer.rb +0 -3
  127. data/spec/dummy_engine/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  128. data/spec/dummy_engine/test/dummy/config/initializers/inflections.rb +0 -16
  129. data/spec/dummy_engine/test/dummy/config/initializers/mime_types.rb +0 -4
  130. data/spec/dummy_engine/test/dummy/config/initializers/session_store.rb +0 -3
  131. data/spec/dummy_engine/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  132. data/spec/dummy_engine/test/dummy/config/locales/en.yml +0 -23
  133. data/spec/dummy_engine/test/dummy/config/routes.rb +0 -56
  134. data/spec/dummy_engine/test/dummy/config/secrets.yml +0 -22
  135. data/spec/dummy_engine/test/dummy/config.ru +0 -4
  136. data/spec/examples/connection_adapter_examples.rb +0 -42
  137. data/spec/examples/generic_adapter_custom_configuration_example.rb +0 -95
  138. data/spec/examples/generic_adapter_examples.rb +0 -163
  139. data/spec/examples/schema_adapter_examples.rb +0 -234
  140. data/spec/integration/apartment_rake_integration_spec.rb +0 -107
  141. data/spec/integration/query_caching_spec.rb +0 -81
  142. data/spec/integration/use_within_an_engine_spec.rb +0 -28
  143. data/spec/schemas/v1.rb +0 -16
  144. data/spec/schemas/v2.rb +0 -43
  145. data/spec/schemas/v3.rb +0 -49
  146. data/spec/spec_helper.rb +0 -61
  147. data/spec/support/apartment_helpers.rb +0 -43
  148. data/spec/support/capybara_sessions.rb +0 -15
  149. data/spec/support/config.rb +0 -10
  150. data/spec/support/contexts.rb +0 -52
  151. data/spec/support/requirements.rb +0 -35
  152. data/spec/support/setup.rb +0 -46
  153. data/spec/tasks/apartment_rake_spec.rb +0 -129
  154. data/spec/tenant_spec.rb +0 -190
  155. data/spec/unit/config_spec.rb +0 -112
  156. data/spec/unit/elevators/domain_spec.rb +0 -32
  157. data/spec/unit/elevators/first_subdomain_spec.rb +0 -24
  158. data/spec/unit/elevators/generic_spec.rb +0 -54
  159. data/spec/unit/elevators/host_hash_spec.rb +0 -32
  160. data/spec/unit/elevators/host_spec.rb +0 -89
  161. data/spec/unit/elevators/subdomain_spec.rb +0 -76
  162. data/spec/unit/migrator_spec.rb +0 -77
  163. data/spec/unit/reloader_spec.rb +0 -24
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ros-apartment
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Brunner
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-01-03 00:00:00.000000000 Z
13
+ date: 2022-02-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord
@@ -18,48 +18,54 @@ dependencies:
18
18
  requirements:
19
19
  - - ">="
20
20
  - !ruby/object:Gem::Version
21
- version: 3.1.2
21
+ version: 5.0.0
22
22
  - - "<"
23
23
  - !ruby/object:Gem::Version
24
- version: '6.1'
24
+ version: '7.1'
25
25
  type: :runtime
26
26
  prerelease: false
27
27
  version_requirements: !ruby/object:Gem::Requirement
28
28
  requirements:
29
29
  - - ">="
30
30
  - !ruby/object:Gem::Version
31
- version: 3.1.2
31
+ version: 5.0.0
32
32
  - - "<"
33
33
  - !ruby/object:Gem::Version
34
- version: '6.1'
34
+ version: '7.1'
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: parallel
37
37
  requirement: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ">="
39
+ - - "<"
40
40
  - !ruby/object:Gem::Version
41
- version: 0.7.1
41
+ version: '2.0'
42
42
  type: :runtime
43
43
  prerelease: false
44
44
  version_requirements: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ">="
46
+ - - "<"
47
47
  - !ruby/object:Gem::Version
48
- version: 0.7.1
48
+ version: '2.0'
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: public_suffix
51
51
  requirement: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: '2'
55
+ version: 2.0.5
56
+ - - "<"
57
+ - !ruby/object:Gem::Version
58
+ version: '5.0'
56
59
  type: :runtime
57
60
  prerelease: false
58
61
  version_requirements: !ruby/object:Gem::Requirement
59
62
  requirements:
60
63
  - - ">="
61
64
  - !ruby/object:Gem::Version
62
- version: '2'
65
+ version: 2.0.5
66
+ - - "<"
67
+ - !ruby/object:Gem::Version
68
+ version: '5.0'
63
69
  - !ruby/object:Gem::Dependency
64
70
  name: rack
65
71
  requirement: !ruby/object:Gem::Requirement
@@ -67,6 +73,9 @@ dependencies:
67
73
  - - ">="
68
74
  - !ruby/object:Gem::Version
69
75
  version: 1.3.6
76
+ - - "<"
77
+ - !ruby/object:Gem::Version
78
+ version: '3.0'
70
79
  type: :runtime
71
80
  prerelease: false
72
81
  version_requirements: !ruby/object:Gem::Requirement
@@ -74,20 +83,23 @@ dependencies:
74
83
  - - ">="
75
84
  - !ruby/object:Gem::Version
76
85
  version: 1.3.6
86
+ - - "<"
87
+ - !ruby/object:Gem::Version
88
+ version: '3.0'
77
89
  - !ruby/object:Gem::Dependency
78
90
  name: appraisal
79
91
  requirement: !ruby/object:Gem::Requirement
80
92
  requirements:
81
- - - ">="
93
+ - - "~>"
82
94
  - !ruby/object:Gem::Version
83
- version: '0'
95
+ version: '2.2'
84
96
  type: :development
85
97
  prerelease: false
86
98
  version_requirements: !ruby/object:Gem::Requirement
87
99
  requirements:
88
- - - ">="
100
+ - - "~>"
89
101
  - !ruby/object:Gem::Version
90
- version: '0'
102
+ version: '2.2'
91
103
  - !ruby/object:Gem::Dependency
92
104
  name: bundler
93
105
  requirement: !ruby/object:Gem::Requirement
@@ -97,7 +109,7 @@ dependencies:
97
109
  version: '1.3'
98
110
  - - "<"
99
111
  - !ruby/object:Gem::Version
100
- version: '2.0'
112
+ version: '3.0'
101
113
  type: :development
102
114
  prerelease: false
103
115
  version_requirements: !ruby/object:Gem::Requirement
@@ -107,35 +119,49 @@ dependencies:
107
119
  version: '1.3'
108
120
  - - "<"
109
121
  - !ruby/object:Gem::Version
110
- version: '2.0'
122
+ version: '3.0'
111
123
  - !ruby/object:Gem::Dependency
112
- name: capybara
124
+ name: guard-rspec
113
125
  requirement: !ruby/object:Gem::Requirement
114
126
  requirements:
115
127
  - - "~>"
116
128
  - !ruby/object:Gem::Version
117
- version: '2.0'
129
+ version: '4.2'
118
130
  type: :development
119
131
  prerelease: false
120
132
  version_requirements: !ruby/object:Gem::Requirement
121
133
  requirements:
122
134
  - - "~>"
123
135
  - !ruby/object:Gem::Version
124
- version: '2.0'
136
+ version: '4.2'
137
+ - !ruby/object:Gem::Dependency
138
+ name: pry
139
+ requirement: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - ">="
142
+ - !ruby/object:Gem::Version
143
+ version: '0'
144
+ type: :development
145
+ prerelease: false
146
+ version_requirements: !ruby/object:Gem::Requirement
147
+ requirements:
148
+ - - ">="
149
+ - !ruby/object:Gem::Version
150
+ version: '0'
125
151
  - !ruby/object:Gem::Dependency
126
152
  name: rake
127
153
  requirement: !ruby/object:Gem::Requirement
128
154
  requirements:
129
155
  - - "~>"
130
156
  - !ruby/object:Gem::Version
131
- version: '0.9'
157
+ version: '13.0'
132
158
  type: :development
133
159
  prerelease: false
134
160
  version_requirements: !ruby/object:Gem::Requirement
135
161
  requirements:
136
162
  - - "~>"
137
163
  - !ruby/object:Gem::Version
138
- version: '0.9'
164
+ version: '13.0'
139
165
  - !ruby/object:Gem::Dependency
140
166
  name: rspec
141
167
  requirement: !ruby/object:Gem::Requirement
@@ -150,6 +176,20 @@ dependencies:
150
176
  - - "~>"
151
177
  - !ruby/object:Gem::Version
152
178
  version: '3.4'
179
+ - !ruby/object:Gem::Dependency
180
+ name: rspec_junit_formatter
181
+ requirement: !ruby/object:Gem::Requirement
182
+ requirements:
183
+ - - ">="
184
+ - !ruby/object:Gem::Version
185
+ version: '0'
186
+ type: :development
187
+ prerelease: false
188
+ version_requirements: !ruby/object:Gem::Requirement
189
+ requirements:
190
+ - - ">="
191
+ - !ruby/object:Gem::Version
192
+ version: '0'
153
193
  - !ruby/object:Gem::Dependency
154
194
  name: rspec-rails
155
195
  requirement: !ruby/object:Gem::Requirement
@@ -164,34 +204,90 @@ dependencies:
164
204
  - - "~>"
165
205
  - !ruby/object:Gem::Version
166
206
  version: '3.4'
207
+ - !ruby/object:Gem::Dependency
208
+ name: rubocop
209
+ requirement: !ruby/object:Gem::Requirement
210
+ requirements:
211
+ - - "~>"
212
+ - !ruby/object:Gem::Version
213
+ version: '0.93'
214
+ type: :development
215
+ prerelease: false
216
+ version_requirements: !ruby/object:Gem::Requirement
217
+ requirements:
218
+ - - "~>"
219
+ - !ruby/object:Gem::Version
220
+ version: '0.93'
221
+ - !ruby/object:Gem::Dependency
222
+ name: rubocop-performance
223
+ requirement: !ruby/object:Gem::Requirement
224
+ requirements:
225
+ - - "~>"
226
+ - !ruby/object:Gem::Version
227
+ version: '1.10'
228
+ type: :development
229
+ prerelease: false
230
+ version_requirements: !ruby/object:Gem::Requirement
231
+ requirements:
232
+ - - "~>"
233
+ - !ruby/object:Gem::Version
234
+ version: '1.10'
235
+ - !ruby/object:Gem::Dependency
236
+ name: rubocop-rails
237
+ requirement: !ruby/object:Gem::Requirement
238
+ requirements:
239
+ - - "~>"
240
+ - !ruby/object:Gem::Version
241
+ version: '2.1'
242
+ type: :development
243
+ prerelease: false
244
+ version_requirements: !ruby/object:Gem::Requirement
245
+ requirements:
246
+ - - "~>"
247
+ - !ruby/object:Gem::Version
248
+ version: '2.1'
249
+ - !ruby/object:Gem::Dependency
250
+ name: rubocop-rspec
251
+ requirement: !ruby/object:Gem::Requirement
252
+ requirements:
253
+ - - "~>"
254
+ - !ruby/object:Gem::Version
255
+ version: '1.44'
256
+ type: :development
257
+ prerelease: false
258
+ version_requirements: !ruby/object:Gem::Requirement
259
+ requirements:
260
+ - - "~>"
261
+ - !ruby/object:Gem::Version
262
+ version: '1.44'
167
263
  - !ruby/object:Gem::Dependency
168
264
  name: mysql2
169
265
  requirement: !ruby/object:Gem::Requirement
170
266
  requirements:
171
- - - ">="
267
+ - - "~>"
172
268
  - !ruby/object:Gem::Version
173
- version: '0'
269
+ version: '0.5'
174
270
  type: :development
175
271
  prerelease: false
176
272
  version_requirements: !ruby/object:Gem::Requirement
177
273
  requirements:
178
- - - ">="
274
+ - - "~>"
179
275
  - !ruby/object:Gem::Version
180
- version: '0'
276
+ version: '0.5'
181
277
  - !ruby/object:Gem::Dependency
182
278
  name: pg
183
279
  requirement: !ruby/object:Gem::Requirement
184
280
  requirements:
185
- - - ">="
281
+ - - "~>"
186
282
  - !ruby/object:Gem::Version
187
- version: '0'
283
+ version: '1.2'
188
284
  type: :development
189
285
  prerelease: false
190
286
  version_requirements: !ruby/object:Gem::Requirement
191
287
  requirements:
192
- - - ">="
288
+ - - "~>"
193
289
  - !ruby/object:Gem::Version
194
- version: '0'
290
+ version: '1.2'
195
291
  - !ruby/object:Gem::Dependency
196
292
  name: sqlite3
197
293
  requirement: !ruby/object:Gem::Requirement
@@ -216,27 +312,36 @@ executables: []
216
312
  extensions: []
217
313
  extra_rdoc_files: []
218
314
  files:
315
+ - ".circleci/config.yml"
219
316
  - ".github/ISSUE_TEMPLATE.md"
317
+ - ".github/workflows/changelog.yml"
318
+ - ".github/workflows/reviewdog.yml"
220
319
  - ".gitignore"
221
320
  - ".pryrc"
222
321
  - ".rspec"
223
- - ".travis.yml"
322
+ - ".rubocop.yml"
323
+ - ".rubocop_todo.yml"
324
+ - ".ruby-version"
325
+ - ".story_branch.yml"
224
326
  - Appraisals
327
+ - CHANGELOG.md
225
328
  - Gemfile
226
329
  - Guardfile
227
330
  - HISTORY.md
228
331
  - README.md
229
332
  - Rakefile
230
333
  - TODO.md
231
- - apartment.gemspec
232
334
  - docker-compose.yml
233
- - gemfiles/rails_4_2.gemfile
234
- - gemfiles/rails_5_0.gemfile
235
- - gemfiles/rails_5_1.gemfile
236
335
  - gemfiles/rails_5_2.gemfile
237
336
  - gemfiles/rails_6_0.gemfile
337
+ - gemfiles/rails_6_1.gemfile
338
+ - gemfiles/rails_7_0.gemfile
238
339
  - gemfiles/rails_master.gemfile
239
340
  - lib/apartment.rb
341
+ - lib/apartment/active_record/connection_handling.rb
342
+ - lib/apartment/active_record/internal_metadata.rb
343
+ - lib/apartment/active_record/postgresql_adapter.rb
344
+ - lib/apartment/active_record/schema_migration.rb
240
345
  - lib/apartment/adapters/abstract_adapter.rb
241
346
  - lib/apartment/adapters/abstract_jdbc_adapter.rb
242
347
  - lib/apartment/adapters/jdbc_mysql_adapter.rb
@@ -246,6 +351,7 @@ files:
246
351
  - lib/apartment/adapters/postgresql_adapter.rb
247
352
  - lib/apartment/adapters/sqlite3_adapter.rb
248
353
  - lib/apartment/console.rb
354
+ - lib/apartment/custom_console.rb
249
355
  - lib/apartment/deprecation.rb
250
356
  - lib/apartment/elevators/domain.rb
251
357
  - lib/apartment/elevators/first_subdomain.rb
@@ -253,116 +359,19 @@ files:
253
359
  - lib/apartment/elevators/host.rb
254
360
  - lib/apartment/elevators/host_hash.rb
255
361
  - lib/apartment/elevators/subdomain.rb
362
+ - lib/apartment/log_subscriber.rb
256
363
  - lib/apartment/migrator.rb
364
+ - lib/apartment/model.rb
257
365
  - lib/apartment/railtie.rb
258
- - lib/apartment/reloader.rb
259
366
  - lib/apartment/tasks/enhancements.rb
367
+ - lib/apartment/tasks/task_helper.rb
260
368
  - lib/apartment/tenant.rb
261
369
  - lib/apartment/version.rb
262
370
  - lib/generators/apartment/install/USAGE
263
371
  - lib/generators/apartment/install/install_generator.rb
264
372
  - lib/generators/apartment/install/templates/apartment.rb
265
373
  - lib/tasks/apartment.rake
266
- - spec/adapters/jdbc_mysql_adapter_spec.rb
267
- - spec/adapters/jdbc_postgresql_adapter_spec.rb
268
- - spec/adapters/mysql2_adapter_spec.rb
269
- - spec/adapters/postgresql_adapter_spec.rb
270
- - spec/adapters/sqlite3_adapter_spec.rb
271
- - spec/apartment_spec.rb
272
- - spec/config/database.yml.sample
273
- - spec/dummy/Rakefile
274
- - spec/dummy/app/controllers/application_controller.rb
275
- - spec/dummy/app/helpers/application_helper.rb
276
- - spec/dummy/app/models/company.rb
277
- - spec/dummy/app/models/user.rb
278
- - spec/dummy/app/views/application/index.html.erb
279
- - spec/dummy/app/views/layouts/application.html.erb
280
- - spec/dummy/config.ru
281
- - spec/dummy/config/application.rb
282
- - spec/dummy/config/boot.rb
283
- - spec/dummy/config/database.yml.sample
284
- - spec/dummy/config/environment.rb
285
- - spec/dummy/config/environments/development.rb
286
- - spec/dummy/config/environments/production.rb
287
- - spec/dummy/config/environments/test.rb
288
- - spec/dummy/config/initializers/apartment.rb
289
- - spec/dummy/config/initializers/backtrace_silencers.rb
290
- - spec/dummy/config/initializers/inflections.rb
291
- - spec/dummy/config/initializers/mime_types.rb
292
- - spec/dummy/config/initializers/secret_token.rb
293
- - spec/dummy/config/initializers/session_store.rb
294
- - spec/dummy/config/locales/en.yml
295
- - spec/dummy/config/routes.rb
296
- - spec/dummy/db/migrate/20110613152810_create_dummy_models.rb
297
- - spec/dummy/db/migrate/20111202022214_create_table_books.rb
298
- - spec/dummy/db/migrate/20180415260934_create_public_tokens.rb
299
- - spec/dummy/db/schema.rb
300
- - spec/dummy/db/seeds.rb
301
- - spec/dummy/db/seeds/import.rb
302
- - spec/dummy/db/test.sqlite3
303
- - spec/dummy/public/404.html
304
- - spec/dummy/public/422.html
305
- - spec/dummy/public/500.html
306
- - spec/dummy/public/favicon.ico
307
- - spec/dummy/public/stylesheets/.gitkeep
308
- - spec/dummy/script/rails
309
- - spec/dummy_engine/.gitignore
310
- - spec/dummy_engine/Gemfile
311
- - spec/dummy_engine/Rakefile
312
- - spec/dummy_engine/bin/rails
313
- - spec/dummy_engine/config/initializers/apartment.rb
314
- - spec/dummy_engine/dummy_engine.gemspec
315
- - spec/dummy_engine/lib/dummy_engine.rb
316
- - spec/dummy_engine/lib/dummy_engine/engine.rb
317
- - spec/dummy_engine/lib/dummy_engine/version.rb
318
- - spec/dummy_engine/test/dummy/Rakefile
319
- - spec/dummy_engine/test/dummy/config.ru
320
- - spec/dummy_engine/test/dummy/config/application.rb
321
- - spec/dummy_engine/test/dummy/config/boot.rb
322
- - spec/dummy_engine/test/dummy/config/database.yml
323
- - spec/dummy_engine/test/dummy/config/environment.rb
324
- - spec/dummy_engine/test/dummy/config/environments/development.rb
325
- - spec/dummy_engine/test/dummy/config/environments/production.rb
326
- - spec/dummy_engine/test/dummy/config/environments/test.rb
327
- - spec/dummy_engine/test/dummy/config/initializers/assets.rb
328
- - spec/dummy_engine/test/dummy/config/initializers/backtrace_silencers.rb
329
- - spec/dummy_engine/test/dummy/config/initializers/cookies_serializer.rb
330
- - spec/dummy_engine/test/dummy/config/initializers/filter_parameter_logging.rb
331
- - spec/dummy_engine/test/dummy/config/initializers/inflections.rb
332
- - spec/dummy_engine/test/dummy/config/initializers/mime_types.rb
333
- - spec/dummy_engine/test/dummy/config/initializers/session_store.rb
334
- - spec/dummy_engine/test/dummy/config/initializers/wrap_parameters.rb
335
- - spec/dummy_engine/test/dummy/config/locales/en.yml
336
- - spec/dummy_engine/test/dummy/config/routes.rb
337
- - spec/dummy_engine/test/dummy/config/secrets.yml
338
- - spec/examples/connection_adapter_examples.rb
339
- - spec/examples/generic_adapter_custom_configuration_example.rb
340
- - spec/examples/generic_adapter_examples.rb
341
- - spec/examples/schema_adapter_examples.rb
342
- - spec/integration/apartment_rake_integration_spec.rb
343
- - spec/integration/query_caching_spec.rb
344
- - spec/integration/use_within_an_engine_spec.rb
345
- - spec/schemas/v1.rb
346
- - spec/schemas/v2.rb
347
- - spec/schemas/v3.rb
348
- - spec/spec_helper.rb
349
- - spec/support/apartment_helpers.rb
350
- - spec/support/capybara_sessions.rb
351
- - spec/support/config.rb
352
- - spec/support/contexts.rb
353
- - spec/support/requirements.rb
354
- - spec/support/setup.rb
355
- - spec/tasks/apartment_rake_spec.rb
356
- - spec/tenant_spec.rb
357
- - spec/unit/config_spec.rb
358
- - spec/unit/elevators/domain_spec.rb
359
- - spec/unit/elevators/first_subdomain_spec.rb
360
- - spec/unit/elevators/generic_spec.rb
361
- - spec/unit/elevators/host_hash_spec.rb
362
- - spec/unit/elevators/host_spec.rb
363
- - spec/unit/elevators/subdomain_spec.rb
364
- - spec/unit/migrator_spec.rb
365
- - spec/unit/reloader_spec.rb
374
+ - ros-apartment.gemspec
366
375
  homepage: https://github.com/rails-on-services/apartment
367
376
  licenses:
368
377
  - MIT
@@ -382,109 +391,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
382
391
  - !ruby/object:Gem::Version
383
392
  version: '0'
384
393
  requirements: []
385
- rubyforge_project:
386
- rubygems_version: 2.7.6
394
+ rubygems_version: 3.1.6
387
395
  signing_key:
388
396
  specification_version: 4
389
397
  summary: A Ruby gem for managing database multitenancy. Apartment Gem drop in replacement
390
- test_files:
391
- - spec/adapters/jdbc_mysql_adapter_spec.rb
392
- - spec/adapters/jdbc_postgresql_adapter_spec.rb
393
- - spec/adapters/mysql2_adapter_spec.rb
394
- - spec/adapters/postgresql_adapter_spec.rb
395
- - spec/adapters/sqlite3_adapter_spec.rb
396
- - spec/apartment_spec.rb
397
- - spec/config/database.yml.sample
398
- - spec/dummy/Rakefile
399
- - spec/dummy/app/controllers/application_controller.rb
400
- - spec/dummy/app/helpers/application_helper.rb
401
- - spec/dummy/app/models/company.rb
402
- - spec/dummy/app/models/user.rb
403
- - spec/dummy/app/views/application/index.html.erb
404
- - spec/dummy/app/views/layouts/application.html.erb
405
- - spec/dummy/config.ru
406
- - spec/dummy/config/application.rb
407
- - spec/dummy/config/boot.rb
408
- - spec/dummy/config/database.yml.sample
409
- - spec/dummy/config/environment.rb
410
- - spec/dummy/config/environments/development.rb
411
- - spec/dummy/config/environments/production.rb
412
- - spec/dummy/config/environments/test.rb
413
- - spec/dummy/config/initializers/apartment.rb
414
- - spec/dummy/config/initializers/backtrace_silencers.rb
415
- - spec/dummy/config/initializers/inflections.rb
416
- - spec/dummy/config/initializers/mime_types.rb
417
- - spec/dummy/config/initializers/secret_token.rb
418
- - spec/dummy/config/initializers/session_store.rb
419
- - spec/dummy/config/locales/en.yml
420
- - spec/dummy/config/routes.rb
421
- - spec/dummy/db/migrate/20110613152810_create_dummy_models.rb
422
- - spec/dummy/db/migrate/20111202022214_create_table_books.rb
423
- - spec/dummy/db/migrate/20180415260934_create_public_tokens.rb
424
- - spec/dummy/db/schema.rb
425
- - spec/dummy/db/seeds.rb
426
- - spec/dummy/db/seeds/import.rb
427
- - spec/dummy/db/test.sqlite3
428
- - spec/dummy/public/404.html
429
- - spec/dummy/public/422.html
430
- - spec/dummy/public/500.html
431
- - spec/dummy/public/favicon.ico
432
- - spec/dummy/public/stylesheets/.gitkeep
433
- - spec/dummy/script/rails
434
- - spec/dummy_engine/.gitignore
435
- - spec/dummy_engine/Gemfile
436
- - spec/dummy_engine/Rakefile
437
- - spec/dummy_engine/bin/rails
438
- - spec/dummy_engine/config/initializers/apartment.rb
439
- - spec/dummy_engine/dummy_engine.gemspec
440
- - spec/dummy_engine/lib/dummy_engine.rb
441
- - spec/dummy_engine/lib/dummy_engine/engine.rb
442
- - spec/dummy_engine/lib/dummy_engine/version.rb
443
- - spec/dummy_engine/test/dummy/Rakefile
444
- - spec/dummy_engine/test/dummy/config.ru
445
- - spec/dummy_engine/test/dummy/config/application.rb
446
- - spec/dummy_engine/test/dummy/config/boot.rb
447
- - spec/dummy_engine/test/dummy/config/database.yml
448
- - spec/dummy_engine/test/dummy/config/environment.rb
449
- - spec/dummy_engine/test/dummy/config/environments/development.rb
450
- - spec/dummy_engine/test/dummy/config/environments/production.rb
451
- - spec/dummy_engine/test/dummy/config/environments/test.rb
452
- - spec/dummy_engine/test/dummy/config/initializers/assets.rb
453
- - spec/dummy_engine/test/dummy/config/initializers/backtrace_silencers.rb
454
- - spec/dummy_engine/test/dummy/config/initializers/cookies_serializer.rb
455
- - spec/dummy_engine/test/dummy/config/initializers/filter_parameter_logging.rb
456
- - spec/dummy_engine/test/dummy/config/initializers/inflections.rb
457
- - spec/dummy_engine/test/dummy/config/initializers/mime_types.rb
458
- - spec/dummy_engine/test/dummy/config/initializers/session_store.rb
459
- - spec/dummy_engine/test/dummy/config/initializers/wrap_parameters.rb
460
- - spec/dummy_engine/test/dummy/config/locales/en.yml
461
- - spec/dummy_engine/test/dummy/config/routes.rb
462
- - spec/dummy_engine/test/dummy/config/secrets.yml
463
- - spec/examples/connection_adapter_examples.rb
464
- - spec/examples/generic_adapter_custom_configuration_example.rb
465
- - spec/examples/generic_adapter_examples.rb
466
- - spec/examples/schema_adapter_examples.rb
467
- - spec/integration/apartment_rake_integration_spec.rb
468
- - spec/integration/query_caching_spec.rb
469
- - spec/integration/use_within_an_engine_spec.rb
470
- - spec/schemas/v1.rb
471
- - spec/schemas/v2.rb
472
- - spec/schemas/v3.rb
473
- - spec/spec_helper.rb
474
- - spec/support/apartment_helpers.rb
475
- - spec/support/capybara_sessions.rb
476
- - spec/support/config.rb
477
- - spec/support/contexts.rb
478
- - spec/support/requirements.rb
479
- - spec/support/setup.rb
480
- - spec/tasks/apartment_rake_spec.rb
481
- - spec/tenant_spec.rb
482
- - spec/unit/config_spec.rb
483
- - spec/unit/elevators/domain_spec.rb
484
- - spec/unit/elevators/first_subdomain_spec.rb
485
- - spec/unit/elevators/generic_spec.rb
486
- - spec/unit/elevators/host_hash_spec.rb
487
- - spec/unit/elevators/host_spec.rb
488
- - spec/unit/elevators/subdomain_spec.rb
489
- - spec/unit/migrator_spec.rb
490
- - spec/unit/reloader_spec.rb
398
+ test_files: []
data/.travis.yml DELETED
@@ -1,65 +0,0 @@
1
- os: linux
2
-
3
- language: ruby
4
- services:
5
- - docker
6
- rvm:
7
- - jruby-9.1.17.0
8
- - 2.1.9
9
- - 2.2.9
10
- - 2.3.6
11
- - 2.4.3
12
- - 2.5.0
13
- - 2.6.2
14
- - ruby-head
15
- gemfile:
16
- - gemfiles/rails_4_2.gemfile
17
- - gemfiles/rails_5_0.gemfile
18
- - gemfiles/rails_5_1.gemfile
19
- - gemfiles/rails_5_2.gemfile
20
- - gemfiles/rails_6_0.gemfile
21
- - gemfiles/rails_master.gemfile
22
- bundler_args: --without local
23
- before_install:
24
- - sudo /etc/init.d/mysql stop
25
- - sudo /etc/init.d/postgresql stop
26
- - docker-compose up -d
27
- - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
28
- - gem uninstall bundler -v '>= 2' -x || true
29
- - gem install bundler -v '< 2'
30
- env:
31
- RUBY_GC_MALLOC_LIMIT: 90000000
32
- RUBY_GC_HEAP_FREE_SLOTS: 200000
33
- jobs:
34
- allow_failures:
35
- - rvm: ruby-head
36
- - gemfile: gemfiles/rails_master.gemfile
37
- - rvm: jruby-9.1.17.0
38
- gemfile: gemfiles/rails_5_0.gemfile
39
- exclude:
40
- - rvm: 2.1.9
41
- gemfile: gemfiles/rails_5_0.gemfile
42
- - rvm: 2.1.9
43
- gemfile: gemfiles/rails_5_1.gemfile
44
- - rvm: 2.1.9
45
- gemfile: gemfiles/rails_5_2.gemfile
46
- - rvm: 2.1.9
47
- gemfile: gemfiles/rails_6_0.gemfile
48
- - rvm: 2.1.9
49
- gemfile: gemfiles/rails_master.gemfile
50
- - rvm: 2.2.9
51
- gemfile: gemfiles/rails_6_0.gemfile
52
- - rvm: 2.3.6
53
- gemfile: gemfiles/rails_6_0.gemfile
54
- - rvm: 2.4.3
55
- gemfile: gemfiles/rails_6_0.gemfile
56
- - rvm: jruby-9.1.17.0
57
- gemfile: gemfiles/rails_5_1.gemfile
58
- - rvm: jruby-9.1.17.0
59
- gemfile: gemfiles/rails_5_2.gemfile
60
- - rvm: jruby-9.1.17.0
61
- gemfile: gemfiles/rails_6_0.gemfile
62
- - rvm: jruby-9.1.17.0
63
- gemfile: gemfiles/rails_master.gemfile
64
- fast_finish: true
65
- cache: bundler