highline 1.6.21 → 1.7.1
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 +15 -0
- data/COPYING +20 -21
- data/{CHANGELOG → Changelog.md} +82 -47
- data/Gemfile +9 -0
- data/INSTALL +4 -0
- data/README.rdoc +7 -1
- data/Rakefile +9 -29
- data/highline.gemspec +11 -11
- data/lib/highline.rb +35 -21
- data/lib/highline/menu.rb +1 -1
- data/lib/highline/question.rb +2 -3
- data/lib/highline/style.rb +19 -8
- data/lib/highline/system_extensions.rb +10 -1
- data/lib/highline/version.rb +4 -0
- data/test/tc_highline.rb +228 -2
- data/test/tc_menu.rb +2 -2
- data/test/tc_string_extension.rb +13 -0
- data/test/tc_style.rb +11 -0
- metadata +24 -9
- data/test/ts_all.rb +0 -16
data/test/tc_menu.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# coding: utf-8
|
2
2
|
# tc_menu.rb
|
3
3
|
#
|
4
4
|
# Created by Gregory Thomas Brown on 2005-05-10.
|
@@ -75,7 +75,7 @@ class TestMenu < Test::Unit::TestCase
|
|
75
75
|
# Default: menu.flow = :rows
|
76
76
|
menu.choice "Unicode right single quotation mark: ’"
|
77
77
|
end
|
78
|
-
assert_equal("1. Unicode right single quotation mark: ’\n? ", @output.string)
|
78
|
+
assert_equal("1. Unicode right single quotation mark: ’\n? ".encode(@output.external_encoding, { :undef => :replace }), @output.string)
|
79
79
|
end
|
80
80
|
|
81
81
|
def test_help
|
data/test/tc_string_extension.rb
CHANGED
@@ -17,4 +17,17 @@ class TestStringExtension < Test::Unit::TestCase
|
|
17
17
|
end
|
18
18
|
|
19
19
|
include StringMethods
|
20
|
+
|
21
|
+
def test_Highline_String_is_yaml_serializable
|
22
|
+
require 'yaml'
|
23
|
+
unless Gem::Version.new(YAML::VERSION) < Gem::Version.new("2.0.2")
|
24
|
+
highline_string = HighLine::String.new("Yaml didn't messed with HighLine::String")
|
25
|
+
yaml_highline_string = highline_string.to_yaml
|
26
|
+
yaml_loaded_string = YAML.load(yaml_highline_string)
|
27
|
+
|
28
|
+
assert_equal "Yaml didn't messed with HighLine::String", yaml_loaded_string
|
29
|
+
assert_equal highline_string, yaml_loaded_string
|
30
|
+
assert_instance_of HighLine::String, yaml_loaded_string
|
31
|
+
end
|
32
|
+
end
|
20
33
|
end
|
data/test/tc_style.rb
CHANGED
@@ -564,4 +564,15 @@ class TestStyle < Test::Unit::TestCase
|
|
564
564
|
|
565
565
|
assert_raise(::RuntimeError) { @style3.bright } # Can't create a variant of a list style
|
566
566
|
end
|
567
|
+
|
568
|
+
def test_light_do_the_same_as_bright
|
569
|
+
bright_style = @style1.bright
|
570
|
+
light_style = @style1.light
|
571
|
+
|
572
|
+
assert_not_equal bright_style, light_style
|
573
|
+
assert_equal :bright_foo, bright_style.name
|
574
|
+
assert_equal :light_foo, light_style.name
|
575
|
+
assert_equal bright_style.code, light_style.code
|
576
|
+
assert_equal bright_style.rgb, light_style.rgb
|
577
|
+
end
|
567
578
|
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: highline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.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:
|
12
|
-
dependencies:
|
11
|
+
date: 2015-02-25 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: code_statistics
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
description: |
|
14
28
|
A high-level IO library that provides validation, type conversion, and more for
|
15
29
|
command-line interfaces. HighLine also includes a complete menu system that can
|
@@ -22,13 +36,15 @@ extra_rdoc_files:
|
|
22
36
|
- README.rdoc
|
23
37
|
- INSTALL
|
24
38
|
- TODO
|
25
|
-
-
|
39
|
+
- Changelog.md
|
26
40
|
- LICENSE
|
27
41
|
files:
|
28
42
|
- ".gitignore"
|
43
|
+
- ".travis.yml"
|
29
44
|
- AUTHORS
|
30
|
-
- CHANGELOG
|
31
45
|
- COPYING
|
46
|
+
- Changelog.md
|
47
|
+
- Gemfile
|
32
48
|
- INSTALL
|
33
49
|
- LICENSE
|
34
50
|
- README.rdoc
|
@@ -59,6 +75,7 @@ files:
|
|
59
75
|
- lib/highline/string_extensions.rb
|
60
76
|
- lib/highline/style.rb
|
61
77
|
- lib/highline/system_extensions.rb
|
78
|
+
- lib/highline/version.rb
|
62
79
|
- setup.rb
|
63
80
|
- site/.cvsignore
|
64
81
|
- site/highline.css
|
@@ -72,8 +89,7 @@ files:
|
|
72
89
|
- test/tc_string_extension.rb
|
73
90
|
- test/tc_string_highline.rb
|
74
91
|
- test/tc_style.rb
|
75
|
-
|
76
|
-
homepage: http://highline.rubyforge.org
|
92
|
+
homepage: https://github.com/JEG2/highline
|
77
93
|
licenses:
|
78
94
|
- Ruby
|
79
95
|
metadata: {}
|
@@ -89,7 +105,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
89
105
|
requirements:
|
90
106
|
- - ">="
|
91
107
|
- !ruby/object:Gem::Version
|
92
|
-
version:
|
108
|
+
version: 1.9.3
|
93
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
110
|
requirements:
|
95
111
|
- - ">="
|
@@ -110,4 +126,3 @@ test_files:
|
|
110
126
|
- test/tc_string_extension.rb
|
111
127
|
- test/tc_string_highline.rb
|
112
128
|
- test/tc_style.rb
|
113
|
-
- test/ts_all.rb
|
data/test/ts_all.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
# ts_all.rb
|
2
|
-
#
|
3
|
-
# Created by James Edward Gray II on 2005-04-26.
|
4
|
-
# Copyright 2005 Gray Productions. All rights reserved.
|
5
|
-
#
|
6
|
-
# This is Free Software. See LICENSE and COPYING for details.
|
7
|
-
|
8
|
-
require "test/unit"
|
9
|
-
|
10
|
-
require "tc_highline"
|
11
|
-
require "tc_import"
|
12
|
-
require "tc_menu"
|
13
|
-
require "tc_style"
|
14
|
-
require "tc_color_scheme"
|
15
|
-
require "tc_string_highline"
|
16
|
-
require "tc_string_extension"
|