cloudstrap 0.34.1.pre → 0.34.5.pre

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cloudstrap/config.rb +23 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb73c116fa90bfc4a8aad4b6ecbf0dcb87b0fe53
4
- data.tar.gz: 4b9c654b846f3ee01642aead99c890366e9429d1
3
+ metadata.gz: 9f212b2b1bb0a63ff68656db134197603497410d
4
+ data.tar.gz: 2292b093666ad06375e6f790b8634c28a08c83dc
5
5
  SHA512:
6
- metadata.gz: 11021228002b286c380b83063500c6307536582f5103993b032d14c27421de9781c733e54c823e7bc691980dcab74ad89bbe853dea879e2a4c78a6aefbeccd30
7
- data.tar.gz: 10a5ad7d8bf8a813825f50902679d20a8fda107d51ee9d2f003cc45ff365fe82c1f2df32062323108a0cc3c174e3d29c2a3e61b290f94f43996d1dec39d167f9
6
+ metadata.gz: 9b4c171f51499cf18df0a11f74351f6edd6f0b7bab88fe3f67ab2c39c50b14c3b264321462c14b80c7344b80aa472c5d9cf9ff4c608aa4b6fb0248d96a82f006
7
+ data.tar.gz: c4e4734924101ab04388718deef3154ef9e57ee9fa57cc9ae8f450658129cb21d2203ca83513d15a772077559b453384857b75345ba385b63fa2e9a03c46c7ca
@@ -91,7 +91,7 @@ module Cloudstrap
91
91
 
92
92
  Contract None => String
93
93
  def properties_seed_url
94
- lookup :properties_seed_url
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]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.34.1.pre
4
+ version: 0.34.5.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Olstrom