rls_multi_tenant 0.2.4 → 0.2.5

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: 39d3040029c499a1165b98166bfe9bd6bd2692dbfc461a75c11e071efec8b01a
4
- data.tar.gz: f5a8ddbd4eaf64a19ff34f4dc0c493696286cd30f288a7d261269738f9a1ca7f
3
+ metadata.gz: 7a8043bdc925d9f0e5e05d743f457e9baad7d861ccfa0f649bbc2b07f48c8958
4
+ data.tar.gz: 2476c3fbd98f58f8eb50be5cfbaeb95c6219a0aba2b77b250617a8d83970e16d
5
5
  SHA512:
6
- metadata.gz: 33e4c91e0ab5e1a0e786bc9be9041a555f0634330f19608cca06147fbe823b270d867502f0c6b6b7e5547e4b413e588fedac353781f29e5871e3f2539b6c1de7
7
- data.tar.gz: e21eb44ba555568a058f29b9577a7e4d3388a96669616aa354bc8d2b307816f31dca7abaa90aef6d91873088a3874c99e1052ea60f762294bd7133b34b6cf396
6
+ metadata.gz: 2679ab3b6517e126ac6ba342ed6c1144af54e52bde076385ac73e5fa0d56db98dee75c4a71ad81136c0f11faf3bd1532bd5e9545c741badc34016fc0fb360244
7
+ data.tar.gz: ce18b2512ba1bbd63fd78388fbf752f66ea9eb4aa44aef8f16ec5ec2982c2f4996a24511f4e613a0b41916219ab557a4b0eb3a4ca70afa7b6e1cef07b6d8f2bf
@@ -27,22 +27,6 @@ module RlsMultiTenant
27
27
  end
28
28
  end
29
29
  end
30
-
31
- class_methods do
32
- private
33
-
34
- def extract_tenant_id(tenant_or_id)
35
- case tenant_or_id
36
- when RlsMultiTenant.tenant_class
37
- tenant_or_id.id
38
- when String, Integer
39
- tenant_or_id
40
- else
41
- raise ArgumentError,
42
- "Expected #{RlsMultiTenant.tenant_class_name} object or tenant_id, got #{tenant_or_id.class}"
43
- end
44
- end
45
- end
46
30
  end
47
31
  end
48
32
  end
@@ -53,7 +53,7 @@ module RlsMultiTenant
53
53
 
54
54
  def extract_tenant_id(tenant_or_id)
55
55
  case tenant_or_id
56
- when RlsMultiTenant.tenant_class
56
+ when ->(obj) { obj.is_a?(RlsMultiTenant.tenant_class) }
57
57
  tenant_or_id.id
58
58
  when String, Integer
59
59
  tenant_or_id
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RlsMultiTenant
4
- VERSION = '0.2.4'
4
+ VERSION = '0.2.5'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rls_multi_tenant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Coding Ways