highline 1.6.18 → 1.6.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 53c78ab14c72f211a5cad876df0f52279d1e51dd
4
- data.tar.gz: 2d1f94f0b8410f2643800533534943da39a8953d
3
+ metadata.gz: c93d5d6310a71c9a3fba8e6c625ca28736e8fd20
4
+ data.tar.gz: 407f7bfd150c5bb79e82ed5bc1d1f9b61669de06
5
5
  SHA512:
6
- metadata.gz: 9b1a9bc30b44b87ee29ee5e63e8feb928eeceea9ccbe19ec24d9283486e16d3239f7de4d597a553e97a27549d527fc1f342cdce632f0fc2d70b78ab9c28f1653
7
- data.tar.gz: e6b506d3177ca6a9b400813b3181b01fa6244ad5c8edd18cc2db9fe051faec2c5a0f5fe1b41d529eb1999a7d38573960e6ac3511072e502481d1ebe70f158056
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).
@@ -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.18".freeze
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
- [ @java_terminal.getTerminalWidth, @java_terminal.getTerminalHeight ]
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
@@ -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.18
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-04-15 00:00:00.000000000 Z
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