sublease 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 908bff251800846c8123ece10f0ad4db12f577810c0e56199bda233c5ef0bab5
4
- data.tar.gz: 50a6ea9d953e8fa2087b65a1057a920206a6430fd4304b440e24d7004eb033c2
3
+ metadata.gz: e9f2f46735d258f3b0987be3fcbdb50dbf0ebda1193e0079f902836087227f1b
4
+ data.tar.gz: '07333879112844b3a844a91f3a03859204e3bbe4aef29373799148a24e26392f'
5
5
  SHA512:
6
- metadata.gz: 8cf17a85a581a8f559e100c5a75c614060307e2bab4f52995792e44d936263cbfdb414c1d1511c339e1ea21a9aedcff56643dd71062906699f333a25ada103a0
7
- data.tar.gz: e6d90607d7570245f936dd6997072ed7978796a14feb7777cf480948318e9efdaad6c21de51f3efb13f9b023f8e2b37d58552f8546087b988b0b504388cccea0
6
+ metadata.gz: 8c88c17451cef2f19c5a8404073a30c527aa02a833ddc7de7a96ba5004e283c4d6380dea693cc4f5b6ff7bc169de2cb9bcc42b050af11a00c355875ed81e5747
7
+ data.tar.gz: 8d5908bd87156b3c716d2e4da2f7b618b5c0acde6092770416e79877b510070e25c67647d109aed846067a3cc9e5c191e29dbc8a045e1317c9f7cec53d63c4df
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ 0.2.3
2
+ -----
3
+ * Exits switching method if tenant is nil.
4
+
1
5
  0.2.2
2
6
  -----
3
7
  * Logs a tenant not found error when switching tenants instead of raising an error.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sublease (0.2.2)
4
+ sublease (0.2.3)
5
5
  rails (>= 4.1, < 6.0)
6
6
 
7
7
  GEM
@@ -13,7 +13,7 @@ module Sublease
13
13
  private
14
14
 
15
15
  def sublease_error_tenant_not_found(message)
16
- Rails.logger.error "ERROR -- : Sublease::TenantNotFound - #{message}"
16
+ Rails.logger.error "Sublease::TenantNotFound - #{message}"
17
17
  end
18
18
 
19
19
  def sublease_model
@@ -38,6 +38,7 @@ module Sublease
38
38
  tenant = model.where(domain: request.domain).first
39
39
  if tenant.nil?
40
40
  sublease_error_tenant_not_found(I18n.t('sublease.errors.domain_not_found', domain: request.domain))
41
+ return
41
42
  end
42
43
  sublease_set_current_tenant(tenant)
43
44
  end
@@ -54,6 +55,7 @@ module Sublease
54
55
  tenant = model.where(subdomain: request.subdomain).first
55
56
  if tenant.nil?
56
57
  sublease_error_tenant_not_found(I18n.t('sublease.errors.subdomain_not_found', subdomain: request.subdomain))
58
+ return
57
59
  end
58
60
  sublease_set_current_tenant(tenant)
59
61
  end
@@ -70,6 +72,7 @@ module Sublease
70
72
  tenant = model.where(domain: request.domain, subdomain: request.subdomain).first
71
73
  if tenant.nil?
72
74
  sublease_error_tenant_not_found(I18n.t('sublease.errors.subdomain_and_domain_not_found', subdomain: request.subdomain, domain: request.domain))
75
+ return
73
76
  end
74
77
  sublease_set_current_tenant(tenant)
75
78
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sublease
4
- VERSION = '0.2.2'
4
+ VERSION = '0.2.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sublease
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - bacrossland