highline 1.6.18 → 1.6.19
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.
- checksums.yaml +4 -4
- data/CHANGELOG +4 -0
- data/lib/highline.rb +1 -1
- data/lib/highline/system_extensions.rb +5 -1
- data/test/tc_highline.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c93d5d6310a71c9a3fba8e6c625ca28736e8fd20
|
4
|
+
data.tar.gz: 407f7bfd150c5bb79e82ed5bc1d1f9b61669de06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 970bcd09397745bc4c6f31bee83044f157277401b4be57e7465e9568dff609e795e631bfae69c157f3f06cd4b032d45807547eb04ddcfbaa2598397d9a36f34c
|
7
|
+
data.tar.gz: cb48512d7dcad2ecd6185c1c56cdb06bc25c377bc3a9b879d352a70fc6e1056160e9ceb1a9bfa18a1ba00f38ffac4d2c3dc76a0e543554fa04a5e9992761498b
|
data/CHANGELOG
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
Below is a complete listing of changes for each revision of HighLine.
|
4
4
|
|
5
|
+
== 1.6.19
|
6
|
+
|
7
|
+
* Fixed `terminal_size()` with jline2 (by presidentbeef).
|
8
|
+
|
5
9
|
== 1.6.18
|
6
10
|
|
7
11
|
* Fixed a long supported interface that was accidentally broken with a recent change (by Rubem Nakamura Carneiro).
|
data/lib/highline.rb
CHANGED
@@ -28,7 +28,7 @@ require "highline/style"
|
|
28
28
|
#
|
29
29
|
class HighLine
|
30
30
|
# The version of the installed library.
|
31
|
-
VERSION = "1.6.
|
31
|
+
VERSION = "1.6.19".freeze
|
32
32
|
|
33
33
|
# An internal HighLine error. User code does not need to trap this.
|
34
34
|
class QuestionError < StandardError
|
@@ -140,7 +140,11 @@ class HighLine
|
|
140
140
|
CHARACTER_MODE = "jline" # For Debugging purposes only.
|
141
141
|
|
142
142
|
def terminal_size
|
143
|
-
|
143
|
+
if JRUBY_VERSION =~ /^1.7/
|
144
|
+
[ @java_terminal.get_width, @java_terminal.get_height ]
|
145
|
+
else
|
146
|
+
[ @java_terminal.getTerminalWidth, @java_terminal.getTerminalHeight ]
|
147
|
+
end
|
144
148
|
end
|
145
149
|
|
146
150
|
def raw_no_echo_mode
|
data/test/tc_highline.rb
CHANGED
@@ -929,6 +929,11 @@ class TestHighLine < Test::Unit::TestCase
|
|
929
929
|
assert_equal("\e[32mThis will have a newline.\e[0m\n", @output.string)
|
930
930
|
end
|
931
931
|
|
932
|
+
def test_terminal_size
|
933
|
+
assert_instance_of(Fixnum, @terminal.terminal_size[0])
|
934
|
+
assert_instance_of(Fixnum, @terminal.terminal_size[1])
|
935
|
+
end
|
936
|
+
|
932
937
|
def test_type_conversion
|
933
938
|
number = 61676
|
934
939
|
@input << number << "\n"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: highline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Edward Gray II
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
A high-level IO library that provides validation, type conversion, and more for
|