penthouse 0.13.1 → 0.13.2
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 +4 -4
- data/lib/penthouse/tenants/octopus_schema_tenant.rb +12 -6
- data/lib/penthouse/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c2e9ea2e2050c4d3fb6cdebf4fe2f67b2f46fb7
|
4
|
+
data.tar.gz: fdb5f602860f1df7d5d27edc5d04bb2e49ddc094
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6014dccb942c05d20cabb3f0889fbba43654102c8e1c22aebca85b915e5368856f395196351e23453eba98db05ef88f1c3a9c8e4e1c38fc1cb436a38df625e94
|
7
|
+
data.tar.gz: a4c880830a3f95446d8d52c99bbcca3836f34906712fc7e33b282a7374578146f635e0f7212813f726f812567409c0663f06535c39b2fe5f7d90a7fbc6217764
|
@@ -21,30 +21,36 @@ module Penthouse
|
|
21
21
|
# @yield [SchemaTenant] The current tenant instance
|
22
22
|
# @return [void]
|
23
23
|
def call(shard: Octopus.master_shard, &block)
|
24
|
-
|
25
|
-
super(&block)
|
26
|
-
end
|
24
|
+
switch_shard(shard: shard) { super(&block) }
|
27
25
|
end
|
28
26
|
|
29
27
|
# creates the tenant schema within the master shard
|
30
28
|
# @see Penthouse::Tenants::SchemaTenant#create
|
31
29
|
# @return [void]
|
32
30
|
def create(**)
|
33
|
-
|
31
|
+
switch_shard(shard: Octopus.master_shard) { super }
|
34
32
|
end
|
35
33
|
|
36
34
|
# drops the tenant schema within the master shard
|
37
35
|
# @see Penthouse::Tenants::SchemaTenant#delete
|
38
36
|
# @return [void]
|
39
37
|
def delete(**)
|
40
|
-
|
38
|
+
switch_shard(shard: Octopus.master_shard) { super }
|
41
39
|
end
|
42
40
|
|
43
41
|
# returns whether or not the schema exists
|
44
42
|
# @see Penthouse::Tenants::SchemaTenant#exists?
|
45
43
|
# @return [Boolean] whether or not the schema exists in the master shard
|
46
44
|
def exists?(**)
|
47
|
-
|
45
|
+
switch_shard(shard: Octopus.master_shard) { super }
|
46
|
+
end
|
47
|
+
|
48
|
+
private
|
49
|
+
|
50
|
+
def switch_shard(shard:, &block)
|
51
|
+
Octopus.using(shard) do
|
52
|
+
block.call
|
53
|
+
end
|
48
54
|
end
|
49
55
|
end
|
50
56
|
end
|
data/lib/penthouse/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: penthouse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.
|
4
|
+
version: 0.13.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Townsend
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|