trollop 1.5 → 1.6
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.
- data/History.txt +3 -0
- data/lib/trollop.rb +12 -8
- metadata +2 -2
data/History.txt
CHANGED
data/lib/trollop.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
module Trollop
|
7
7
|
|
8
|
-
VERSION = "1.
|
8
|
+
VERSION = "1.6"
|
9
9
|
|
10
10
|
## Thrown by Parser in the event of a commandline error. Not needed if
|
11
11
|
## you're using the Trollop::options entry.
|
@@ -302,13 +302,17 @@ class Parser
|
|
302
302
|
|
303
303
|
def width #:nodoc:
|
304
304
|
@width ||=
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
305
|
+
if $stdout.tty?
|
306
|
+
begin
|
307
|
+
require 'curses'
|
308
|
+
Curses::init_screen
|
309
|
+
x = Curses::cols
|
310
|
+
Curses::close_screen
|
311
|
+
x
|
312
|
+
rescue Exception
|
313
|
+
80
|
314
|
+
end
|
315
|
+
else
|
312
316
|
80
|
313
317
|
end
|
314
318
|
end
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: trollop
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: "1.
|
7
|
-
date: 2007-
|
6
|
+
version: "1.6"
|
7
|
+
date: 2007-04-01 00:00:00 -07:00
|
8
8
|
summary: Trollop is YAFCLAP --- yet another fine commandline argument processing library for Ruby. Trollop is designed to provide the maximal amount of GNU-style argument processing in the minimum number of lines of code (for you, the programmer).
|
9
9
|
require_paths:
|
10
10
|
- lib
|