puzzle-apartment 2.12.0 → 2.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +6 -2
- data/.github/workflows/main.yml +72 -0
- data/.ruby-version +1 -1
- data/Appraisals +29 -16
- data/Rakefile +12 -17
- data/gemfiles/rails_7_2.gemfile +17 -0
- data/gemfiles/rails_8_0.gemfile +17 -0
- data/lib/apartment/active_record/postgres/schema_dumper.rb +12 -0
- data/lib/apartment/adapters/abstract_adapter.rb +1 -1
- data/lib/apartment/migrator.rb +6 -11
- data/lib/apartment/version.rb +1 -1
- data/lib/apartment.rb +8 -14
- data/puzzle-apartment.gemspec +12 -7
- metadata +47 -28
- data/gemfiles/rails_6_1.gemfile +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '09edf593efc08250fcc7f5436f7e38eb62ad8ed28b58351c52f1de87b2fb32c0'
|
4
|
+
data.tar.gz: f7302fa34a6591c98781c6b84fe6d19f70f52be4bfe9497c107d0d5dcb82437c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 141947b914b8ded109805024c2b3d498e61bd62a25d7ae713abdf842f506c891c2495e96841b44249165dd7d0a2b6858994546041a7b697be9b8f04e4fb080dd
|
7
|
+
data.tar.gz: edf7152cf72b08ae6795807be2459c29577ce4de7c2cb3bbf11a3a227f2651a8b59da82ed76a5406c3b5214fcee243036046bfdc1d051a697232d603160281da
|
data/.circleci/config.yml
CHANGED
@@ -62,10 +62,14 @@ workflows:
|
|
62
62
|
- build:
|
63
63
|
matrix:
|
64
64
|
parameters:
|
65
|
-
ruby_version: ["ruby:3.
|
65
|
+
ruby_version: ["ruby:3.1.4", "ruby:3.2.2", "ruby:3.3.6"]
|
66
66
|
gemfile:
|
67
67
|
[
|
68
|
-
"gemfiles/rails_6_1.gemfile",
|
69
68
|
"gemfiles/rails_7_0.gemfile",
|
70
69
|
"gemfiles/rails_7_1.gemfile",
|
70
|
+
"gemfiles/rails_7_2.gemfile",
|
71
|
+
"gemfiles/rails_8_0.gemfile",
|
71
72
|
]
|
73
|
+
exclude:
|
74
|
+
- ruby_version: "ruby:3.1.4"
|
75
|
+
gemfile: "gemfiles/rails_8_0.gemfile"
|
@@ -0,0 +1,72 @@
|
|
1
|
+
name: RSpec
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches:
|
5
|
+
- development
|
6
|
+
- main
|
7
|
+
pull_request:
|
8
|
+
types: [opened, synchronize, reopened]
|
9
|
+
release:
|
10
|
+
types: [published]
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
test:
|
14
|
+
name: rails / rspec
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
strategy:
|
17
|
+
fail-fast: false
|
18
|
+
matrix:
|
19
|
+
ruby_version:
|
20
|
+
- 3.1
|
21
|
+
- 3.2
|
22
|
+
- 3.3
|
23
|
+
rails_version:
|
24
|
+
- 7_0
|
25
|
+
- 7_1
|
26
|
+
- 7_2
|
27
|
+
- 8_0
|
28
|
+
exclude:
|
29
|
+
- rails_version: 8_0
|
30
|
+
ruby_version: 3.1
|
31
|
+
env:
|
32
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails_version }}.gemfile
|
33
|
+
CI: true
|
34
|
+
services:
|
35
|
+
postgres:
|
36
|
+
image: postgres:14 # pg_dump tests currently depend on this version
|
37
|
+
env:
|
38
|
+
POSTGRES_PASSWORD: postgres
|
39
|
+
POSTGRES_HOST_AUTH_METHOD: trust
|
40
|
+
POSTGRES_DB: apartment_postgresql_test
|
41
|
+
options: >-
|
42
|
+
--health-cmd pg_isready
|
43
|
+
--health-interval 10s
|
44
|
+
--health-timeout 5s
|
45
|
+
--health-retries 5
|
46
|
+
ports:
|
47
|
+
- 5432:5432
|
48
|
+
mysql:
|
49
|
+
image: mysql:8.0
|
50
|
+
env:
|
51
|
+
MYSQL_ALLOW_EMPTY_PASSWORD: true
|
52
|
+
MYSQL_DATABASE: apartment_mysql_test
|
53
|
+
options: >-
|
54
|
+
--health-cmd "mysqladmin ping"
|
55
|
+
--health-interval 10s
|
56
|
+
--health-timeout 5s
|
57
|
+
--health-retries 5
|
58
|
+
ports:
|
59
|
+
- 3306:3306
|
60
|
+
steps:
|
61
|
+
- uses: actions/checkout@v4
|
62
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
63
|
+
uses: ruby/setup-ruby@v1
|
64
|
+
with:
|
65
|
+
ruby-version: ${{ matrix.ruby_version }}
|
66
|
+
bundler-cache: true
|
67
|
+
- name: Configure config database.yml
|
68
|
+
run: bundle exec rake db:copy_credentials
|
69
|
+
- name: Database Setup
|
70
|
+
run: bundle exec rake db:test:prepare
|
71
|
+
- name: Run tests
|
72
|
+
run: bundle exec rspec --format progress --format RspecJunitFormatter -o ~/test-results/rspec/rspec.xml
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.3.6
|
data/Appraisals
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
appraise 'rails-
|
4
|
-
gem 'rails', '~>
|
3
|
+
appraise 'rails-7-0' do
|
4
|
+
gem 'rails', '~> 7.0.0'
|
5
5
|
platforms :ruby do
|
6
6
|
gem 'sqlite3', '~> 1.4'
|
7
7
|
end
|
@@ -12,10 +12,10 @@ appraise 'rails-6-1' do
|
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
-
appraise 'rails-7-
|
16
|
-
gem 'rails', '~> 7.
|
15
|
+
appraise 'rails-7-1' do
|
16
|
+
gem 'rails', '~> 7.1.0'
|
17
17
|
platforms :ruby do
|
18
|
-
gem 'sqlite3', '~> 1.
|
18
|
+
gem 'sqlite3', '~> 1.6'
|
19
19
|
end
|
20
20
|
platforms :jruby do
|
21
21
|
gem 'activerecord-jdbc-adapter', '~> 61.0'
|
@@ -24,26 +24,39 @@ appraise 'rails-7-0' do
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
appraise 'rails-7-
|
28
|
-
gem 'rails', '~> 7.
|
27
|
+
appraise 'rails-7-2' do
|
28
|
+
gem 'rails', '~> 7.2.0'
|
29
29
|
platforms :ruby do
|
30
30
|
gem 'sqlite3', '~> 1.6'
|
31
31
|
end
|
32
32
|
platforms :jruby do
|
33
|
-
gem 'activerecord-jdbc-adapter', '~>
|
34
|
-
gem 'activerecord-jdbcpostgresql-adapter', '~>
|
35
|
-
gem 'activerecord-jdbcmysql-adapter', '~>
|
33
|
+
gem 'activerecord-jdbc-adapter', '~> 70.0'
|
34
|
+
gem 'activerecord-jdbcpostgresql-adapter', '~> 70.0'
|
35
|
+
gem 'activerecord-jdbcmysql-adapter', '~> 70.0'
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
-
appraise 'rails-
|
40
|
-
gem 'rails',
|
39
|
+
appraise 'rails-8-0' do
|
40
|
+
gem 'rails', '~> 8.0.0'
|
41
41
|
platforms :ruby do
|
42
|
-
gem 'sqlite3', '~>
|
42
|
+
gem 'sqlite3', '~> 2.0'
|
43
43
|
end
|
44
44
|
platforms :jruby do
|
45
|
-
gem 'activerecord-jdbc-adapter', '~>
|
46
|
-
gem 'activerecord-jdbcpostgresql-adapter', '~>
|
47
|
-
gem 'activerecord-jdbcmysql-adapter', '~>
|
45
|
+
gem 'activerecord-jdbc-adapter', '~> 70.0'
|
46
|
+
gem 'activerecord-jdbcpostgresql-adapter', '~> 70.0'
|
47
|
+
gem 'activerecord-jdbcmysql-adapter', '~> 70.0'
|
48
48
|
end
|
49
49
|
end
|
50
|
+
|
51
|
+
# Install Rails from the main branch are failing
|
52
|
+
# appraise 'rails-master' do
|
53
|
+
# gem 'rails', git: 'https://github.com/rails/rails.git'
|
54
|
+
# platforms :ruby do
|
55
|
+
# gem 'sqlite3', '~> 2.0'
|
56
|
+
# end
|
57
|
+
# platforms :jruby do
|
58
|
+
# gem 'activerecord-jdbc-adapter', '~> 61.0'
|
59
|
+
# gem 'activerecord-jdbcpostgresql-adapter', '~> 61.0'
|
60
|
+
# gem 'activerecord-jdbcmysql-adapter', '~> 61.0'
|
61
|
+
# end
|
62
|
+
# end
|
data/Rakefile
CHANGED
@@ -15,6 +15,7 @@ require 'rspec/core/rake_task'
|
|
15
15
|
|
16
16
|
RSpec::Core::RakeTask.new(spec: %w[db:copy_credentials db:test:prepare]) do |spec|
|
17
17
|
spec.pattern = 'spec/**/*_spec.rb'
|
18
|
+
spec.rspec_opts = "--tag ~database:#{ENV['DB'] == 'pg' ? 'mysql' : 'postgresql'}" if ENV['DB'].present?
|
18
19
|
# spec.rspec_opts = '--order rand:47078'
|
19
20
|
end
|
20
21
|
|
@@ -59,6 +60,8 @@ namespace :postgres do
|
|
59
60
|
|
60
61
|
desc 'Build the PostgreSQL test databases'
|
61
62
|
task :build_db do
|
63
|
+
next if ENV['DB'] && ENV['DB'] != 'pg'
|
64
|
+
|
62
65
|
params = []
|
63
66
|
params << '-E UTF8'
|
64
67
|
params << pg_config['database']
|
@@ -77,6 +80,8 @@ namespace :postgres do
|
|
77
80
|
|
78
81
|
desc 'drop the PostgreSQL test database'
|
79
82
|
task :drop_db do
|
83
|
+
next if ENV['DB'] && ENV['DB'] != 'pg'
|
84
|
+
|
80
85
|
puts "dropping database #{pg_config['database']}"
|
81
86
|
params = []
|
82
87
|
params << pg_config['database']
|
@@ -93,6 +98,8 @@ namespace :mysql do
|
|
93
98
|
|
94
99
|
desc 'Build the MySQL test databases'
|
95
100
|
task :build_db do
|
101
|
+
next if ENV['DB'] && ENV['DB'] != 'mysql'
|
102
|
+
|
96
103
|
params = []
|
97
104
|
params << "-h #{my_config['host']}" if my_config['host']
|
98
105
|
params << "-u #{my_config['username']}" if my_config['username']
|
@@ -109,6 +116,8 @@ namespace :mysql do
|
|
109
116
|
|
110
117
|
desc 'drop the MySQL test database'
|
111
118
|
task :drop_db do
|
119
|
+
next if ENV['DB'] && ENV['DB'] != 'mysql'
|
120
|
+
|
112
121
|
puts "dropping database #{my_config['database']}"
|
113
122
|
params = []
|
114
123
|
params << "-h #{my_config['host']}" if my_config['host']
|
@@ -132,26 +141,12 @@ def my_config
|
|
132
141
|
config['mysql']
|
133
142
|
end
|
134
143
|
|
135
|
-
def activerecord_below_5_2?
|
136
|
-
ActiveRecord.version.release < Gem::Version.new('5.2.0')
|
137
|
-
end
|
138
|
-
|
139
|
-
def activerecord_below_6_0?
|
140
|
-
ActiveRecord.version.release < Gem::Version.new('6.0.0')
|
141
|
-
end
|
142
|
-
|
143
|
-
def activerecord_above_7_0?
|
144
|
-
ActiveRecord.version.release > Gem::Version.new('7.0.0')
|
145
|
-
end
|
146
|
-
|
147
144
|
def migrate
|
148
|
-
if
|
149
|
-
|
150
|
-
|
145
|
+
# TODO: Figure out if there is any other possibility that can/should be
|
146
|
+
# passed here as the second argument for the migration context
|
147
|
+
if ActiveRecord.version > "7.1"
|
151
148
|
ActiveRecord::MigrationContext.new('spec/dummy/db/migrate').migrate
|
152
149
|
else
|
153
|
-
# TODO: Figure out if there is any other possibility that can/should be
|
154
|
-
# passed here as the second argument for the migration context
|
155
150
|
ActiveRecord::MigrationContext.new('spec/dummy/db/migrate', ActiveRecord::SchemaMigration).migrate
|
156
151
|
end
|
157
152
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "http://rubygems.org"
|
4
|
+
|
5
|
+
gem "rails", "~> 7.2.0"
|
6
|
+
|
7
|
+
platforms :ruby do
|
8
|
+
gem "sqlite3", "~> 1.6"
|
9
|
+
end
|
10
|
+
|
11
|
+
platforms :jruby do
|
12
|
+
gem 'activerecord-jdbc-adapter', '~> 70.0'
|
13
|
+
gem "activerecord-jdbcpostgresql-adapter", "~> 70.0"
|
14
|
+
gem "activerecord-jdbcmysql-adapter", "~> 70.0"
|
15
|
+
end
|
16
|
+
|
17
|
+
gemspec path: "../"
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "http://rubygems.org"
|
4
|
+
|
5
|
+
gem "rails", "~> 8.0.0"
|
6
|
+
|
7
|
+
platforms :ruby do
|
8
|
+
gem "sqlite3", "~> 2.0"
|
9
|
+
end
|
10
|
+
|
11
|
+
platforms :jruby do
|
12
|
+
gem 'activerecord-jdbc-adapter', '~> 70.0'
|
13
|
+
gem "activerecord-jdbcpostgresql-adapter", "~> 70.0"
|
14
|
+
gem "activerecord-jdbcmysql-adapter", "~> 70.0"
|
15
|
+
end
|
16
|
+
|
17
|
+
gemspec path: "../"
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# This patch prevents `create_schema` from being added to db/schema.rb as schemas are managed by Apartment
|
2
|
+
# not ActiveRecord like they would be in a vanilla Rails setup.
|
3
|
+
|
4
|
+
require "active_record/connection_adapters/abstract/schema_dumper"
|
5
|
+
require "active_record/connection_adapters/postgresql/schema_dumper"
|
6
|
+
|
7
|
+
class ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaDumper
|
8
|
+
alias_method :_original_schemas, :schemas
|
9
|
+
def schemas(stream)
|
10
|
+
_original_schemas(stream) unless Apartment.use_schemas
|
11
|
+
end
|
12
|
+
end
|
@@ -181,7 +181,7 @@ module Apartment
|
|
181
181
|
query_cache_enabled = ActiveRecord::Base.connection.query_cache_enabled
|
182
182
|
|
183
183
|
Apartment.establish_connection multi_tenantify(tenant)
|
184
|
-
Apartment.connection.
|
184
|
+
Apartment.connection.verify! # call active? to manually check if this connection is valid
|
185
185
|
|
186
186
|
Apartment.connection.enable_query_cache! if query_cache_enabled
|
187
187
|
rescue *rescuable_exceptions => e
|
data/lib/apartment/migrator.rb
CHANGED
@@ -13,8 +13,8 @@ module Apartment
|
|
13
13
|
|
14
14
|
migration_scope_block = ->(migration) { ENV['SCOPE'].blank? || (ENV['SCOPE'] == migration.scope) }
|
15
15
|
|
16
|
-
if
|
17
|
-
ActiveRecord::
|
16
|
+
if ActiveRecord.version >= Gem::Version.new('7.2.0')
|
17
|
+
ActiveRecord::Base.connection_pool.migration_context.migrate(version, &migration_scope_block)
|
18
18
|
else
|
19
19
|
ActiveRecord::Base.connection.migration_context.migrate(version, &migration_scope_block)
|
20
20
|
end
|
@@ -24,8 +24,8 @@ module Apartment
|
|
24
24
|
# Migrate up/down to a specific version
|
25
25
|
def run(direction, database, version)
|
26
26
|
Tenant.switch(database) do
|
27
|
-
if
|
28
|
-
ActiveRecord::
|
27
|
+
if ActiveRecord.version >= Gem::Version.new('7.2.0')
|
28
|
+
ActiveRecord::Base.connection_pool.migration_context.run(direction, version)
|
29
29
|
else
|
30
30
|
ActiveRecord::Base.connection.migration_context.run(direction, version)
|
31
31
|
end
|
@@ -35,18 +35,13 @@ module Apartment
|
|
35
35
|
# rollback latest migration `step` number of times
|
36
36
|
def rollback(database, step = 1)
|
37
37
|
Tenant.switch(database) do
|
38
|
-
if
|
39
|
-
ActiveRecord::
|
38
|
+
if ActiveRecord.version >= Gem::Version.new('7.2.0')
|
39
|
+
ActiveRecord::Base.connection_pool.migration_context.rollback(step)
|
40
40
|
else
|
41
41
|
ActiveRecord::Base.connection.migration_context.rollback(step)
|
42
42
|
end
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
-
private
|
47
|
-
|
48
|
-
def activerecord_below_5_2?
|
49
|
-
ActiveRecord.version.release < Gem::Version.new('5.2.0')
|
50
|
-
end
|
51
46
|
end
|
52
47
|
end
|
data/lib/apartment/version.rb
CHANGED
data/lib/apartment.rb
CHANGED
@@ -7,14 +7,12 @@ require 'active_record'
|
|
7
7
|
require 'apartment/tenant'
|
8
8
|
|
9
9
|
require_relative 'apartment/log_subscriber'
|
10
|
+
require_relative 'apartment/active_record/connection_handling'
|
11
|
+
require_relative 'apartment/active_record/schema_migration'
|
12
|
+
require_relative 'apartment/active_record/internal_metadata'
|
10
13
|
|
11
|
-
if ActiveRecord.version.release >= Gem::Version.new('
|
12
|
-
require_relative 'apartment/active_record/
|
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'
|
14
|
+
if ActiveRecord.version.release >= Gem::Version.new('7.1')
|
15
|
+
require_relative 'apartment/active_record/postgres/schema_dumper'
|
18
16
|
end
|
19
17
|
|
20
18
|
# Apartment main definitions
|
@@ -33,14 +31,10 @@ module Apartment
|
|
33
31
|
attr_accessor(*ACCESSOR_METHODS)
|
34
32
|
attr_writer(*WRITER_METHODS)
|
35
33
|
|
36
|
-
|
37
|
-
def_delegators :connection_class, :connection, :connection_db_config, :establish_connection
|
34
|
+
def_delegators :connection_class, :connection, :connection_db_config, :establish_connection
|
38
35
|
|
39
|
-
|
40
|
-
|
41
|
-
end
|
42
|
-
else
|
43
|
-
def_delegators :connection_class, :connection, :connection_config, :establish_connection
|
36
|
+
def connection_config
|
37
|
+
connection_db_config.configuration_hash
|
44
38
|
end
|
45
39
|
|
46
40
|
# configure apartment with available options
|
data/puzzle-apartment.gemspec
CHANGED
@@ -26,11 +26,16 @@ Gem::Specification.new do |s|
|
|
26
26
|
|
27
27
|
s.homepage = 'https://github.com/puzzle/apartment'
|
28
28
|
s.licenses = ['MIT']
|
29
|
+
s.metadata = {
|
30
|
+
'github_repo' => 'ssh://github.com/puzzle/apartment'
|
31
|
+
}
|
29
32
|
|
30
|
-
s.
|
31
|
-
|
32
|
-
s.add_dependency '
|
33
|
-
s.add_dependency '
|
33
|
+
s.required_ruby_version = '>= 3.1', '<= 3.4'
|
34
|
+
|
35
|
+
s.add_dependency 'activerecord', '>= 7.0.0', '<= 8.1'
|
36
|
+
s.add_dependency 'parallel', '< 2.0'
|
37
|
+
s.add_dependency 'public_suffix', '>= 2.0.5', '<= 6.0.1'
|
38
|
+
s.add_dependency 'rack', '>= 1.3.6', '< 4.0'
|
34
39
|
|
35
40
|
s.add_development_dependency 'appraisal', '~> 2.2'
|
36
41
|
s.add_development_dependency 'bundler', '>= 1.3', '< 3.0'
|
@@ -52,8 +57,8 @@ Gem::Specification.new do |s|
|
|
52
57
|
s.add_development_dependency 'jdbc-mysql'
|
53
58
|
s.add_development_dependency 'jdbc-postgres'
|
54
59
|
else
|
55
|
-
s.add_development_dependency 'mysql2'
|
56
|
-
s.add_development_dependency 'pg'
|
57
|
-
s.add_development_dependency 'sqlite3'
|
60
|
+
s.add_development_dependency 'mysql2'
|
61
|
+
s.add_development_dependency 'pg'
|
62
|
+
s.add_development_dependency 'sqlite3'
|
58
63
|
end
|
59
64
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puzzle-apartment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.13.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:
|
13
|
+
date: 2024-12-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|
@@ -18,34 +18,34 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
22
|
-
- - "
|
21
|
+
version: 7.0.0
|
22
|
+
- - "<="
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version: '
|
24
|
+
version: '8.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:
|
32
|
-
- - "
|
31
|
+
version: 7.0.0
|
32
|
+
- - "<="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '
|
34
|
+
version: '8.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: '
|
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: '
|
48
|
+
version: '2.0'
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: public_suffix
|
51
51
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,6 +53,9 @@ dependencies:
|
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: 2.0.5
|
56
|
+
- - "<="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: 6.0.1
|
56
59
|
type: :runtime
|
57
60
|
prerelease: false
|
58
61
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -60,6 +63,9 @@ dependencies:
|
|
60
63
|
- - ">="
|
61
64
|
- !ruby/object:Gem::Version
|
62
65
|
version: 2.0.5
|
66
|
+
- - "<="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 6.0.1
|
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: '4.0'
|
70
79
|
type: :runtime
|
71
80
|
prerelease: false
|
72
81
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -74,6 +83,9 @@ dependencies:
|
|
74
83
|
- - ">="
|
75
84
|
- !ruby/object:Gem::Version
|
76
85
|
version: 1.3.6
|
86
|
+
- - "<"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '4.0'
|
77
89
|
- !ruby/object:Gem::Dependency
|
78
90
|
name: appraisal
|
79
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -252,44 +264,44 @@ dependencies:
|
|
252
264
|
name: mysql2
|
253
265
|
requirement: !ruby/object:Gem::Requirement
|
254
266
|
requirements:
|
255
|
-
- - "
|
267
|
+
- - ">="
|
256
268
|
- !ruby/object:Gem::Version
|
257
|
-
version: '0
|
269
|
+
version: '0'
|
258
270
|
type: :development
|
259
271
|
prerelease: false
|
260
272
|
version_requirements: !ruby/object:Gem::Requirement
|
261
273
|
requirements:
|
262
|
-
- - "
|
274
|
+
- - ">="
|
263
275
|
- !ruby/object:Gem::Version
|
264
|
-
version: '0
|
276
|
+
version: '0'
|
265
277
|
- !ruby/object:Gem::Dependency
|
266
278
|
name: pg
|
267
279
|
requirement: !ruby/object:Gem::Requirement
|
268
280
|
requirements:
|
269
|
-
- - "
|
281
|
+
- - ">="
|
270
282
|
- !ruby/object:Gem::Version
|
271
|
-
version: '
|
283
|
+
version: '0'
|
272
284
|
type: :development
|
273
285
|
prerelease: false
|
274
286
|
version_requirements: !ruby/object:Gem::Requirement
|
275
287
|
requirements:
|
276
|
-
- - "
|
288
|
+
- - ">="
|
277
289
|
- !ruby/object:Gem::Version
|
278
|
-
version: '
|
290
|
+
version: '0'
|
279
291
|
- !ruby/object:Gem::Dependency
|
280
292
|
name: sqlite3
|
281
293
|
requirement: !ruby/object:Gem::Requirement
|
282
294
|
requirements:
|
283
|
-
- - "
|
295
|
+
- - ">="
|
284
296
|
- !ruby/object:Gem::Version
|
285
|
-
version:
|
297
|
+
version: '0'
|
286
298
|
type: :development
|
287
299
|
prerelease: false
|
288
300
|
version_requirements: !ruby/object:Gem::Requirement
|
289
301
|
requirements:
|
290
|
-
- - "
|
302
|
+
- - ">="
|
291
303
|
- !ruby/object:Gem::Version
|
292
|
-
version:
|
304
|
+
version: '0'
|
293
305
|
description: Apartment allows Rack applications to deal with database multitenancy
|
294
306
|
through ActiveRecord
|
295
307
|
email:
|
@@ -303,6 +315,7 @@ files:
|
|
303
315
|
- ".circleci/config.yml"
|
304
316
|
- ".github/ISSUE_TEMPLATE.md"
|
305
317
|
- ".github/workflows/changelog.yml"
|
318
|
+
- ".github/workflows/main.yml"
|
306
319
|
- ".github/workflows/reviewdog.yml"
|
307
320
|
- ".gitignore"
|
308
321
|
- ".pryrc"
|
@@ -320,13 +333,15 @@ files:
|
|
320
333
|
- Rakefile
|
321
334
|
- TODO.md
|
322
335
|
- docker-compose.yml
|
323
|
-
- gemfiles/rails_6_1.gemfile
|
324
336
|
- gemfiles/rails_7_0.gemfile
|
325
337
|
- gemfiles/rails_7_1.gemfile
|
338
|
+
- gemfiles/rails_7_2.gemfile
|
339
|
+
- gemfiles/rails_8_0.gemfile
|
326
340
|
- gemfiles/rails_master.gemfile
|
327
341
|
- lib/apartment.rb
|
328
342
|
- lib/apartment/active_record/connection_handling.rb
|
329
343
|
- lib/apartment/active_record/internal_metadata.rb
|
344
|
+
- lib/apartment/active_record/postgres/schema_dumper.rb
|
330
345
|
- lib/apartment/active_record/postgresql_adapter.rb
|
331
346
|
- lib/apartment/active_record/schema_migration.rb
|
332
347
|
- lib/apartment/adapters/abstract_adapter.rb
|
@@ -362,7 +377,8 @@ files:
|
|
362
377
|
homepage: https://github.com/puzzle/apartment
|
363
378
|
licenses:
|
364
379
|
- MIT
|
365
|
-
metadata:
|
380
|
+
metadata:
|
381
|
+
github_repo: ssh://github.com/puzzle/apartment
|
366
382
|
post_install_message:
|
367
383
|
rdoc_options: []
|
368
384
|
require_paths:
|
@@ -371,14 +387,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
371
387
|
requirements:
|
372
388
|
- - ">="
|
373
389
|
- !ruby/object:Gem::Version
|
374
|
-
version: '
|
390
|
+
version: '3.1'
|
391
|
+
- - "<="
|
392
|
+
- !ruby/object:Gem::Version
|
393
|
+
version: '3.4'
|
375
394
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
376
395
|
requirements:
|
377
396
|
- - ">="
|
378
397
|
- !ruby/object:Gem::Version
|
379
398
|
version: '0'
|
380
399
|
requirements: []
|
381
|
-
rubygems_version: 3.
|
400
|
+
rubygems_version: 3.5.22
|
382
401
|
signing_key:
|
383
402
|
specification_version: 4
|
384
403
|
summary: A Ruby gem for managing database multitenancy. Apartment Gem drop in replacement
|
data/gemfiles/rails_6_1.gemfile
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "http://rubygems.org"
|
4
|
-
|
5
|
-
gem "rails", "~> 6.1.0"
|
6
|
-
|
7
|
-
platforms :ruby do
|
8
|
-
gem "sqlite3", "~> 1.4"
|
9
|
-
end
|
10
|
-
|
11
|
-
platforms :jruby do
|
12
|
-
gem "activerecord-jdbc-adapter", "~> 61.0"
|
13
|
-
gem "activerecord-jdbcpostgresql-adapter", "~> 61.0"
|
14
|
-
gem "activerecord-jdbcmysql-adapter", "~> 61.0"
|
15
|
-
end
|
16
|
-
|
17
|
-
gemspec path: "../"
|