prompter 0.1.3 → 0.1.4

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 -3
  3. data/test/say.irt +1 -1
  4. metadata +4 -32
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -62,8 +62,8 @@ class Prompter
62
62
  opts = { :force_new_line => (message !~ /( |\t)$/),
63
63
  :style => :say_style,
64
64
  :prefix => prefix }.merge opts
65
- message = dye(message, *opts[:style]) unless opts[:style].nil?
66
65
  message = (opts[:prefix]||'') + message
66
+ message = dye(message, *opts[:style]) unless opts[:style].nil?
67
67
  $stdout.send((opts[:force_new_line] ? :puts : :print), message)
68
68
  $stdout.flush
69
69
  end
@@ -276,8 +276,8 @@ class Prompter
276
276
  # used internally to show the hints
277
277
  def say_hint(hint, opts={})
278
278
  return if hint.empty?
279
- opts.merge!( { :style => :hint_style} ) # hint is always :hint_style
280
- opts = {:prefix => '' }.merge opts
279
+ # hint is always :hint_style with no prefix
280
+ opts.merge! :style => :hint_style, :prefix => ''
281
281
  hint = hint + ' ' unless opts[:force_new_line]
282
282
  say hint, opts
283
283
  end
@@ -26,7 +26,7 @@ EOS
26
26
 
27
27
  desc "style override"
28
28
  capture { Prompter.say "style override", :style => :magenta }
29
- _eql?( "--- \e[0m\e[35mstyle override\e[0m\n" )
29
+ _eql?( "\e[0m\e[35m--- style override\e[0m\n" )
30
30
 
31
31
  class ExtendedByPrompter
32
32
  extend Prompter::Methods
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prompter
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 1
9
- - 3
10
- version: 0.1.3
4
+ prerelease:
5
+ version: 0.1.4
11
6
  platform: ruby
12
7
  authors:
13
8
  - Domizio Demichelis
@@ -15,7 +10,7 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2011-02-14 00:00:00 -04:00
13
+ date: 2011-02-15 00:00:00 -04:00
19
14
  default_executable:
20
15
  dependencies:
21
16
  - !ruby/object:Gem::Dependency
@@ -26,11 +21,6 @@ dependencies:
26
21
  requirements:
27
22
  - - ">="
28
23
  - !ruby/object:Gem::Version
29
- hash: 25
30
- segments:
31
- - 0
32
- - 1
33
- - 1
34
24
  version: 0.1.1
35
25
  type: :runtime
36
26
  version_requirements: *id001
@@ -42,11 +32,6 @@ dependencies:
42
32
  requirements:
43
33
  - - ">="
44
34
  - !ruby/object:Gem::Version
45
- hash: 1
46
- segments:
47
- - 0
48
- - 6
49
- - 3
50
35
  version: 0.6.3
51
36
  type: :runtime
52
37
  version_requirements: *id002
@@ -58,11 +43,6 @@ dependencies:
58
43
  requirements:
59
44
  - - ">="
60
45
  - !ruby/object:Gem::Version
61
- hash: 23
62
- segments:
63
- - 1
64
- - 1
65
- - 2
66
46
  version: 1.1.2
67
47
  type: :development
68
48
  version_requirements: *id003
@@ -102,25 +82,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
82
  requirements:
103
83
  - - ">="
104
84
  - !ruby/object:Gem::Version
105
- hash: 3
106
- segments:
107
- - 0
108
85
  version: "0"
109
86
  required_rubygems_version: !ruby/object:Gem::Requirement
110
87
  none: false
111
88
  requirements:
112
89
  - - ">="
113
90
  - !ruby/object:Gem::Version
114
- hash: 23
115
- segments:
116
- - 1
117
- - 3
118
- - 6
119
91
  version: 1.3.6
120
92
  requirements: []
121
93
 
122
94
  rubyforge_project:
123
- rubygems_version: 1.3.7
95
+ rubygems_version: 1.5.0
124
96
  signing_key:
125
97
  specification_version: 3
126
98
  summary: Makes your prompts easier to build and prettier to look