highline 1.6.9 → 1.6.10
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.
- data/CHANGELOG +6 -0
- data/Rakefile +1 -1
- data/highline.gemspec +1 -1
- data/lib/highline.rb +1 -1
- data/lib/highline/question.rb +1 -1
- data/lib/highline/system_extensions.rb +2 -0
- data/test/tc_highline.rb +10 -0
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
Below is a complete listing of changes for each revision of HighLine.
|
4
4
|
|
5
|
+
== 1.6.10
|
6
|
+
|
7
|
+
* Fixed a regression that prevented asking for String arguments (by Jeffery
|
8
|
+
Sman.)
|
9
|
+
* Fixed a testing incompatibility (by Hans de Graaff.)
|
10
|
+
|
5
11
|
== 1.6.9
|
6
12
|
|
7
13
|
* The new list modes now properly ignore escapes when sizing.
|
data/Rakefile
CHANGED
@@ -6,7 +6,7 @@ require "rubygems"
|
|
6
6
|
|
7
7
|
dir = File.dirname(__FILE__)
|
8
8
|
lib = File.join(dir, "lib", "highline.rb")
|
9
|
-
version = File.read(lib)[/^\s*VERSION\s*=\s*(['"])(\d
|
9
|
+
version = File.read(lib)[/^\s*VERSION\s*=\s*(['"])(\d+\.\d+\.\d+)\1/, 2]
|
10
10
|
|
11
11
|
task :default => [:test]
|
12
12
|
|
data/highline.gemspec
CHANGED
data/lib/highline.rb
CHANGED
@@ -30,7 +30,7 @@ require "highline/style"
|
|
30
30
|
#
|
31
31
|
class HighLine
|
32
32
|
# The version of the installed library.
|
33
|
-
VERSION = "1.6.
|
33
|
+
VERSION = "1.6.10".freeze
|
34
34
|
|
35
35
|
# An internal HighLine error. User code does not need to trap this.
|
36
36
|
class QuestionError < StandardError
|
data/lib/highline/question.rb
CHANGED
@@ -302,7 +302,7 @@ class HighLine
|
|
302
302
|
def convert( answer_string )
|
303
303
|
if @answer_type.nil?
|
304
304
|
answer_string
|
305
|
-
elsif
|
305
|
+
elsif [::String, HighLine::String].include?(@answer_type)
|
306
306
|
HighLine::String(answer_string)
|
307
307
|
elsif [Float, Integer, String].include?(@answer_type)
|
308
308
|
Kernel.send(@answer_type.to_s.to_sym, answer_string)
|
data/test/tc_highline.rb
CHANGED
@@ -62,6 +62,16 @@ class TestHighLine < Test::Unit::TestCase
|
|
62
62
|
assert_raise(EOFError) { @terminal.ask("Any input left? ") }
|
63
63
|
end
|
64
64
|
|
65
|
+
def test_ask_string
|
66
|
+
name = "James Edward Gray II"
|
67
|
+
@input << name << "\n"
|
68
|
+
@input.rewind
|
69
|
+
|
70
|
+
assert_equal(name, @terminal.ask("What is your name? ", String))
|
71
|
+
|
72
|
+
assert_raise(EOFError) { @terminal.ask("Any input left? ", String) }
|
73
|
+
end
|
74
|
+
|
65
75
|
def test_bug_fixes
|
66
76
|
# auto-complete bug
|
67
77
|
@input << "ruby\nRuby\n"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: highline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.10
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-01-24 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: ! 'A high-level IO library that provides validation, type conversion,
|
15
15
|
and more for
|