prompter 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/prompter.rb +3 -4
  3. data/prompter.gemspec +1 -1
  4. metadata +8 -8
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
@@ -110,8 +110,7 @@ class Prompter
110
110
  input = $stdin.gets || '' # multilines ended at start generate a nil
111
111
  input.strip!
112
112
  input = opts[:default].to_s if input.empty?
113
- opts.delete(:style) # :style is not passed
114
- say_echo input, opts
113
+ say_echo(input, opts) unless opts[:echo] == false || echo == false
115
114
  block_given? ? yield(input) : input
116
115
  end
117
116
 
@@ -267,10 +266,10 @@ class Prompter
267
266
 
268
267
  # used internally to show a feedback of the input
269
268
  def say_echo(result, opts={})
269
+ opts.delete(:style) # :style is not passed
270
270
  opts = { :style => :say_echo_style,
271
- :echo => echo,
272
271
  :prefix => ' ' * prefix.to_s.size }.merge opts
273
- say( ('=> ' + result.inspect), opts ) if opts[:echo]
272
+ say( ('=> ' + result.inspect), opts )
274
273
  result
275
274
  end
276
275
 
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.add_runtime_dependency('dye', [">= 0.1.1"])
14
14
  s.add_runtime_dependency('yard', [">= 0.6.3"])
15
- s.add_development_dependency('irt', [">= 1.0.9"])
15
+ s.add_development_dependency('irt', [">= 1.1.2"])
16
16
 
17
17
  s.files = `git ls-files -z`.split("\0")
18
18
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prompter
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Domizio Demichelis
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-01 00:00:00 -04:00
18
+ date: 2011-02-14 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -58,12 +58,12 @@ dependencies:
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- hash: 5
61
+ hash: 23
62
62
  segments:
63
63
  - 1
64
- - 0
65
- - 9
66
- version: 1.0.9
64
+ - 1
65
+ - 2
66
+ version: 1.1.2
67
67
  type: :development
68
68
  version_requirements: *id003
69
69
  description: A few helpers to create colored, multistep and hierarchical wizards