highline 2.0.0.pre.develop.11 → 2.0.0.pre.develop.12

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: 384e4ddade0f40dc604fd6cbb4fed1f543f54fa3
4
- data.tar.gz: 80ca4c698e1418b4a3476e27e4179bde0405721c
3
+ metadata.gz: 20085d360090ca1af2b16c4ec579647ec88a79f2
4
+ data.tar.gz: 5b41382a10fef5b7ff836c69ed4eff2dbe50f65c
5
5
  SHA512:
6
- metadata.gz: 40e63c09636602c0a71582f8ea4033571202fe10721655b4853d74d3a391472ce6c574404fe750f543ec4f783b2e66afac247e21ec9ed729c521e0826d54187a
7
- data.tar.gz: c35ebc20d89396e0af1f8b97716067308c726c290374fecfa71c1b9a9968dcd854f0a1d020e6e7a10407ded8f9fc52273e688538c1b33b54ee05f9c0a2d8fd8d
6
+ metadata.gz: 9c12e2b43c53506dcb614024f726310fe0282db48c60ee0ce6bd01c15ee3c05592929310d939045b479c6ee12c8161a186b627eddef33c83477f9e0d5b06bda1
7
+ data.tar.gz: 81a74acd56063ae2262b4da7156938cb20434e469e19c2636bcb6943e6e93fa6c36dfddd8d7095cc03dcddea3ade28d104d30880cd858c5a64e566a2a1a5995e
@@ -23,6 +23,7 @@ matrix:
23
23
  - rvm: rbx-3.81
24
24
  - rvm: jruby-19mode # JRuby in 1.9 mode
25
25
  - rvm: jruby-head
26
+ fast_finish: true
26
27
  include:
27
28
  - rvm: 1.9
28
29
  before_install:
@@ -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
@@ -1,19 +1,37 @@
1
- version: '{build}'
1
+ version: 2.0.{build}-{branch}
2
2
 
3
- skip_tags: true
3
+ cache:
4
+ - vendor/bundle
4
5
 
5
6
  environment:
6
7
  matrix:
7
- - ruby_version: "21"
8
- - ruby_version: "21-x64"
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
- install:
11
- - SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
12
- - gem install bundler --no-document -v 1.10.5
13
- - bundle install --retry=3 --without development
20
+ matrix:
21
+ allow_failures:
22
+ - RUBY_VERSION: "193"
14
23
 
15
- test_script:
16
- - bundle exec rake
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
@@ -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
@@ -2,5 +2,5 @@
2
2
 
3
3
  class HighLine
4
4
  # The version of the installed library.
5
- VERSION = "2.0.0-develop.11".freeze
5
+ VERSION = "2.0.0-develop.12".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.pre.develop.11
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-09-25 00:00:00.000000000 Z
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