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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ecf19fa131b098e2a7e2cab986dbde0aec94111b2a9085bedf85b03018b0a9bf
4
- data.tar.gz: 5c0512b1886619d1498769211d425435d4166baeb1f8e577e04edc897c478617
3
+ metadata.gz: 8dc957c24398353cf8247f3462d3af82168b0ba6601c9c690321fd826749709e
4
+ data.tar.gz: becb6f0eeb7b8ec08bf61cad4206ddcd7ed5d9e44bd312b5f983f66b47b7aa60
5
5
  SHA512:
6
- metadata.gz: a855c9c4bbe43d7111c6c68c31c6453f25ca3b3e731bcae43a1be78fdba9697755ad0ffd4b41206b9a9466cf4cc80ed29779062d76e5d383ac0bff9fadd276b3
7
- data.tar.gz: 148387c35fdcaea444cede538800f68f3abb9bdb8babdf0e40459fd8b2a98eda6961867353d91ddf834d3d413dfb97beaf1f4719f3e39891cc0ee378ec100184
6
+ metadata.gz: 0ed961a254e5df967983bd3590da488ba3c78e65dd599ed9290006b5083b6355215514c790a17686e66741c21a8411a8903bed51ac9f14b45d12638eef4c94ac
7
+ data.tar.gz: b853518b2b4c27e10a91ae20126c37671a0ab7b19deea6f81874a1c49a56be4728fed94ee2925acc8d918531d4ca7aedf6616ff2cf4cdbc6db8a5c5736d64265
@@ -4,7 +4,7 @@
4
4
  # https://github.com/bbatsov/rubocop/tree/master/config
5
5
 
6
6
  AllCops:
7
- TargetRubyVersion: 1.9
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.
@@ -2,6 +2,9 @@
2
2
 
3
3
  Below is a complete listing of changes for each revision of HighLine.
4
4
 
5
+ ### 2.0.1 / 2018-01-23
6
+ * PR #238 / I #237 - Rescue Errno::ENOTTY when pipeing
7
+
5
8
  ### 2.0.0 / 2018-06-10
6
9
  * Release 2.0.0 (major version release).
7
10
 
@@ -1,28 +1,35 @@
1
- # coding: utf-8
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 # rubocop:disable Naming/AccessorMethodName
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
@@ -2,5 +2,5 @@
2
2
 
3
3
  class HighLine
4
4
  # The version of the installed library.
5
- VERSION = "2.0.0".freeze
5
+ VERSION = "2.0.1".freeze
6
6
  end
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.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: 2018-06-11 00:00:00.000000000 Z
11
+ date: 2019-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler