ros-apartment 2.8.0 → 2.8.1.rc1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e12a4c472f448bc3f74307242fe0fb0929262c2a7fc5780996e8d49aa8421aff
4
- data.tar.gz: 6bed24032f44c0669bca2fd92f0cd182f0d410752102493ff900709509d5f22e
3
+ metadata.gz: f446466c85cecc098b1fec480bd1400bc849ea49ea4f7b5607c1bb3bd46ab6b6
4
+ data.tar.gz: ed713631a71b9b9948f942f25f6cb5dba586a41dcdebe40f14fdef6effccf25c
5
5
  SHA512:
6
- metadata.gz: a8ed3d29e8b56c61e2ca40134a421d7b6921e639e14f12ef492acb94bf7ef6b1df197b5f7f81541da0933acb946e4094080ee20e8b4c77e06e4b299acdb4ef1c
7
- data.tar.gz: 18239dac52eb752c5d456c1004fe2f2424fa8dbe85bc20bfb5db45280a6df4948f5ae554f78f847698f74217809da4ebe549da5e91b9c2a69a910ef6a28d7b65
6
+ metadata.gz: a7bf926bd676c7025c1567063b1b97eb01993e7d6f4821ff8e103e9b1057791712a8590247191070764fdbbfd17dc70cc54848fee5c5a7e5379315eda4554cb5
7
+ data.tar.gz: 86375a0c10ce05b3a2e9c217c9c0e574a643725fcba1f98631165d7e8682f9d840d152238d24370ebc55d2713989ff47d633e35fd7c2cdde171443cbcbc3dd07
@@ -2,27 +2,40 @@
2
2
 
3
3
  ## [Unreleased](https://github.com/rails-on-services/apartment/tree/HEAD)
4
4
 
5
- [Full Changelog](https://github.com/rails-on-services/apartment/compare/v2.7.2...HEAD)
5
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v2.8.0...HEAD)
6
6
 
7
7
  **Implemented enhancements:**
8
8
 
9
- - Uses a transaction to create a tenant [\#66](https://github.com/rails-on-services/apartment/issues/66)
9
+ **Fixed bugs:**
10
+
11
+ - New version raises an error with ActiveSupport::LogSubscriber [#128](https://github.com/rails-on-services/apartment/issues/128)
12
+
13
+ **Closed issues:**
14
+
15
+ ## [v2.8.0](https://github.com/rails-on-services/apartment/tree/v2.8.0) (2020-12-16)
16
+
17
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v2.7.2...v2.8.0)
18
+
19
+ **Implemented enhancements:**
20
+
21
+ - Uses a transaction to create a tenant [#66](https://github.com/rails-on-services/apartment/issues/66)
10
22
 
11
23
  **Fixed bugs:**
12
24
 
13
- - Fix seeding errors [\#86](https://github.com/rails-on-services/apartment/issues/86)
14
- - When tests run in a transaction, new tenants in tests fail to create [\#123](https://github.com/rails-on-services/apartment/issues/123)
15
- - Reverted unsafe initializer - introduces the possibility of disabling the initial connection to the database via
16
- environment variable. Relates to the following tickets/PRs:
17
- - [#113](https://github.com/rails-on-services/apartment/issues/113)
18
- - [#39](https://github.com/rails-on-services/apartment/pull/39)
19
- - [#53](https://github.com/rails-on-services/apartment/pull/53)
20
- - [#118](https://github.com/rails-on-services/apartment/pull/118)
25
+ - Fix seeding errors [#86](https://github.com/rails-on-services/apartment/issues/86)
26
+ - When tests run in a transaction, new tenants in tests fail to create [#123](https://github.com/rails-on-services/apartment/issues/123)
27
+ - Reverted unsafe initializer - introduces the possibility of disabling the initial connection to the database via
28
+ environment variable. Relates to the following tickets/PRs:
29
+ - [#113](https://github.com/rails-on-services/apartment/issues/113)
30
+ - [#39](https://github.com/rails-on-services/apartment/pull/39)
31
+ - [#53](https://github.com/rails-on-services/apartment/pull/53)
32
+ - [#118](https://github.com/rails-on-services/apartment/pull/118)
21
33
 
22
34
  **Closed issues:**
23
35
 
24
- - Improve changelog automatic generation [\#98](https://github.com/rails-on-services/apartment/issues/98)
25
- - Relaxes dependencies to allow rails 6.1 [\#121](https://github.com/rails-on-services/apartment/issues/121)
36
+ - Improve changelog automatic generation [#98](https://github.com/rails-on-services/apartment/issues/98)
37
+ - Relaxes dependencies to allow rails 6.1 [#121](https://github.com/rails-on-services/apartment/issues/121)
38
+
26
39
 
27
40
  ## [v2.7.2](https://github.com/rails-on-services/apartment/tree/v2.7.2) (2020-07-17)
28
41
 
data/README.md CHANGED
@@ -338,6 +338,23 @@ Apartment.configure do |config|
338
338
  end
339
339
  ```
340
340
 
341
+ ### Additional logging information
342
+
343
+ Enabling this configuration will output the database that the process is currently connected to as well as which
344
+ schemas are in the search path. This can be enabled by setting to true the `active_record_log` configuration.
345
+
346
+ Please note that our custom logger inherits from `ActiveRecord::LogSubscriber` so this will be required for the configuration to work.
347
+
348
+ **Example log output:**
349
+
350
+ <img src="documentation/images/log_example.png">
351
+
352
+ ```ruby
353
+ Apartment.configure do |config|
354
+ active_record_log = true
355
+ end
356
+ ```
357
+
341
358
  ### Excluding models
342
359
 
343
360
  If you have some models that should always access the 'public' tenant, you can specify this by configuring Apartment using `Apartment.configure`. This will yield a config object for you. You can set excluded models like so:
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'active_record/log_subscriber'
4
+
3
5
  module Apartment
4
6
  class LogSubscriber < ActiveRecord::LogSubscriber
5
7
  def sql(event)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Apartment
4
- VERSION = '2.8.0'
4
+ VERSION = '2.8.1.rc1'
5
5
  end
@@ -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)/})
20
+ f.match(%r{^(test|spec|features|documentation)/})
21
21
  end
22
22
  end
23
23
  s.executables = s.files.grep(%r{^bin/}).map { |f| File.basename(f) }
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.8.0
4
+ version: 2.8.1.rc1
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-12-16 00:00:00.000000000 Z
13
+ date: 2020-12-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord
@@ -302,9 +302,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
302
302
  version: '0'
303
303
  required_rubygems_version: !ruby/object:Gem::Requirement
304
304
  requirements:
305
- - - ">="
305
+ - - ">"
306
306
  - !ruby/object:Gem::Version
307
- version: '0'
307
+ version: 1.3.1
308
308
  requirements: []
309
309
  rubygems_version: 3.1.4
310
310
  signing_key: