highline 2.0.0.pre.develop.11 → 2.0.0.pre.develop.12
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/.travis.yml +1 -0
- data/Changelog.md +6 -0
- data/appveyor.yml +28 -10
- data/lib/highline.rb +17 -2
- data/lib/highline/io_console_compatible.rb +37 -0
- data/lib/highline/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20085d360090ca1af2b16c4ec579647ec88a79f2
|
4
|
+
data.tar.gz: 5b41382a10fef5b7ff836c69ed4eff2dbe50f65c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c12e2b43c53506dcb614024f726310fe0282db48c60ee0ce6bd01c15ee3c05592929310d939045b479c6ee12c8161a186b627eddef33c83477f9e0d5b06bda1
|
7
|
+
data.tar.gz: 81a74acd56063ae2262b4da7156938cb20434e469e19c2636bcb6943e6e93fa6c36dfddd8d7095cc03dcddea3ade28d104d30880cd858c5a64e566a2a1a5995e
|
data/.travis.yml
CHANGED
data/Changelog.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
Below is a complete listing of changes for each revision of HighLine.
|
4
4
|
|
5
|
+
### Unreleased
|
6
|
+
* PR #218 - Ease transition from 1.7.x to 2.0.x (@abinoam)
|
7
|
+
* Copy use_color from HighLine.default_instance
|
8
|
+
* Expose IOConsoleCompatible
|
9
|
+
* PR #216 - Update .appveyor.yml - Fix Windows CI (@abinoam)
|
10
|
+
|
5
11
|
### 2.0.0-develop.11 / 2017-09-25
|
6
12
|
* PR #215 - Apply several Rubocop stylistic suggestions (@abinoam)
|
7
13
|
* Update gemspec/Gemfile to newer standards
|
data/appveyor.yml
CHANGED
@@ -1,19 +1,37 @@
|
|
1
|
-
version:
|
1
|
+
version: 2.0.{build}-{branch}
|
2
2
|
|
3
|
-
|
3
|
+
cache:
|
4
|
+
- vendor/bundle
|
4
5
|
|
5
6
|
environment:
|
6
7
|
matrix:
|
7
|
-
-
|
8
|
-
-
|
8
|
+
- RUBY_VERSION: "193"
|
9
|
+
- RUBY_VERSION: "200"
|
10
|
+
- RUBY_VERSION: "200-x64"
|
11
|
+
- RUBY_VERSION: "21"
|
12
|
+
- RUBY_VERSION: "21-x64"
|
13
|
+
- RUBY_VERSION: "22"
|
14
|
+
- RUBY_VERSION: "22-x64"
|
15
|
+
- RUBY_VERSION: "23"
|
16
|
+
- RUBY_VERSION: "23-x64"
|
17
|
+
- RUBY_VERSION: "24"
|
18
|
+
- RUBY_VERSION: "24-x64"
|
9
19
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
- bundle install --retry=3 --without development
|
20
|
+
matrix:
|
21
|
+
allow_failures:
|
22
|
+
- RUBY_VERSION: "193"
|
14
23
|
|
15
|
-
|
16
|
-
-
|
24
|
+
install:
|
25
|
+
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
|
26
|
+
- bundle config --local path vendor/bundle
|
27
|
+
- bundle install --retry=3 --without code_quality
|
17
28
|
|
18
29
|
build: off
|
19
30
|
|
31
|
+
before_test:
|
32
|
+
- ruby -v
|
33
|
+
- gem -v
|
34
|
+
- bundle -v
|
35
|
+
|
36
|
+
test_script:
|
37
|
+
- bundle exec rake
|
data/lib/highline.rb
CHANGED
@@ -115,9 +115,9 @@ class HighLine
|
|
115
115
|
@header = nil
|
116
116
|
@prompt = nil
|
117
117
|
@key = nil
|
118
|
-
@use_color = true
|
119
|
-
@track_eof = true # The setting used to disable EOF tracking.
|
120
118
|
|
119
|
+
@use_color = default_use_color
|
120
|
+
@track_eof = true # The setting used to disable EOF tracking.
|
121
121
|
@terminal = HighLine::Terminal.get_terminal(input, output)
|
122
122
|
end
|
123
123
|
|
@@ -619,6 +619,21 @@ class HighLine
|
|
619
619
|
def actual_length(text)
|
620
620
|
Wrapper.actual_length text
|
621
621
|
end
|
622
|
+
|
623
|
+
# Check to see if there's already a HighLine.default_instance or if
|
624
|
+
# this is the first time the method is called (eg: at
|
625
|
+
# HighLine.default_instance initialization).
|
626
|
+
# If there's already one, copy use_color settings.
|
627
|
+
# This is here most to help migrate code from HighLine 1.7.x to 2.0.x
|
628
|
+
#
|
629
|
+
# @return [Boolean]
|
630
|
+
def default_use_color
|
631
|
+
if HighLine.default_instance
|
632
|
+
HighLine.default_instance.use_color
|
633
|
+
else
|
634
|
+
true
|
635
|
+
end
|
636
|
+
end
|
622
637
|
end
|
623
638
|
|
624
639
|
HighLine.default_instance = HighLine.new
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
require "stringio"
|
4
|
+
require "tempfile"
|
5
|
+
|
6
|
+
#
|
7
|
+
# On tests, we try to simulate input output with
|
8
|
+
# StringIO, Tempfile and File objects.
|
9
|
+
#
|
10
|
+
# For this to be accomplished, we have to do some
|
11
|
+
# tweaking so that they respond adequately to the
|
12
|
+
# called methods during tests.
|
13
|
+
#
|
14
|
+
|
15
|
+
module IOConsoleCompatible
|
16
|
+
def getch
|
17
|
+
getc
|
18
|
+
end
|
19
|
+
|
20
|
+
attr_accessor :echo
|
21
|
+
|
22
|
+
def winsize
|
23
|
+
[24, 80]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
class Tempfile
|
28
|
+
include IOConsoleCompatible
|
29
|
+
end
|
30
|
+
|
31
|
+
class File
|
32
|
+
include IOConsoleCompatible
|
33
|
+
end
|
34
|
+
|
35
|
+
class StringIO
|
36
|
+
include IOConsoleCompatible
|
37
|
+
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.0.pre.develop.
|
4
|
+
version: 2.0.0.pre.develop.12
|
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: 2017-
|
11
|
+
date: 2017-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -100,6 +100,7 @@ files:
|
|
100
100
|
- lib/highline/compatibility.rb
|
101
101
|
- lib/highline/custom_errors.rb
|
102
102
|
- lib/highline/import.rb
|
103
|
+
- lib/highline/io_console_compatible.rb
|
103
104
|
- lib/highline/list.rb
|
104
105
|
- lib/highline/list_renderer.rb
|
105
106
|
- lib/highline/menu.rb
|