puzzle-apartment 2.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +71 -0
  3. data/.github/ISSUE_TEMPLATE.md +21 -0
  4. data/.github/workflows/changelog.yml +63 -0
  5. data/.github/workflows/reviewdog.yml +22 -0
  6. data/.gitignore +15 -0
  7. data/.pryrc +5 -0
  8. data/.rspec +4 -0
  9. data/.rubocop.yml +33 -0
  10. data/.rubocop_todo.yml +418 -0
  11. data/.ruby-version +1 -0
  12. data/.story_branch.yml +5 -0
  13. data/Appraisals +49 -0
  14. data/CHANGELOG.md +963 -0
  15. data/Gemfile +17 -0
  16. data/Guardfile +11 -0
  17. data/HISTORY.md +496 -0
  18. data/README.md +652 -0
  19. data/Rakefile +157 -0
  20. data/TODO.md +50 -0
  21. data/docker-compose.yml +33 -0
  22. data/gemfiles/rails_6_1.gemfile +17 -0
  23. data/gemfiles/rails_7_0.gemfile +17 -0
  24. data/gemfiles/rails_7_1.gemfile +17 -0
  25. data/gemfiles/rails_master.gemfile +17 -0
  26. data/lib/apartment/active_record/connection_handling.rb +34 -0
  27. data/lib/apartment/active_record/internal_metadata.rb +9 -0
  28. data/lib/apartment/active_record/postgresql_adapter.rb +39 -0
  29. data/lib/apartment/active_record/schema_migration.rb +13 -0
  30. data/lib/apartment/adapters/abstract_adapter.rb +275 -0
  31. data/lib/apartment/adapters/abstract_jdbc_adapter.rb +20 -0
  32. data/lib/apartment/adapters/jdbc_mysql_adapter.rb +19 -0
  33. data/lib/apartment/adapters/jdbc_postgresql_adapter.rb +62 -0
  34. data/lib/apartment/adapters/mysql2_adapter.rb +77 -0
  35. data/lib/apartment/adapters/postgis_adapter.rb +13 -0
  36. data/lib/apartment/adapters/postgresql_adapter.rb +284 -0
  37. data/lib/apartment/adapters/sqlite3_adapter.rb +66 -0
  38. data/lib/apartment/console.rb +24 -0
  39. data/lib/apartment/custom_console.rb +42 -0
  40. data/lib/apartment/deprecation.rb +11 -0
  41. data/lib/apartment/elevators/domain.rb +23 -0
  42. data/lib/apartment/elevators/first_subdomain.rb +18 -0
  43. data/lib/apartment/elevators/generic.rb +33 -0
  44. data/lib/apartment/elevators/host.rb +35 -0
  45. data/lib/apartment/elevators/host_hash.rb +26 -0
  46. data/lib/apartment/elevators/subdomain.rb +66 -0
  47. data/lib/apartment/log_subscriber.rb +45 -0
  48. data/lib/apartment/migrator.rb +52 -0
  49. data/lib/apartment/model.rb +29 -0
  50. data/lib/apartment/railtie.rb +68 -0
  51. data/lib/apartment/tasks/enhancements.rb +55 -0
  52. data/lib/apartment/tasks/task_helper.rb +52 -0
  53. data/lib/apartment/tenant.rb +63 -0
  54. data/lib/apartment/version.rb +5 -0
  55. data/lib/apartment.rb +159 -0
  56. data/lib/generators/apartment/install/USAGE +5 -0
  57. data/lib/generators/apartment/install/install_generator.rb +11 -0
  58. data/lib/generators/apartment/install/templates/apartment.rb +116 -0
  59. data/lib/tasks/apartment.rake +106 -0
  60. data/puzzle-apartment.gemspec +59 -0
  61. metadata +385 -0
@@ -0,0 +1,116 @@
1
+ # frozen_string_literal: true
2
+
3
+ # You can have Apartment route to the appropriate Tenant by adding some Rack middleware.
4
+ # Apartment can support many different "Elevators" that can take care of this routing to your data.
5
+ # Require whichever Elevator you're using below or none if you have a custom one.
6
+ #
7
+ # require 'apartment/elevators/generic'
8
+ # require 'apartment/elevators/domain'
9
+ require 'apartment/elevators/subdomain'
10
+ # require 'apartment/elevators/first_subdomain'
11
+ # require 'apartment/elevators/host'
12
+
13
+ #
14
+ # Apartment Configuration
15
+ #
16
+ Apartment.configure do |config|
17
+ # Add any models that you do not want to be multi-tenanted, but remain in the global (public) namespace.
18
+ # A typical example would be a Customer or Tenant model that stores each Tenant's information.
19
+ #
20
+ # config.excluded_models = %w{ Tenant }
21
+
22
+ # In order to migrate all of your Tenants you need to provide a list of Tenant names to Apartment.
23
+ # You can make this dynamic by providing a Proc object to be called on migrations.
24
+ # This object should yield either:
25
+ # - an array of strings representing each Tenant name.
26
+ # - a hash which keys are tenant names, and values custom db config
27
+ # (must contain all key/values required in database.yml)
28
+ #
29
+ # config.tenant_names = lambda{ Customer.pluck(:tenant_name) }
30
+ # config.tenant_names = ['tenant1', 'tenant2']
31
+ # config.tenant_names = {
32
+ # 'tenant1' => {
33
+ # adapter: 'postgresql',
34
+ # host: 'some_server',
35
+ # port: 5555,
36
+ # database: 'postgres' # this is not the name of the tenant's db
37
+ # # but the name of the database to connect to before creating the tenant's db
38
+ # # mandatory in postgresql
39
+ # },
40
+ # 'tenant2' => {
41
+ # adapter: 'postgresql',
42
+ # database: 'postgres' # this is not the name of the tenant's db
43
+ # # but the name of the database to connect to before creating the tenant's db
44
+ # # mandatory in postgresql
45
+ # }
46
+ # }
47
+ # config.tenant_names = lambda do
48
+ # Tenant.all.each_with_object({}) do |tenant, hash|
49
+ # hash[tenant.name] = tenant.db_configuration
50
+ # end
51
+ # end
52
+ #
53
+ config.tenant_names = -> { ToDo_Tenant_Or_User_Model.pluck :database }
54
+
55
+ # PostgreSQL:
56
+ # Specifies whether to use PostgreSQL schemas or create a new database per Tenant.
57
+ #
58
+ # MySQL:
59
+ # Specifies whether to switch databases by using `use` statement or re-establish connection.
60
+ #
61
+ # The default behaviour is true.
62
+ #
63
+ # config.use_schemas = true
64
+
65
+ #
66
+ # ==> PostgreSQL only options
67
+
68
+ # Apartment can be forced to use raw SQL dumps instead of schema.rb for creating new schemas.
69
+ # Use this when you are using some extra features in PostgreSQL that can't be represented in
70
+ # schema.rb, like materialized views etc. (only applies with use_schemas set to true).
71
+ # (Note: this option doesn't use db/structure.sql, it creates SQL dump by executing pg_dump)
72
+ #
73
+ # config.use_sql = false
74
+
75
+ # There are cases where you might want some schemas to always be in your search_path
76
+ # e.g when using a PostgreSQL extension like hstore.
77
+ # Any schemas added here will be available along with your selected Tenant.
78
+ #
79
+ # config.persistent_schemas = %w{ hstore }
80
+
81
+ # <== PostgreSQL only options
82
+ #
83
+
84
+ # By default, and only when not using PostgreSQL schemas, Apartment will prepend the environment
85
+ # to the tenant name to ensure there is no conflict between your environments.
86
+ # This is mainly for the benefit of your development and test environments.
87
+ # Uncomment the line below if you want to disable this behaviour in production.
88
+ #
89
+ # config.prepend_environment = !Rails.env.production?
90
+
91
+ # When using PostgreSQL schemas, the database dump will be namespaced, and
92
+ # apartment will substitute the default namespace (usually public) with the
93
+ # name of the new tenant when creating a new tenant. Some items must maintain
94
+ # a reference to the default namespace (ie public) - for instance, a default
95
+ # uuid generation. Uncomment the line below to create a list of namespaced
96
+ # items in the schema dump that should *not* have their namespace replaced by
97
+ # the new tenant
98
+ #
99
+ # config.pg_excluded_names = ["uuid_generate_v4"]
100
+
101
+ # Specifies whether the database and schema (when using PostgreSQL schemas) will prepend in ActiveRecord log.
102
+ # Uncomment the line below if you want to enable this behavior.
103
+ #
104
+ # config.active_record_log = true
105
+ end
106
+
107
+ # Setup a custom Tenant switching middleware. The Proc should return the name of the Tenant that
108
+ # you want to switch to.
109
+ # Rails.application.config.middleware.use Apartment::Elevators::Generic, lambda { |request|
110
+ # request.host.split('.').first
111
+ # }
112
+
113
+ # Rails.application.config.middleware.use Apartment::Elevators::Domain
114
+ Rails.application.config.middleware.use Apartment::Elevators::Subdomain
115
+ # Rails.application.config.middleware.use Apartment::Elevators::FirstSubdomain
116
+ # Rails.application.config.middleware.use Apartment::Elevators::Host
@@ -0,0 +1,106 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'apartment/migrator'
4
+ require 'apartment/tasks/task_helper'
5
+ require 'parallel'
6
+
7
+ apartment_namespace = namespace :apartment do
8
+ desc 'Create all tenants'
9
+ task :create do
10
+ Apartment::TaskHelper.warn_if_tenants_empty
11
+
12
+ Apartment::TaskHelper.tenants.each do |tenant|
13
+ Apartment::TaskHelper.create_tenant(tenant)
14
+ end
15
+ end
16
+
17
+ desc 'Drop all tenants'
18
+ task :drop do
19
+ Apartment::TaskHelper.tenants.each do |tenant|
20
+ puts("Dropping #{tenant} tenant")
21
+ Apartment::Tenant.drop(tenant)
22
+ rescue Apartment::TenantNotFound, ActiveRecord::NoDatabaseError => e
23
+ puts e.message
24
+ end
25
+ end
26
+
27
+ desc 'Migrate all tenants'
28
+ task :migrate do
29
+ Apartment::TaskHelper.warn_if_tenants_empty
30
+ Apartment::TaskHelper.each_tenant do |tenant|
31
+ Apartment::TaskHelper.migrate_tenant(tenant)
32
+ end
33
+ end
34
+
35
+ desc 'Seed all tenants'
36
+ task :seed do
37
+ Apartment::TaskHelper.warn_if_tenants_empty
38
+
39
+ Apartment::TaskHelper.each_tenant do |tenant|
40
+ Apartment::TaskHelper.create_tenant(tenant)
41
+ puts("Seeding #{tenant} tenant")
42
+ Apartment::Tenant.switch(tenant) do
43
+ Apartment::Tenant.seed
44
+ end
45
+ rescue Apartment::TenantNotFound => e
46
+ puts e.message
47
+ end
48
+ end
49
+
50
+ desc 'Rolls the migration back to the previous version (specify steps w/ STEP=n) across all tenants.'
51
+ task :rollback do
52
+ Apartment::TaskHelper.warn_if_tenants_empty
53
+
54
+ step = ENV['STEP'] ? ENV['STEP'].to_i : 1
55
+
56
+ Apartment::TaskHelper.each_tenant do |tenant|
57
+ puts("Rolling back #{tenant} tenant")
58
+ Apartment::Migrator.rollback tenant, step
59
+ rescue Apartment::TenantNotFound => e
60
+ puts e.message
61
+ end
62
+ end
63
+
64
+ namespace :migrate do
65
+ desc 'Runs the "up" for a given migration VERSION across all tenants.'
66
+ task :up do
67
+ Apartment::TaskHelper.warn_if_tenants_empty
68
+
69
+ version = ENV['VERSION'] ? ENV['VERSION'].to_i : nil
70
+ raise 'VERSION is required' unless version
71
+
72
+ Apartment::TaskHelper.each_tenant do |tenant|
73
+ puts("Migrating #{tenant} tenant up")
74
+ Apartment::Migrator.run :up, tenant, version
75
+ rescue Apartment::TenantNotFound => e
76
+ puts e.message
77
+ end
78
+ end
79
+
80
+ desc 'Runs the "down" for a given migration VERSION across all tenants.'
81
+ task :down do
82
+ Apartment::TaskHelper.warn_if_tenants_empty
83
+
84
+ version = ENV['VERSION'] ? ENV['VERSION'].to_i : nil
85
+ raise 'VERSION is required' unless version
86
+
87
+ Apartment::TaskHelper.each_tenant do |tenant|
88
+ puts("Migrating #{tenant} tenant down")
89
+ Apartment::Migrator.run :down, tenant, version
90
+ rescue Apartment::TenantNotFound => e
91
+ puts e.message
92
+ end
93
+ end
94
+
95
+ desc 'Rolls back the tenant one migration and re migrate up (options: STEP=x, VERSION=x).'
96
+ task :redo do
97
+ if ENV['VERSION']
98
+ apartment_namespace['migrate:down'].invoke
99
+ apartment_namespace['migrate:up'].invoke
100
+ else
101
+ apartment_namespace['rollback'].invoke
102
+ apartment_namespace['migrate'].invoke
103
+ end
104
+ end
105
+ end
106
+ end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH << File.expand_path('lib', __dir__)
4
+ require 'apartment/version'
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = 'puzzle-apartment'
8
+ s.version = Apartment::VERSION
9
+
10
+ s.authors = ['Ryan Brunner', 'Brad Robertson', 'Rui Baltazar']
11
+ s.summary = 'A Ruby gem for managing database multitenancy. Apartment Gem drop in replacement'
12
+ s.description = 'Apartment allows Rack applications to deal with database multitenancy through ActiveRecord'
13
+ s.email = ['ryan@influitive.com', 'brad@influitive.com', 'rui.p.baltazar@gmail.com']
14
+ # Specify which files should be added to the gem when it is released.
15
+ # The `git ls-files -z` loads the files in the RubyGem that have been
16
+ # added into git.
17
+ s.files = Dir.chdir(File.expand_path(__dir__)) do
18
+ `git ls-files -z`.split("\x0").reject do |f|
19
+ # NOTE: ignore all test related
20
+ f.match(%r{^(test|spec|features|documentation)/})
21
+ end
22
+ end
23
+ s.executables = s.files.grep(%r{^bin/}).map { |f| File.basename(f) }
24
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
25
+ s.require_paths = ['lib']
26
+
27
+ s.homepage = 'https://github.com/puzzle/apartment'
28
+ s.licenses = ['MIT']
29
+
30
+ s.add_dependency 'activerecord', '>= 6.1.0', '< 7.2'
31
+ s.add_dependency 'parallel', '>= 1.10'
32
+ s.add_dependency 'public_suffix', '>= 2.0.5'
33
+ s.add_dependency 'rack', '>= 1.3.6'
34
+
35
+ s.add_development_dependency 'appraisal', '~> 2.2'
36
+ s.add_development_dependency 'bundler', '>= 1.3', '< 3.0'
37
+ s.add_development_dependency 'guard-rspec', '~> 4.2'
38
+ s.add_development_dependency 'pry'
39
+ s.add_development_dependency 'rake', '~> 13.0'
40
+ s.add_development_dependency 'rspec', '~> 3.4'
41
+ s.add_development_dependency 'rspec_junit_formatter'
42
+ s.add_development_dependency 'rspec-rails', '~> 6.0'
43
+ s.add_development_dependency 'rubocop'
44
+ s.add_development_dependency 'rubocop-performance'
45
+ s.add_development_dependency 'rubocop-rails'
46
+ s.add_development_dependency 'rubocop-rspec'
47
+
48
+ if defined?(JRUBY_VERSION)
49
+ s.add_development_dependency 'activerecord-jdbc-adapter'
50
+ s.add_development_dependency 'activerecord-jdbcmysql-adapter'
51
+ s.add_development_dependency 'activerecord-jdbcpostgresql-adapter'
52
+ s.add_development_dependency 'jdbc-mysql'
53
+ s.add_development_dependency 'jdbc-postgres'
54
+ else
55
+ s.add_development_dependency 'mysql2', '~> 0.5'
56
+ s.add_development_dependency 'pg', '~> 1.2'
57
+ s.add_development_dependency 'sqlite3', '~> 1.3.6'
58
+ end
59
+ end
metadata ADDED
@@ -0,0 +1,385 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: puzzle-apartment
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.12.0
5
+ platform: ruby
6
+ authors:
7
+ - Ryan Brunner
8
+ - Brad Robertson
9
+ - Rui Baltazar
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2023-11-30 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: activerecord
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - ">="
20
+ - !ruby/object:Gem::Version
21
+ version: 6.1.0
22
+ - - "<"
23
+ - !ruby/object:Gem::Version
24
+ version: '7.2'
25
+ type: :runtime
26
+ prerelease: false
27
+ version_requirements: !ruby/object:Gem::Requirement
28
+ requirements:
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: 6.1.0
32
+ - - "<"
33
+ - !ruby/object:Gem::Version
34
+ version: '7.2'
35
+ - !ruby/object:Gem::Dependency
36
+ name: parallel
37
+ requirement: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '1.10'
42
+ type: :runtime
43
+ prerelease: false
44
+ version_requirements: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '1.10'
49
+ - !ruby/object:Gem::Dependency
50
+ name: public_suffix
51
+ requirement: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 2.0.5
56
+ type: :runtime
57
+ prerelease: false
58
+ version_requirements: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 2.0.5
63
+ - !ruby/object:Gem::Dependency
64
+ name: rack
65
+ requirement: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: 1.3.6
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: 1.3.6
77
+ - !ruby/object:Gem::Dependency
78
+ name: appraisal
79
+ requirement: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '2.2'
84
+ type: :development
85
+ prerelease: false
86
+ version_requirements: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: '2.2'
91
+ - !ruby/object:Gem::Dependency
92
+ name: bundler
93
+ requirement: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '1.3'
98
+ - - "<"
99
+ - !ruby/object:Gem::Version
100
+ version: '3.0'
101
+ type: :development
102
+ prerelease: false
103
+ version_requirements: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - ">="
106
+ - !ruby/object:Gem::Version
107
+ version: '1.3'
108
+ - - "<"
109
+ - !ruby/object:Gem::Version
110
+ version: '3.0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: guard-rspec
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '4.2'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '4.2'
125
+ - !ruby/object:Gem::Dependency
126
+ name: pry
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rake
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '13.0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '13.0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: rspec
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '3.4'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '3.4'
167
+ - !ruby/object:Gem::Dependency
168
+ name: rspec_junit_formatter
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: rspec-rails
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: '6.0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: '6.0'
195
+ - !ruby/object:Gem::Dependency
196
+ name: rubocop
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ - !ruby/object:Gem::Dependency
210
+ name: rubocop-performance
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - ">="
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - ">="
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
223
+ - !ruby/object:Gem::Dependency
224
+ name: rubocop-rails
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - ">="
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ type: :development
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - ">="
235
+ - !ruby/object:Gem::Version
236
+ version: '0'
237
+ - !ruby/object:Gem::Dependency
238
+ name: rubocop-rspec
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - ">="
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
244
+ type: :development
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - ">="
249
+ - !ruby/object:Gem::Version
250
+ version: '0'
251
+ - !ruby/object:Gem::Dependency
252
+ name: mysql2
253
+ requirement: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - "~>"
256
+ - !ruby/object:Gem::Version
257
+ version: '0.5'
258
+ type: :development
259
+ prerelease: false
260
+ version_requirements: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - "~>"
263
+ - !ruby/object:Gem::Version
264
+ version: '0.5'
265
+ - !ruby/object:Gem::Dependency
266
+ name: pg
267
+ requirement: !ruby/object:Gem::Requirement
268
+ requirements:
269
+ - - "~>"
270
+ - !ruby/object:Gem::Version
271
+ version: '1.2'
272
+ type: :development
273
+ prerelease: false
274
+ version_requirements: !ruby/object:Gem::Requirement
275
+ requirements:
276
+ - - "~>"
277
+ - !ruby/object:Gem::Version
278
+ version: '1.2'
279
+ - !ruby/object:Gem::Dependency
280
+ name: sqlite3
281
+ requirement: !ruby/object:Gem::Requirement
282
+ requirements:
283
+ - - "~>"
284
+ - !ruby/object:Gem::Version
285
+ version: 1.3.6
286
+ type: :development
287
+ prerelease: false
288
+ version_requirements: !ruby/object:Gem::Requirement
289
+ requirements:
290
+ - - "~>"
291
+ - !ruby/object:Gem::Version
292
+ version: 1.3.6
293
+ description: Apartment allows Rack applications to deal with database multitenancy
294
+ through ActiveRecord
295
+ email:
296
+ - ryan@influitive.com
297
+ - brad@influitive.com
298
+ - rui.p.baltazar@gmail.com
299
+ executables: []
300
+ extensions: []
301
+ extra_rdoc_files: []
302
+ files:
303
+ - ".circleci/config.yml"
304
+ - ".github/ISSUE_TEMPLATE.md"
305
+ - ".github/workflows/changelog.yml"
306
+ - ".github/workflows/reviewdog.yml"
307
+ - ".gitignore"
308
+ - ".pryrc"
309
+ - ".rspec"
310
+ - ".rubocop.yml"
311
+ - ".rubocop_todo.yml"
312
+ - ".ruby-version"
313
+ - ".story_branch.yml"
314
+ - Appraisals
315
+ - CHANGELOG.md
316
+ - Gemfile
317
+ - Guardfile
318
+ - HISTORY.md
319
+ - README.md
320
+ - Rakefile
321
+ - TODO.md
322
+ - docker-compose.yml
323
+ - gemfiles/rails_6_1.gemfile
324
+ - gemfiles/rails_7_0.gemfile
325
+ - gemfiles/rails_7_1.gemfile
326
+ - gemfiles/rails_master.gemfile
327
+ - lib/apartment.rb
328
+ - lib/apartment/active_record/connection_handling.rb
329
+ - lib/apartment/active_record/internal_metadata.rb
330
+ - lib/apartment/active_record/postgresql_adapter.rb
331
+ - lib/apartment/active_record/schema_migration.rb
332
+ - lib/apartment/adapters/abstract_adapter.rb
333
+ - lib/apartment/adapters/abstract_jdbc_adapter.rb
334
+ - lib/apartment/adapters/jdbc_mysql_adapter.rb
335
+ - lib/apartment/adapters/jdbc_postgresql_adapter.rb
336
+ - lib/apartment/adapters/mysql2_adapter.rb
337
+ - lib/apartment/adapters/postgis_adapter.rb
338
+ - lib/apartment/adapters/postgresql_adapter.rb
339
+ - lib/apartment/adapters/sqlite3_adapter.rb
340
+ - lib/apartment/console.rb
341
+ - lib/apartment/custom_console.rb
342
+ - lib/apartment/deprecation.rb
343
+ - lib/apartment/elevators/domain.rb
344
+ - lib/apartment/elevators/first_subdomain.rb
345
+ - lib/apartment/elevators/generic.rb
346
+ - lib/apartment/elevators/host.rb
347
+ - lib/apartment/elevators/host_hash.rb
348
+ - lib/apartment/elevators/subdomain.rb
349
+ - lib/apartment/log_subscriber.rb
350
+ - lib/apartment/migrator.rb
351
+ - lib/apartment/model.rb
352
+ - lib/apartment/railtie.rb
353
+ - lib/apartment/tasks/enhancements.rb
354
+ - lib/apartment/tasks/task_helper.rb
355
+ - lib/apartment/tenant.rb
356
+ - lib/apartment/version.rb
357
+ - lib/generators/apartment/install/USAGE
358
+ - lib/generators/apartment/install/install_generator.rb
359
+ - lib/generators/apartment/install/templates/apartment.rb
360
+ - lib/tasks/apartment.rake
361
+ - puzzle-apartment.gemspec
362
+ homepage: https://github.com/puzzle/apartment
363
+ licenses:
364
+ - MIT
365
+ metadata: {}
366
+ post_install_message:
367
+ rdoc_options: []
368
+ require_paths:
369
+ - lib
370
+ required_ruby_version: !ruby/object:Gem::Requirement
371
+ requirements:
372
+ - - ">="
373
+ - !ruby/object:Gem::Version
374
+ version: '0'
375
+ required_rubygems_version: !ruby/object:Gem::Requirement
376
+ requirements:
377
+ - - ">="
378
+ - !ruby/object:Gem::Version
379
+ version: '0'
380
+ requirements: []
381
+ rubygems_version: 3.4.10
382
+ signing_key:
383
+ specification_version: 4
384
+ summary: A Ruby gem for managing database multitenancy. Apartment Gem drop in replacement
385
+ test_files: []