redipress 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/redipress/cli/configurations.rb +8 -0
- data/lib/redipress/errors.rb +8 -0
- data/lib/redipress/variables.rb +1 -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: a1cd5a369540a7fac84e4543d82e3676e120654e
|
4
|
+
data.tar.gz: 41b2088329ce194c4c07ee018a838a852d4c5836
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c03498f350b079fdb90fef7de9394091e4b0fcdafc56ffc52922e5929a53fa753f78dd7543ee8def7bd64fc867674abf67c5cb2aef82453ad995dcc81ee90eb
|
7
|
+
data.tar.gz: c7fa1fccfb4b15c66fdeb7d2d931d8d0756470792566968ba6e76433e351ab8ba981f7c645fb241c5f3bd0af486ade6824cdf01b0166711d7212e27e355133e5
|
@@ -153,6 +153,14 @@ module RediPress
|
|
153
153
|
raise error
|
154
154
|
end
|
155
155
|
|
156
|
+
# Ensure there is at least one configuration available
|
157
|
+
if configurations.nil? || configurations.empty?
|
158
|
+
prompt.error("There aren't any configurations available to use.")
|
159
|
+
prompt.error("--------------------------------------------------")
|
160
|
+
|
161
|
+
raise RediPress::NoConfigurationsAvailable
|
162
|
+
end
|
163
|
+
|
156
164
|
# Prompt for the configuration to use
|
157
165
|
configuration = prompt.select("Configuration:", configurations.values)
|
158
166
|
|
data/lib/redipress/errors.rb
CHANGED
@@ -17,6 +17,14 @@ module RediPress
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
+
# A RuntimeError subclass for when no configurations are available.
|
21
|
+
#
|
22
|
+
class NoConfigurationsAvailable < RuntimeError
|
23
|
+
def to_s
|
24
|
+
"There aren't any configurations available to use."
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
20
28
|
# A RuntimeError subclass for when the setup function has not been implemented.
|
21
29
|
#
|
22
30
|
class SetupNotImplemented < RuntimeError
|
data/lib/redipress/variables.rb
CHANGED