ros-apartment 2.10.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,16 +1,27 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module ActiveRecord
4
- # This is monkeypatching activerecord to ensure that whenever a new connection is established it
3
+ module ActiveRecord # :nodoc:
4
+ # This is monkeypatching Active Record to ensure that whenever a new connection is established it
5
5
  # switches to the same tenant as before the connection switching. This problem is more evident when
6
6
  # using read replica in Rails 6
7
7
  module ConnectionHandling
8
- def connected_to_with_tenant(database: nil, role: nil, prevent_writes: false, &blk)
9
- current_tenant = Apartment::Tenant.current
8
+ if ActiveRecord.version.release <= Gem::Version.new('6.2')
9
+ def connected_to_with_tenant(database: nil, role: nil, prevent_writes: false, &blk)
10
+ current_tenant = Apartment::Tenant.current
10
11
 
11
- connected_to_without_tenant(database: database, role: role, prevent_writes: prevent_writes) do
12
- Apartment::Tenant.switch!(current_tenant)
13
- yield(blk)
12
+ connected_to_without_tenant(database: database, role: role, prevent_writes: prevent_writes) do
13
+ Apartment::Tenant.switch!(current_tenant)
14
+ yield(blk)
15
+ end
16
+ end
17
+ else
18
+ def connected_to_with_tenant(role: nil, prevent_writes: false, &blk)
19
+ current_tenant = Apartment::Tenant.current
20
+
21
+ connected_to_without_tenant(role: role, prevent_writes: prevent_writes) do
22
+ Apartment::Tenant.switch!(current_tenant)
23
+ yield(blk)
24
+ end
14
25
  end
15
26
  end
16
27
 
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ # rubocop:disable Style/ClassAndModuleChildren
4
+
5
+ # NOTE: This patch is meant to remove any schema_prefix appart from the ones for
6
+ # excluded models. The schema_prefix would be resolved by apartment's setting
7
+ # of search path
8
+ module Apartment::PostgreSqlAdapterPatch
9
+ def default_sequence_name(table, _column)
10
+ res = super
11
+
12
+ # for JDBC driver, if rescued in super_method, trim leading and trailing quotes
13
+ res.delete!('"') if defined?(JRUBY_VERSION)
14
+
15
+ schema_prefix = "#{Apartment::Tenant.current}."
16
+ default_tenant_prefix = "#{Apartment::Tenant.default_tenant}."
17
+
18
+ # NOTE: Excluded models should always access the sequence from the default
19
+ # tenant schema
20
+ if excluded_model?(table)
21
+ res.sub!(schema_prefix, default_tenant_prefix) if schema_prefix != default_tenant_prefix
22
+ return res
23
+ end
24
+
25
+ res.delete_prefix!(schema_prefix) if res&.starts_with?(schema_prefix)
26
+
27
+ res
28
+ end
29
+
30
+ private
31
+
32
+ def excluded_model?(table)
33
+ Apartment.excluded_models.any? { |m| m.constantize.table_name == table }
34
+ end
35
+ end
36
+
37
+ require 'active_record/connection_adapters/postgresql_adapter'
38
+
39
+ # NOTE: inject this into postgresql adapters
40
+ class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
41
+ include Apartment::PostgreSqlAdapterPatch
42
+ end
43
+ # rubocop:enable Style/ClassAndModuleChildren
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveRecord
4
- class SchemaMigration < ActiveRecord::Base # :nodoc:
4
+ class SchemaMigration # :nodoc:
5
5
  class << self
6
6
  def table_exists?
7
7
  connection.table_exists?(table_name)
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'apartment/adapters/abstract_adapter'
4
+ require 'apartment/active_record/postgresql_adapter'
4
5
 
5
6
  module Apartment
6
7
  module Tenant
@@ -41,7 +42,6 @@ module Apartment
41
42
  def reset
42
43
  @current = default_tenant
43
44
  Apartment.connection.schema_search_path = full_search_path
44
- reset_sequence_names
45
45
  end
46
46
 
47
47
  def init
@@ -81,9 +81,8 @@ module Apartment
81
81
  # there is a issue for prepared statement with changing search_path.
82
82
  # https://www.postgresql.org/docs/9.3/static/sql-prepare.html
83
83
  Apartment.connection.clear_cache! if postgresql_version < 90_300
84
- reset_sequence_names
85
- rescue *rescuable_exceptions
86
- raise TenantNotFound, "One of the following schema(s) is invalid: \"#{tenant}\" #{full_search_path}"
84
+ rescue *rescuable_exceptions => e
85
+ raise_schema_connect_to_new(tenant, e)
87
86
  end
88
87
 
89
88
  private
@@ -130,29 +129,18 @@ module Apartment
130
129
  Apartment.connection.send(:postgresql_version)
131
130
  end
132
131
 
133
- def reset_sequence_names
134
- # sequence_name contains the schema, so it must be reset after switch
135
- # There is `reset_sequence_name`, but that method actually goes to the database
136
- # to find out the new name. Therefore, we do this hack to only unset the name,
137
- # and it will be dynamically found the next time it is needed
138
- descendants_to_unset = ActiveRecord::Base.descendants
139
- .select { |c| c.instance_variable_defined?(:@sequence_name) }
140
- .reject do |c|
141
- c.instance_variable_defined?(:@explicit_sequence_name) &&
142
- c.instance_variable_get(:@explicit_sequence_name)
143
- end
144
- descendants_to_unset.each do |c|
145
- # NOTE: due to this https://github.com/rails-on-services/apartment/issues/81
146
- # unreproduceable error we're checking before trying to remove it
147
- c.remove_instance_variable :@sequence_name if c.instance_variable_defined?(:@sequence_name)
148
- end
149
- end
150
-
151
132
  def schema_exists?(schemas)
152
133
  return true unless Apartment.tenant_presence_check
153
134
 
154
135
  Array(schemas).all? { |schema| Apartment.connection.schema_exists?(schema.to_s) }
155
136
  end
137
+
138
+ def raise_schema_connect_to_new(tenant, exception)
139
+ raise TenantNotFound, <<~EXCEPTION_MESSAGE
140
+ Could not set search path to schemas, they may be invalid: "#{tenant}" #{full_search_path}.
141
+ Original error: #{exception.class}: #{exception}
142
+ EXCEPTION_MESSAGE
143
+ end
156
144
  end
157
145
 
158
146
  # Another Adapter for Postgresql when using schemas and SQL
@@ -1,21 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # A workaround to get `reload!` to also call Apartment::Tenant.init
4
- # This is unfortunate, but I haven't figured out how to hook into the reload process *after* files are reloaded
5
-
6
- # reloads the environment
7
- # rubocop:disable Style/OptionalBooleanParameter
8
- def reload!(print = true)
9
- puts 'Reloading...' if print
10
-
11
- # This triggers the to_prepare callbacks
12
- ActionDispatch::Callbacks.new(proc {}).call({})
13
- # Manually init Apartment again once classes are reloaded
14
- Apartment::Tenant.init
15
- true
16
- end
17
- # rubocop:enable Style/OptionalBooleanParameter
18
-
19
3
  def st(schema_name = nil)
20
4
  if schema_name.nil?
21
5
  tenant_list.each { |t| puts t }
@@ -8,26 +8,38 @@ module Apartment
8
8
  # NOTE: for some reason, if the method definition is not here, then the custom debug method is not called
9
9
  # rubocop:disable Lint/UselessMethodDefinition
10
10
  def sql(event)
11
- super(event)
11
+ super
12
12
  end
13
13
  # rubocop:enable Lint/UselessMethodDefinition
14
14
 
15
15
  private
16
16
 
17
- def debug(progname = nil, &block)
17
+ def debug(progname = nil, &)
18
18
  progname = " #{apartment_log}#{progname}" unless progname.nil?
19
19
 
20
- super(progname, &block)
20
+ super
21
21
  end
22
22
 
23
23
  def apartment_log
24
- database = color("[#{Apartment.connection.raw_connection.db}] ", ActiveSupport::LogSubscriber::MAGENTA, true)
25
- schema = nil
26
- unless Apartment.connection.schema_search_path.nil?
27
- schema = color("[#{Apartment.connection.schema_search_path.tr('"', '')}] ",
28
- ActiveSupport::LogSubscriber::YELLOW, true)
29
- end
24
+ database = color("[#{database_name}] ", ActiveSupport::LogSubscriber::MAGENTA, bold: true)
25
+ schema = current_search_path
26
+ schema = color("[#{schema.tr('"', '')}] ", ActiveSupport::LogSubscriber::YELLOW, bold: true) unless schema.nil?
30
27
  "#{database}#{schema}"
31
28
  end
29
+
30
+ def current_search_path
31
+ if Apartment.connection.respond_to?(:schema_search_path)
32
+ Apartment.connection.schema_search_path
33
+ else
34
+ Apartment::Tenant.current # all others
35
+ end
36
+ end
37
+
38
+ def database_name
39
+ db_name = Apartment.connection.raw_connection.try(:db) # PostgreSQL, PostGIS
40
+ db_name ||= Apartment.connection.raw_connection.try(:query_options)&.dig(:database) # Mysql
41
+ db_name ||= Apartment.connection.current_database # Failover
42
+ db_name
43
+ end
32
44
  end
33
45
  end
@@ -13,40 +13,22 @@ module Apartment
13
13
 
14
14
  migration_scope_block = ->(migration) { ENV['SCOPE'].blank? || (ENV['SCOPE'] == migration.scope) }
15
15
 
16
- if activerecord_below_5_2?
17
- ActiveRecord::Migrator.migrate(ActiveRecord::Migrator.migrations_paths, version, &migration_scope_block)
18
- else
19
- ActiveRecord::Base.connection.migration_context.migrate(version, &migration_scope_block)
20
- end
16
+ ActiveRecord::Base.connection.migration_context.migrate(version, &migration_scope_block)
21
17
  end
22
18
  end
23
19
 
24
20
  # Migrate up/down to a specific version
25
21
  def run(direction, database, version)
26
22
  Tenant.switch(database) do
27
- if activerecord_below_5_2?
28
- ActiveRecord::Migrator.run(direction, ActiveRecord::Migrator.migrations_paths, version)
29
- else
30
- ActiveRecord::Base.connection.migration_context.run(direction, version)
31
- end
23
+ ActiveRecord::Base.connection.migration_context.run(direction, version)
32
24
  end
33
25
  end
34
26
 
35
27
  # rollback latest migration `step` number of times
36
28
  def rollback(database, step = 1)
37
29
  Tenant.switch(database) do
38
- if activerecord_below_5_2?
39
- ActiveRecord::Migrator.rollback(ActiveRecord::Migrator.migrations_paths, step)
40
- else
41
- ActiveRecord::Base.connection.migration_context.rollback(step)
42
- end
30
+ ActiveRecord::Base.connection.migration_context.rollback(step)
43
31
  end
44
32
  end
45
-
46
- private
47
-
48
- def activerecord_below_5_2?
49
- ActiveRecord.version.release < Gem::Version.new('5.2.0')
50
- end
51
33
  end
52
34
  end
@@ -2,7 +2,6 @@
2
2
 
3
3
  require 'rails'
4
4
  require 'apartment/tenant'
5
- require 'apartment/reloader'
6
5
 
7
6
  module Apartment
8
7
  class Railtie < Rails::Railtie
@@ -48,7 +47,12 @@ module Apartment
48
47
  config.after_initialize do
49
48
  # NOTE: Load the custom log subscriber if enabled
50
49
  if Apartment.active_record_log
51
- ActiveSupport::Notifications.unsubscribe 'sql.active_record'
50
+ ActiveSupport::Notifications.notifier.listeners_for('sql.active_record').each do |listener|
51
+ next unless listener.instance_variable_get('@delegate').is_a?(ActiveRecord::LogSubscriber)
52
+
53
+ ActiveSupport::Notifications.unsubscribe listener
54
+ end
55
+
52
56
  Apartment::LogSubscriber.attach_to :active_record
53
57
  end
54
58
  end
@@ -60,23 +64,5 @@ module Apartment
60
64
  load 'tasks/apartment.rake'
61
65
  require 'apartment/tasks/enhancements' if Apartment.db_migrate_tenants
62
66
  end
63
-
64
- #
65
- # The following initializers are a workaround to the fact that I can't properly hook into the rails reloader
66
- # Note this is technically valid for any environment where cache_classes is false, for us, it's just development
67
- #
68
- if Rails.env.development?
69
-
70
- # Apartment::Reloader is middleware to initialize things properly on each request to dev
71
- initializer 'apartment.init' do |app|
72
- app.config.middleware.use Apartment::Reloader
73
- end
74
-
75
- # Overrides reload! to also call Apartment::Tenant.init as well
76
- # so that the reloaded classes have the proper table_names
77
- console do
78
- require 'apartment/console'
79
- end
80
- end
81
67
  end
82
68
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Apartment
4
- VERSION = '2.10.0'
4
+ VERSION = '3.0.1'
5
5
  end
data/lib/apartment.rb CHANGED
@@ -7,15 +7,9 @@ require 'active_record'
7
7
  require 'apartment/tenant'
8
8
 
9
9
  require_relative 'apartment/log_subscriber'
10
-
11
- if ActiveRecord.version.release >= Gem::Version.new('6.0')
12
- require_relative 'apartment/active_record/connection_handling'
13
- end
14
-
15
- if ActiveRecord.version.release >= Gem::Version.new('6.1')
16
- require_relative 'apartment/active_record/schema_migration'
17
- require_relative 'apartment/active_record/internal_metadata'
18
- end
10
+ require_relative 'apartment/active_record/connection_handling'
11
+ require_relative 'apartment/active_record/schema_migration'
12
+ require_relative 'apartment/active_record/internal_metadata'
19
13
 
20
14
  # Apartment main definitions
21
15
  module Apartment
@@ -33,14 +27,10 @@ module Apartment
33
27
  attr_accessor(*ACCESSOR_METHODS)
34
28
  attr_writer(*WRITER_METHODS)
35
29
 
36
- if ActiveRecord.version.release >= Gem::Version.new('6.1')
37
- def_delegators :connection_class, :connection, :connection_db_config, :establish_connection
30
+ def_delegators :connection_class, :connection, :connection_db_config, :establish_connection
38
31
 
39
- def connection_config
40
- connection_db_config.configuration_hash
41
- end
42
- else
43
- def_delegators :connection_class, :connection, :connection_config, :establish_connection
32
+ def connection_config
33
+ connection_db_config.configuration_hash
44
34
  end
45
35
 
46
36
  # configure apartment with available options
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.files = Dir.chdir(File.expand_path(__dir__)) do
18
18
  `git ls-files -z`.split("\x0").reject do |f|
19
19
  # NOTE: ignore all test related
20
- f.match(%r{^(test|spec|features|documentation)/})
20
+ f.match(%r{^(test|spec|features|documentation|gemfiles|.github)/})
21
21
  end
22
22
  end
23
23
  s.executables = s.files.grep(%r{^bin/}).map { |f| File.basename(f) }
@@ -26,11 +26,14 @@ Gem::Specification.new do |s|
26
26
 
27
27
  s.homepage = 'https://github.com/rails-on-services/apartment'
28
28
  s.licenses = ['MIT']
29
+ s.metadata = {
30
+ 'github_repo' => 'ssh://github.com/rails-on-services/apartment'
31
+ }
29
32
 
30
- s.add_dependency 'activerecord', '>= 5.0.0', '< 6.2'
33
+ s.add_dependency 'activerecord', '>= 6.1.0', '< 7.2'
31
34
  s.add_dependency 'parallel', '< 2.0'
32
- s.add_dependency 'public_suffix', '>= 2.0.5', '< 5.0'
33
- s.add_dependency 'rack', '>= 1.3.6', '< 3.0'
35
+ s.add_dependency 'public_suffix', '>= 2.0.5', '< 6.0'
36
+ s.add_dependency 'rack', '>= 1.3.6', '< 4.0'
34
37
 
35
38
  s.add_development_dependency 'appraisal', '~> 2.2'
36
39
  s.add_development_dependency 'bundler', '>= 1.3', '< 3.0'
@@ -39,11 +42,11 @@ Gem::Specification.new do |s|
39
42
  s.add_development_dependency 'rake', '~> 13.0'
40
43
  s.add_development_dependency 'rspec', '~> 3.4'
41
44
  s.add_development_dependency 'rspec_junit_formatter'
42
- s.add_development_dependency 'rspec-rails', '~> 3.4'
43
- s.add_development_dependency 'rubocop', '~> 0.93'
44
- s.add_development_dependency 'rubocop-performance', '~> 1.10'
45
- s.add_development_dependency 'rubocop-rails', '~> 2.1'
46
- s.add_development_dependency 'rubocop-rspec', '~> 1.44'
45
+ s.add_development_dependency 'rspec-rails', '~> 6.1'
46
+ s.add_development_dependency 'rubocop', '~> 1.63'
47
+ s.add_development_dependency 'rubocop-performance', '~> 1.21'
48
+ s.add_development_dependency 'rubocop-rails', '~> 2.24'
49
+ s.add_development_dependency 'rubocop-rspec', '~> 2.29'
47
50
 
48
51
  if defined?(JRUBY_VERSION)
49
52
  s.add_development_dependency 'activerecord-jdbc-adapter'
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.10.0
4
+ version: 3.0.1
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: 2021-09-13 00:00:00.000000000 Z
13
+ date: 2024-05-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord
@@ -18,20 +18,20 @@ dependencies:
18
18
  requirements:
19
19
  - - ">="
20
20
  - !ruby/object:Gem::Version
21
- version: 5.0.0
21
+ version: 6.1.0
22
22
  - - "<"
23
23
  - !ruby/object:Gem::Version
24
- version: '6.2'
24
+ version: '7.2'
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: 5.0.0
31
+ version: 6.1.0
32
32
  - - "<"
33
33
  - !ruby/object:Gem::Version
34
- version: '6.2'
34
+ version: '7.2'
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: parallel
37
37
  requirement: !ruby/object:Gem::Requirement
@@ -55,7 +55,7 @@ dependencies:
55
55
  version: 2.0.5
56
56
  - - "<"
57
57
  - !ruby/object:Gem::Version
58
- version: '5.0'
58
+ version: '6.0'
59
59
  type: :runtime
60
60
  prerelease: false
61
61
  version_requirements: !ruby/object:Gem::Requirement
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: 2.0.5
66
66
  - - "<"
67
67
  - !ruby/object:Gem::Version
68
- version: '5.0'
68
+ version: '6.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rack
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -75,7 +75,7 @@ dependencies:
75
75
  version: 1.3.6
76
76
  - - "<"
77
77
  - !ruby/object:Gem::Version
78
- version: '3.0'
78
+ version: '4.0'
79
79
  type: :runtime
80
80
  prerelease: false
81
81
  version_requirements: !ruby/object:Gem::Requirement
@@ -85,7 +85,7 @@ dependencies:
85
85
  version: 1.3.6
86
86
  - - "<"
87
87
  - !ruby/object:Gem::Version
88
- version: '3.0'
88
+ version: '4.0'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: appraisal
91
91
  requirement: !ruby/object:Gem::Requirement
@@ -196,70 +196,70 @@ dependencies:
196
196
  requirements:
197
197
  - - "~>"
198
198
  - !ruby/object:Gem::Version
199
- version: '3.4'
199
+ version: '6.1'
200
200
  type: :development
201
201
  prerelease: false
202
202
  version_requirements: !ruby/object:Gem::Requirement
203
203
  requirements:
204
204
  - - "~>"
205
205
  - !ruby/object:Gem::Version
206
- version: '3.4'
206
+ version: '6.1'
207
207
  - !ruby/object:Gem::Dependency
208
208
  name: rubocop
209
209
  requirement: !ruby/object:Gem::Requirement
210
210
  requirements:
211
211
  - - "~>"
212
212
  - !ruby/object:Gem::Version
213
- version: '0.93'
213
+ version: '1.63'
214
214
  type: :development
215
215
  prerelease: false
216
216
  version_requirements: !ruby/object:Gem::Requirement
217
217
  requirements:
218
218
  - - "~>"
219
219
  - !ruby/object:Gem::Version
220
- version: '0.93'
220
+ version: '1.63'
221
221
  - !ruby/object:Gem::Dependency
222
222
  name: rubocop-performance
223
223
  requirement: !ruby/object:Gem::Requirement
224
224
  requirements:
225
225
  - - "~>"
226
226
  - !ruby/object:Gem::Version
227
- version: '1.10'
227
+ version: '1.21'
228
228
  type: :development
229
229
  prerelease: false
230
230
  version_requirements: !ruby/object:Gem::Requirement
231
231
  requirements:
232
232
  - - "~>"
233
233
  - !ruby/object:Gem::Version
234
- version: '1.10'
234
+ version: '1.21'
235
235
  - !ruby/object:Gem::Dependency
236
236
  name: rubocop-rails
237
237
  requirement: !ruby/object:Gem::Requirement
238
238
  requirements:
239
239
  - - "~>"
240
240
  - !ruby/object:Gem::Version
241
- version: '2.1'
241
+ version: '2.24'
242
242
  type: :development
243
243
  prerelease: false
244
244
  version_requirements: !ruby/object:Gem::Requirement
245
245
  requirements:
246
246
  - - "~>"
247
247
  - !ruby/object:Gem::Version
248
- version: '2.1'
248
+ version: '2.24'
249
249
  - !ruby/object:Gem::Dependency
250
250
  name: rubocop-rspec
251
251
  requirement: !ruby/object:Gem::Requirement
252
252
  requirements:
253
253
  - - "~>"
254
254
  - !ruby/object:Gem::Version
255
- version: '1.44'
255
+ version: '2.29'
256
256
  type: :development
257
257
  prerelease: false
258
258
  version_requirements: !ruby/object:Gem::Requirement
259
259
  requirements:
260
260
  - - "~>"
261
261
  - !ruby/object:Gem::Version
262
- version: '1.44'
262
+ version: '2.29'
263
263
  - !ruby/object:Gem::Dependency
264
264
  name: mysql2
265
265
  requirement: !ruby/object:Gem::Requirement
@@ -312,36 +312,22 @@ executables: []
312
312
  extensions: []
313
313
  extra_rdoc_files: []
314
314
  files:
315
- - ".circleci/config.yml"
316
- - ".github/ISSUE_TEMPLATE.md"
317
- - ".github/workflows/changelog.yml"
318
- - ".github/workflows/reviewdog.yml"
319
315
  - ".gitignore"
320
316
  - ".pryrc"
321
317
  - ".rspec"
322
318
  - ".rubocop.yml"
323
319
  - ".rubocop_todo.yml"
324
320
  - ".ruby-version"
325
- - ".story_branch.yml"
326
321
  - Appraisals
327
322
  - CHANGELOG.md
328
323
  - Gemfile
329
324
  - Guardfile
330
- - HISTORY.md
331
325
  - README.md
332
326
  - Rakefile
333
- - TODO.md
334
- - docker-compose.yml
335
- - gemfiles/rails_4_2.gemfile
336
- - gemfiles/rails_5_0.gemfile
337
- - gemfiles/rails_5_1.gemfile
338
- - gemfiles/rails_5_2.gemfile
339
- - gemfiles/rails_6_0.gemfile
340
- - gemfiles/rails_6_1.gemfile
341
- - gemfiles/rails_master.gemfile
342
327
  - lib/apartment.rb
343
328
  - lib/apartment/active_record/connection_handling.rb
344
329
  - lib/apartment/active_record/internal_metadata.rb
330
+ - lib/apartment/active_record/postgresql_adapter.rb
345
331
  - lib/apartment/active_record/schema_migration.rb
346
332
  - lib/apartment/adapters/abstract_adapter.rb
347
333
  - lib/apartment/adapters/abstract_jdbc_adapter.rb
@@ -364,7 +350,6 @@ files:
364
350
  - lib/apartment/migrator.rb
365
351
  - lib/apartment/model.rb
366
352
  - lib/apartment/railtie.rb
367
- - lib/apartment/reloader.rb
368
353
  - lib/apartment/tasks/enhancements.rb
369
354
  - lib/apartment/tasks/task_helper.rb
370
355
  - lib/apartment/tenant.rb
@@ -377,7 +362,8 @@ files:
377
362
  homepage: https://github.com/rails-on-services/apartment
378
363
  licenses:
379
364
  - MIT
380
- metadata: {}
365
+ metadata:
366
+ github_repo: ssh://github.com/rails-on-services/apartment
381
367
  post_install_message:
382
368
  rdoc_options: []
383
369
  require_paths:
@@ -393,7 +379,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
393
379
  - !ruby/object:Gem::Version
394
380
  version: '0'
395
381
  requirements: []
396
- rubygems_version: 3.1.6
382
+ rubygems_version: 3.3.26
397
383
  signing_key:
398
384
  specification_version: 4
399
385
  summary: A Ruby gem for managing database multitenancy. Apartment Gem drop in replacement