trollop 1.10.1 → 1.10.2
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 +4 -0
- data/lib/trollop.rb +12 -13
- metadata +2 -2
data/History.txt
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
== 1.10.2 / 2008-10-23
|
2
|
+
* No longer try `stty size` for screen size detection. Just use curses, and
|
3
|
+
screen users will have to deal with the screen clearing.
|
4
|
+
|
1
5
|
== 1.10.1 / 2008-10-22
|
2
6
|
* Options hash now responds to method calls as well as standard hash lookup.
|
3
7
|
* Default values for multi-occurrence parameters now autoboxed.
|
data/lib/trollop.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
module Trollop
|
7
7
|
|
8
|
-
VERSION = "1.10.
|
8
|
+
VERSION = "1.10.2"
|
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.
|
@@ -501,19 +501,18 @@ class Parser
|
|
501
501
|
def width #:nodoc:
|
502
502
|
@width ||=
|
503
503
|
if $stdout.tty?
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
x
|
513
|
-
rescue Exception
|
514
|
-
end
|
504
|
+
begin
|
505
|
+
require 'curses'
|
506
|
+
Curses::init_screen
|
507
|
+
x = Curses::cols
|
508
|
+
Curses::close_screen
|
509
|
+
x
|
510
|
+
rescue Exception
|
511
|
+
80
|
515
512
|
end
|
516
|
-
|
513
|
+
else
|
514
|
+
80
|
515
|
+
end
|
517
516
|
end
|
518
517
|
|
519
518
|
## Print the help message to +stream+.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trollop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.10.
|
4
|
+
version: 1.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Morgan
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-10-
|
12
|
+
date: 2008-10-23 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|