highline 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -2
- data/Changelog.md +3 -0
- data/lib/highline/terminal/io_console.rb +9 -2
- data/lib/highline/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dc957c24398353cf8247f3462d3af82168b0ba6601c9c690321fd826749709e
|
4
|
+
data.tar.gz: becb6f0eeb7b8ec08bf61cad4206ddcd7ed5d9e44bd312b5f983f66b47b7aa60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ed961a254e5df967983bd3590da488ba3c78e65dd599ed9290006b5083b6355215514c790a17686e66741c21a8411a8903bed51ac9f14b45d12638eef4c94ac
|
7
|
+
data.tar.gz: b853518b2b4c27e10a91ae20126c37671a0ab7b19deea6f81874a1c49a56be4728fed94ee2925acc8d918531d4ca7aedf6616ff2cf4cdbc6db8a5c5736d64265
|
data/.rubocop.yml
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
# https://github.com/bbatsov/rubocop/tree/master/config
|
5
5
|
|
6
6
|
AllCops:
|
7
|
-
TargetRubyVersion: 1
|
7
|
+
TargetRubyVersion: 2.1
|
8
8
|
|
9
9
|
# General
|
10
10
|
|
@@ -50,7 +50,6 @@ Naming/MethodName:
|
|
50
50
|
# SupportedStyles: when_needed, always, never
|
51
51
|
Style/Encoding:
|
52
52
|
Enabled: true
|
53
|
-
EnforcedStyle: always
|
54
53
|
|
55
54
|
# If we fix this, it will change method signature.
|
56
55
|
# Save it for major release.
|
data/Changelog.md
CHANGED
@@ -1,28 +1,35 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
class HighLine
|
4
4
|
class Terminal
|
5
5
|
# io/console option for HighLine::Terminal.
|
6
6
|
# It's the most used terminal.
|
7
|
+
# TODO: We're rescuing when not a terminal.
|
8
|
+
# We should make a more robust implementation.
|
7
9
|
class IOConsole < Terminal
|
8
10
|
# (see Terminal#terminal_size)
|
9
11
|
def terminal_size
|
10
12
|
output.winsize.reverse
|
13
|
+
rescue Errno::ENOTTY
|
11
14
|
end
|
12
15
|
|
13
16
|
# (see Terminal#raw_no_echo_mode)
|
14
17
|
def raw_no_echo_mode
|
15
18
|
input.echo = false
|
19
|
+
rescue Errno::ENOTTY
|
16
20
|
end
|
17
21
|
|
18
22
|
# (see Terminal#restore_mode)
|
19
23
|
def restore_mode
|
20
24
|
input.echo = true
|
25
|
+
rescue Errno::ENOTTY
|
21
26
|
end
|
22
27
|
|
23
28
|
# (see Terminal#get_character)
|
24
|
-
def get_character
|
29
|
+
def get_character
|
25
30
|
input.getch # from ruby io/console
|
31
|
+
rescue Errno::ENOTTY
|
32
|
+
input.getc
|
26
33
|
end
|
27
34
|
end
|
28
35
|
end
|
data/lib/highline/version.rb
CHANGED
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: 2.0.
|
4
|
+
version: 2.0.1
|
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:
|
11
|
+
date: 2019-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|