cloudstrap 0.34.1.pre → 0.34.5.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cloudstrap/config.rb +23 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f212b2b1bb0a63ff68656db134197603497410d
|
4
|
+
data.tar.gz: 2292b093666ad06375e6f790b8634c28a08c83dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b4c171f51499cf18df0a11f74351f6edd6f0b7bab88fe3f67ab2c39c50b14c3b264321462c14b80c7344b80aa472c5d9cf9ff4c608aa4b6fb0248d96a82f006
|
7
|
+
data.tar.gz: c4e4734924101ab04388718deef3154ef9e57ee9fa57cc9ae8f450658129cb21d2203ca83513d15a772077559b453384857b75345ba385b63fa2e9a03c46c7ca
|
data/lib/cloudstrap/config.rb
CHANGED
@@ -91,7 +91,7 @@ module Cloudstrap
|
|
91
91
|
|
92
92
|
Contract None => String
|
93
93
|
def properties_seed_url
|
94
|
-
|
94
|
+
required :properties_seed_url
|
95
95
|
end
|
96
96
|
|
97
97
|
Contract None => String
|
@@ -101,6 +101,28 @@ module Cloudstrap
|
|
101
101
|
|
102
102
|
private
|
103
103
|
|
104
|
+
Contract None => ::Pastel::Delegator
|
105
|
+
def pastel
|
106
|
+
@pastel ||= Pastel.new
|
107
|
+
end
|
108
|
+
|
109
|
+
Contract RespondTo[:to_s] => nil
|
110
|
+
def abort_on_missing(key)
|
111
|
+
STDERR.puts pastel.red <<EOS
|
112
|
+
|
113
|
+
#{pastel.bold key} is required, but is not configured.
|
114
|
+
|
115
|
+
You can resolve this by adding it to #{pastel.bold file}, or by
|
116
|
+
setting #{pastel.bold('BOOTSTRAP_' + key.to_s.upcase)} in the environment.
|
117
|
+
EOS
|
118
|
+
abort
|
119
|
+
end
|
120
|
+
|
121
|
+
Contract RespondTo[:to_s] => String
|
122
|
+
def required(key)
|
123
|
+
lookup(key, '').tap { |value| abort_on_missing key if value.empty? }
|
124
|
+
end
|
125
|
+
|
104
126
|
StringToString = Func[Maybe[String] => Maybe[String]]
|
105
127
|
|
106
128
|
Contract RespondTo[:to_s], Maybe[Or[String, StringToString]] => Maybe[String]
|