bogo-ui 0.1.26 → 0.1.28

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd5c1c2b32d936afe48819cb188b33a70555a46a7571fc40a56fc57365952155
4
- data.tar.gz: a975e43d9b76530d35d5814c6b0fb6342f40bfaff9083ff0299a9a5bd4fee4f2
3
+ metadata.gz: 3b36187eba0455ffe3bf0a0d89e3a2886b0837c31778c30a2f881d6560d7a1be
4
+ data.tar.gz: 238586675f8ef079659a12395411ddb495142c77b7759790e9769081cc763da9
5
5
  SHA512:
6
- metadata.gz: 58836981152c699f38571f51ae55b312ba578f34c0deb8b19980259c742a4bbffe6d40b89a69ffdadf9147d589e5d17f38025233206991d92aabba8bda26ee82
7
- data.tar.gz: 444724ff117c4948f87ea57033f1a55b9d3bc7c4b1613122a2faad9098d65e2f323f9d76d10e97ffe5b39da5f6e8c3f9ae49dd46921bbb3842e330074c7d5be9
6
+ metadata.gz: 7280f5a2090faccaaaf2ba161b4dd3005836ed6be81a167b737d50465ce751220aa7bf7417bc015bbec2d39fb6e2420a5351a9abed2a76c82afe6dba6b710407
7
+ data.tar.gz: 8f9352d41d18a509cdc8f2b6157010631b83e573dd9d110ce372ce88001508b56a4d83e88028c5cb97db5f4b9c7f02e432a3e54ff644b9015940777cbadd04c8
@@ -1,3 +1,6 @@
1
+ # v0.1.28
2
+ * Add custom exception type for declined confirmations
3
+
1
4
  # v0.1.26
2
5
  * Load io/console for noecho (#5)
3
6
 
@@ -6,6 +6,10 @@ module Bogo
6
6
  # CLI UI helper
7
7
  class Ui
8
8
 
9
+ # Custom exception type when confirmation is
10
+ # declined by the user
11
+ class ConfirmationDeclined < StandardError; end
12
+
9
13
  autoload :Table, 'bogo-ui/table'
10
14
 
11
15
  # @return [Truthy, Falsey]
@@ -184,7 +188,7 @@ module Bogo
184
188
  def confirm(question)
185
189
  unless(auto_confirm)
186
190
  result = ask("#{question} (Y/N)", :valid => /[YyNn]/).downcase
187
- raise 'Confirmation declined!' unless result == 'y'
191
+ raise ConfirmationDeclined.new 'Confirmation declined!' unless result == 'y'
188
192
  end
189
193
  end
190
194
 
@@ -1,6 +1,6 @@
1
1
  module Bogo
2
2
  class Ui
3
3
  # Current library version
4
- VERSION = Gem::Version.new('0.1.26')
4
+ VERSION = Gem::Version.new('0.1.28')
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bogo-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.26
4
+ version: 0.1.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Roberts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-28 00:00:00.000000000 Z
11
+ date: 2018-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bogo