redipress 0.0.1 → 0.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 334430a1b5392e8f64578983c67f730f15dd6568
4
- data.tar.gz: 4cb222821ad1d2a23119fe3b86bbe0bcd7b5fbf7
3
+ metadata.gz: a1cd5a369540a7fac84e4543d82e3676e120654e
4
+ data.tar.gz: 41b2088329ce194c4c07ee018a838a852d4c5836
5
5
  SHA512:
6
- metadata.gz: 0a6306c82ee19388a7efa95ee32a87198a0d4fb13188f972cdd02c676f6694ac205c5aaa1f19540027dad67d91045e5ca1514eab45006345edf1568488a49305
7
- data.tar.gz: 5bb990692836f024d2a30253901180b61bce4955a1e2eee2691fc841da7829794ed2dcdbff9db4bf6f6b4d272d7f4f18a21195e0ccb242d7341f00a4bbf3995c
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
 
@@ -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
@@ -1,7 +1,7 @@
1
1
  module RediPress
2
2
  # The current version of the gem.
3
3
  #
4
- VERSION = '0.0.1'
4
+ VERSION = '0.0.2'
5
5
 
6
6
  # The directory where all configurations are stored.
7
7
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redipress
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rediweb Hosting