apartment 1.2.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +45 -4
- data/Appraisals +12 -9
- data/HISTORY.md +18 -0
- data/README.md +69 -42
- data/Rakefile +24 -5
- data/apartment.gemspec +6 -16
- data/docker-compose.yml +14 -0
- data/gemfiles/rails_4_0.gemfile +1 -1
- data/gemfiles/rails_4_1.gemfile +1 -1
- data/gemfiles/rails_4_2.gemfile +1 -1
- data/gemfiles/rails_5_0.gemfile +1 -1
- data/gemfiles/{rails_3_2.gemfile → rails_5_1.gemfile} +2 -3
- data/gemfiles/rails_master.gemfile +12 -0
- data/lib/apartment.rb +3 -25
- data/lib/apartment/adapters/abstract_adapter.rb +19 -44
- data/lib/apartment/adapters/postgresql_adapter.rb +17 -3
- data/lib/apartment/elevators/generic.rb +1 -20
- data/lib/apartment/elevators/subdomain.rb +15 -4
- data/lib/apartment/railtie.rb +5 -2
- data/lib/apartment/tenant.rb +0 -10
- data/lib/apartment/version.rb +1 -1
- data/lib/generators/apartment/install/templates/apartment.rb +13 -8
- data/lib/tasks/apartment.rake +2 -2
- data/spec/adapters/mysql2_adapter_spec.rb +8 -0
- data/spec/apartment_spec.rb +1 -5
- data/spec/dummy/config/application.rb +1 -1
- data/spec/dummy/config/database.yml.sample +3 -1
- data/spec/dummy/db/migrate/20110613152810_create_dummy_models.rb +2 -1
- data/spec/dummy/db/migrate/20111202022214_create_table_books.rb +2 -1
- data/spec/dummy_engine/config/initializers/apartment.rb +3 -3
- data/spec/examples/connection_adapter_examples.rb +8 -0
- data/spec/examples/generic_adapter_examples.rb +35 -17
- data/spec/examples/schema_adapter_examples.rb +8 -0
- data/spec/integration/query_caching_spec.rb +63 -23
- data/spec/spec_helper.rb +12 -0
- data/spec/tenant_spec.rb +10 -3
- data/spec/unit/config_spec.rb +0 -7
- data/spec/unit/elevators/subdomain_spec.rb +28 -8
- metadata +20 -17
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apartment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Brunner
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-08-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -45,6 +45,20 @@ dependencies:
|
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 1.3.6
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: public_suffix
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.0.5
|
55
|
+
type: :runtime
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.0.5
|
48
62
|
- !ruby/object:Gem::Dependency
|
49
63
|
name: appraisal
|
50
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -180,11 +194,13 @@ files:
|
|
180
194
|
- Rakefile
|
181
195
|
- TODO.md
|
182
196
|
- apartment.gemspec
|
183
|
-
-
|
197
|
+
- docker-compose.yml
|
184
198
|
- gemfiles/rails_4_0.gemfile
|
185
199
|
- gemfiles/rails_4_1.gemfile
|
186
200
|
- gemfiles/rails_4_2.gemfile
|
187
201
|
- gemfiles/rails_5_0.gemfile
|
202
|
+
- gemfiles/rails_5_1.gemfile
|
203
|
+
- gemfiles/rails_master.gemfile
|
188
204
|
- lib/apartment.rb
|
189
205
|
- lib/apartment/adapters/abstract_adapter.rb
|
190
206
|
- lib/apartment/adapters/abstract_jdbc_adapter.rb
|
@@ -313,20 +329,7 @@ homepage: https://github.com/influitive/apartment
|
|
313
329
|
licenses:
|
314
330
|
- MIT
|
315
331
|
metadata: {}
|
316
|
-
post_install_message:
|
317
|
-
********************************
|
318
|
-
|
319
|
-
Apartment Deprecation Warning
|
320
|
-
|
321
|
-
`Apartment::Tenant.process` has been deprecated in favour of `Apartment::Tenant.switch`.
|
322
|
-
You must now always pass a block to `switch`.
|
323
|
-
|
324
|
-
To get the previous `switch` behaviour where you can switch to a tenant
|
325
|
-
without a block, use `Apartment::Tenant.switch!`.
|
326
|
-
This is to indicate that your call actually has a side affect of changing
|
327
|
-
the scope of your queries to that tenant.
|
328
|
-
|
329
|
-
********************************
|
332
|
+
post_install_message:
|
330
333
|
rdoc_options: []
|
331
334
|
require_paths:
|
332
335
|
- lib
|