penthouse 0.7.3 → 0.7.4

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
  SHA1:
3
- metadata.gz: 3219338982175359caa7cb3271636d404eb5bded
4
- data.tar.gz: f205b987018ae4b61b1ebb4d0008c1df13d981fa
3
+ metadata.gz: 32ab9a7ff6f0e7826504ba972ef2e1adae7bf070
4
+ data.tar.gz: 4a9420802af74ec2ce0f60d70310e7a41a893371
5
5
  SHA512:
6
- metadata.gz: b57455d1b84f120ec8c943a4d6ed29c4a323023b35d08e9b609bcf62c9c574eccc1b03ffee1c32a460e2098f358f9eeee82d927e54a05a25c8b23596b5cfcca1
7
- data.tar.gz: 18163e1245e19c179a4d8f8ab4c8a6c0134790b8dd1876e15224c38e3fc84b51d171be1343d2c8f94c1419fe4308df99f2ae07e535e9db0365022b739927c890
6
+ metadata.gz: a11eba9239610c2272df4e59240c783ff09bac032d9ea03886956314e598d1fb57d1740f87cbce9ff44955d09c994143e52a5f5dd9bcf4c370434db057027a29
7
+ data.tar.gz: ef6e226f6ad688a0d49ac8616c8309b4a87bf48997b62e343647dc4fd590f81dc10ba89a459cae93e1920a87fa1e664afcdee8b3417fc3c93d32d1ea63ff8da3
@@ -42,6 +42,8 @@ module Penthouse
42
42
 
43
43
  module ClassMethods
44
44
  def migrate_with_penthouse(migrations_paths, target_version = nil, &block)
45
+ puts "#migrate_with_penthouse called"
46
+
45
47
  unless Penthouse.configuration.migrate_tenants?
46
48
  puts "Skipping penthouse integration"
47
49
  return migrate_without_penthouse(migrations_paths, target_version, &block)
@@ -60,6 +62,8 @@ module Penthouse
60
62
  end
61
63
 
62
64
  def up_with_penthouse(migrations_paths, target_version = nil, &block)
65
+ puts "#up_with_penthouse called"
66
+
63
67
  unless Penthouse.configuration.migrate_tenants?
64
68
  puts "Skipping penthouse integration"
65
69
  return up_without_penthouse(migrations_paths, target_version, &block)
@@ -78,6 +82,8 @@ module Penthouse
78
82
  end
79
83
 
80
84
  def down_with_penthouse(migrations_paths, target_version = nil, &block)
85
+ puts "#down_with_penthouse called"
86
+
81
87
  unless Penthouse.configuration.migrate_tenants?
82
88
  puts "Skipping penthouse integration"
83
89
  return down_without_penthouse(migrations_paths, target_version, &block)
@@ -96,6 +102,8 @@ module Penthouse
96
102
  end
97
103
 
98
104
  def run_with_penthouse(direction, migrations_paths, target_version)
105
+ puts "#run_with_penthouse called"
106
+
99
107
  unless Penthouse.configuration.migrate_tenants?
100
108
  puts "Skipping penthouse integration"
101
109
  return run_without_penthouse(direction, migrations_paths, target_version)
@@ -114,9 +122,16 @@ module Penthouse
114
122
  end
115
123
 
116
124
  def tenants_to_migrate
117
- if (t = ENV["TENANT"] || ENV["TENANTS"])
118
- t.split(",").map(&:strip)
125
+ return @tenants_to_migrate if defined?(@tenants_to_migrate)
126
+ @tenants_to_migrate = begin
127
+ if (t = ENV["TENANT"] || ENV["TENANTS"])
128
+ t.split(",").map(&:strip)
129
+ else
130
+ Penthouse.tenant_identifiers
131
+ end
119
132
  end
133
+ puts "#tenants_to_migrate = #{@tenants_to_migrate}"
134
+ @tenants_to_migrate
120
135
  end
121
136
  end
122
137
  end
@@ -1,3 +1,3 @@
1
1
  module Penthouse
2
- VERSION = "0.7.3"
2
+ VERSION = "0.7.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: penthouse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Townsend