perennial 1.2.4 → 1.2.5

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.
@@ -9,7 +9,7 @@ require 'perennial/exceptions'
9
9
 
10
10
  module Perennial
11
11
 
12
- VERSION = [1, 2, 4]
12
+ VERSION = [1, 2, 5]
13
13
 
14
14
  has_library :dispatchable, :hookable, :loader, :logger, :nash,
15
15
  :loggable, :manifest, :settings, :argument_parser,
@@ -20,8 +20,11 @@ module Perennial
20
20
  result.downcase[0] == ?y
21
21
  end
22
22
 
23
- def ask(question, default)
24
- result = Readline.readline("#{question.to_s.strip} (default: #{default}) ")
23
+ def ask(question, default = nil)
24
+ question_text = question.to_s.strip
25
+ question_text << " "
26
+ question_text << "(default: #{default}) " unless default.nil?
27
+ result = Readline.readline(question_text)
25
28
  result.blank? ? default : result
26
29
  end
27
30
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: perennial
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darcy Laycock
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-03 00:00:00 +08:00
12
+ date: 2010-01-14 00:00:00 +08:00
13
13
  default_executable: perennial
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency