console-mux 2.0.6 → 2.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 2.0.7
@@ -28,6 +28,8 @@ module Console
28
28
  module Mux
29
29
  include Log4r
30
30
 
31
+ VERSION = File.read(File.expand_path('../../../VERSION', __FILE__), 16).strip
32
+
31
33
  BUNDLE_EXEC_SH = File.expand_path('bundle_exec.sh',
32
34
  File.join(__FILE__, '..', 'mux'))
33
35
 
@@ -46,6 +48,10 @@ module Console
46
48
  opts.on('-f', '--init=FILE', 'Load this init file') do |file|
47
49
  options[:init_file] = file
48
50
  end
51
+ opts.on('--version', 'Print the version and exit') do
52
+ puts VERSION
53
+ exit
54
+ end
49
55
  end.parse!(args)
50
56
 
51
57
  begin
@@ -288,7 +288,12 @@ module Console
288
288
 
289
289
  def puts(message = '')
290
290
  # See http://stackoverflow.com/questions/1512028/gnu-readline-how-do-clear-the-input-line
291
- print "\b \b" * Readline.line_buffer.size
291
+ #
292
+ # FIXME: Mac OS X 10.8 Mountain Lion seems to no longer have
293
+ # Readline.line_buffer?? Or does it just return nil when
294
+ # empty?
295
+ buf = Readline.line_buffer
296
+ print "\b \b" * buf.size if buf
292
297
  print "\r"
293
298
  begin
294
299
  $stdout.puts message
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: console-mux
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-20 00:00:00.000000000 Z
12
+ date: 2013-03-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine
@@ -99,6 +99,7 @@ executables:
99
99
  extensions: []
100
100
  extra_rdoc_files: []
101
101
  files:
102
+ - VERSION
102
103
  - lib/console/mux/buffer_outputter.rb
103
104
  - lib/console/mux/color_formatter.rb
104
105
  - lib/console/mux/command.rb
@@ -131,7 +132,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
131
132
  version: '0'
132
133
  segments:
133
134
  - 0
134
- hash: -1687027767931669956
135
+ hash: -1031871365713465132
135
136
  required_rubygems_version: !ruby/object:Gem::Requirement
136
137
  none: false
137
138
  requirements:
@@ -140,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
141
  version: '0'
141
142
  segments:
142
143
  - 0
143
- hash: -1687027767931669956
144
+ hash: -1031871365713465132
144
145
  requirements: []
145
146
  rubyforge_project:
146
147
  rubygems_version: 1.8.23