term-ansicolor 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -2
- data/CHANGES +1 -0
- data/Gemfile +0 -2
- data/VERSION +1 -1
- data/lib/term/ansicolor.rb +1 -1
- data/lib/term/ansicolor/rgb_triple.rb +1 -1
- data/lib/term/ansicolor/version.rb +1 -1
- data/term-ansicolor.gemspec +31 -31
- data/tests/attribute_test.rb +2 -2
- data/tests/rgb_triple_test.rb +1 -0
- data/tests/test_helper.rb +0 -4
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a042afabf731967c78b64fe085f173784f44332
|
4
|
+
data.tar.gz: 6fd120153a072fe269e12c15a02fd3b95a2a7312
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab4ae6ba91654b2ff44cff7060c721af7c64f4a00cad507e9dcad3645ab638ade9646f12698e476b14eeb47688a59aab7661e53182dfbebe877380b501be6b78
|
7
|
+
data.tar.gz: 7139367ab4fef2fdc336a74a8424c0fac5e249e109b52d6ae410e1b25bc7466c4df2905d33374ac470fa086e7433417c41d60a57844e159b0711f9f2ed385c7f
|
data/.travis.yml
CHANGED
data/CHANGES
CHANGED
data/Gemfile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.4.
|
1
|
+
1.4.1
|
data/lib/term/ansicolor.rb
CHANGED
@@ -20,7 +20,7 @@ module Term
|
|
20
20
|
when /\A#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\z/i
|
21
21
|
new(*$~.captures.map { |c| convert_value(c.to_i(16)) })
|
22
22
|
when /\A#([0-9a-f])([0-9a-f])([0-9a-f])\z/i
|
23
|
-
new(*$~.captures.map { |c| convert_value(c.to_i(16)
|
23
|
+
new(*$~.captures.map { |c| convert_value((c + c).to_i(16)) })
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
data/term-ansicolor.gemspec
CHANGED
@@ -1,45 +1,45 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: term-ansicolor 1.4.
|
2
|
+
# stub: term-ansicolor 1.4.1 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
|
-
s.name = "term-ansicolor"
|
6
|
-
s.version = "1.4.
|
5
|
+
s.name = "term-ansicolor".freeze
|
6
|
+
s.version = "1.4.1"
|
7
7
|
|
8
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
9
|
-
s.require_paths = ["lib"]
|
10
|
-
s.authors = ["Florian Frank"]
|
11
|
-
s.date = "
|
12
|
-
s.description = "This library uses ANSI escape sequences to control the attributes of terminal output"
|
13
|
-
s.email = "flori@ping.de"
|
14
|
-
s.executables = ["term_cdiff", "term_colortab", "term_decolor", "term_display", "term_mandel"]
|
15
|
-
s.extra_rdoc_files = ["README.rdoc", "lib/term/ansicolor.rb", "lib/term/ansicolor/attribute.rb", "lib/term/ansicolor/attribute/color256.rb", "lib/term/ansicolor/attribute/color8.rb", "lib/term/ansicolor/attribute/intense_color8.rb", "lib/term/ansicolor/attribute/text.rb", "lib/term/ansicolor/ppm_reader.rb", "lib/term/ansicolor/rgb_color_metrics.rb", "lib/term/ansicolor/rgb_triple.rb", "lib/term/ansicolor/version.rb"]
|
16
|
-
s.files = [".gitignore", ".travis.yml", "CHANGES", "COPYING", "Gemfile", "README.rdoc", "Rakefile", "VERSION", "bin/term_cdiff", "bin/term_colortab", "bin/term_decolor", "bin/term_display", "bin/term_mandel", "examples/ColorTest.gif", "examples/Mona_Lisa.jpg", "examples/Stilleben.jpg", "examples/example.rb", "examples/lambda-red-plain.ppm", "examples/lambda-red.png", "examples/lambda-red.ppm", "examples/pacman.jpg", "examples/smiley.png", "examples/wool.jpg", "lib/term/ansicolor.rb", "lib/term/ansicolor/.keep", "lib/term/ansicolor/attribute.rb", "lib/term/ansicolor/attribute/color256.rb", "lib/term/ansicolor/attribute/color8.rb", "lib/term/ansicolor/attribute/intense_color8.rb", "lib/term/ansicolor/attribute/text.rb", "lib/term/ansicolor/ppm_reader.rb", "lib/term/ansicolor/rgb_color_metrics.rb", "lib/term/ansicolor/rgb_triple.rb", "lib/term/ansicolor/version.rb", "term-ansicolor.gemspec", "tests/ansicolor_test.rb", "tests/attribute_test.rb", "tests/ppm_reader_test.rb", "tests/rgb_color_metrics_test.rb", "tests/rgb_triple_test.rb", "tests/test_helper.rb"]
|
17
|
-
s.homepage = "http://flori.github.com/term-ansicolor"
|
18
|
-
s.licenses = ["GPL-2"]
|
19
|
-
s.rdoc_options = ["--title", "Term-ansicolor - Ruby library that colors strings using ANSI escape sequences", "--main", "README.rdoc"]
|
20
|
-
s.required_ruby_version = Gem::Requirement.new(">= 2.0")
|
21
|
-
s.rubygems_version = "2.
|
22
|
-
s.summary = "Ruby library that colors strings using ANSI escape sequences"
|
23
|
-
s.test_files = ["tests/ansicolor_test.rb", "tests/attribute_test.rb", "tests/ppm_reader_test.rb", "tests/rgb_color_metrics_test.rb", "tests/rgb_triple_test.rb", "tests/test_helper.rb"]
|
8
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
|
+
s.require_paths = ["lib".freeze]
|
10
|
+
s.authors = ["Florian Frank".freeze]
|
11
|
+
s.date = "2017-03-24"
|
12
|
+
s.description = "This library uses ANSI escape sequences to control the attributes of terminal output".freeze
|
13
|
+
s.email = "flori@ping.de".freeze
|
14
|
+
s.executables = ["term_cdiff".freeze, "term_colortab".freeze, "term_decolor".freeze, "term_display".freeze, "term_mandel".freeze]
|
15
|
+
s.extra_rdoc_files = ["README.rdoc".freeze, "lib/term/ansicolor.rb".freeze, "lib/term/ansicolor/attribute.rb".freeze, "lib/term/ansicolor/attribute/color256.rb".freeze, "lib/term/ansicolor/attribute/color8.rb".freeze, "lib/term/ansicolor/attribute/intense_color8.rb".freeze, "lib/term/ansicolor/attribute/text.rb".freeze, "lib/term/ansicolor/ppm_reader.rb".freeze, "lib/term/ansicolor/rgb_color_metrics.rb".freeze, "lib/term/ansicolor/rgb_triple.rb".freeze, "lib/term/ansicolor/version.rb".freeze]
|
16
|
+
s.files = [".gitignore".freeze, ".travis.yml".freeze, "CHANGES".freeze, "COPYING".freeze, "Gemfile".freeze, "README.rdoc".freeze, "Rakefile".freeze, "VERSION".freeze, "bin/term_cdiff".freeze, "bin/term_colortab".freeze, "bin/term_decolor".freeze, "bin/term_display".freeze, "bin/term_mandel".freeze, "examples/ColorTest.gif".freeze, "examples/Mona_Lisa.jpg".freeze, "examples/Stilleben.jpg".freeze, "examples/example.rb".freeze, "examples/lambda-red-plain.ppm".freeze, "examples/lambda-red.png".freeze, "examples/lambda-red.ppm".freeze, "examples/pacman.jpg".freeze, "examples/smiley.png".freeze, "examples/wool.jpg".freeze, "lib/term/ansicolor.rb".freeze, "lib/term/ansicolor/.keep".freeze, "lib/term/ansicolor/attribute.rb".freeze, "lib/term/ansicolor/attribute/color256.rb".freeze, "lib/term/ansicolor/attribute/color8.rb".freeze, "lib/term/ansicolor/attribute/intense_color8.rb".freeze, "lib/term/ansicolor/attribute/text.rb".freeze, "lib/term/ansicolor/ppm_reader.rb".freeze, "lib/term/ansicolor/rgb_color_metrics.rb".freeze, "lib/term/ansicolor/rgb_triple.rb".freeze, "lib/term/ansicolor/version.rb".freeze, "term-ansicolor.gemspec".freeze, "tests/ansicolor_test.rb".freeze, "tests/attribute_test.rb".freeze, "tests/ppm_reader_test.rb".freeze, "tests/rgb_color_metrics_test.rb".freeze, "tests/rgb_triple_test.rb".freeze, "tests/test_helper.rb".freeze]
|
17
|
+
s.homepage = "http://flori.github.com/term-ansicolor".freeze
|
18
|
+
s.licenses = ["GPL-2".freeze]
|
19
|
+
s.rdoc_options = ["--title".freeze, "Term-ansicolor - Ruby library that colors strings using ANSI escape sequences".freeze, "--main".freeze, "README.rdoc".freeze]
|
20
|
+
s.required_ruby_version = Gem::Requirement.new(">= 2.0".freeze)
|
21
|
+
s.rubygems_version = "2.6.11".freeze
|
22
|
+
s.summary = "Ruby library that colors strings using ANSI escape sequences".freeze
|
23
|
+
s.test_files = ["tests/ansicolor_test.rb".freeze, "tests/attribute_test.rb".freeze, "tests/ppm_reader_test.rb".freeze, "tests/rgb_color_metrics_test.rb".freeze, "tests/rgb_triple_test.rb".freeze, "tests/test_helper.rb".freeze]
|
24
24
|
|
25
25
|
if s.respond_to? :specification_version then
|
26
26
|
s.specification_version = 4
|
27
27
|
|
28
28
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
29
|
-
s.add_development_dependency(%q<gem_hadar
|
30
|
-
s.add_development_dependency(%q<simplecov
|
31
|
-
s.add_development_dependency(%q<minitest_tu_shim
|
32
|
-
s.add_runtime_dependency(%q<tins
|
29
|
+
s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.9.1"])
|
30
|
+
s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
|
31
|
+
s.add_development_dependency(%q<minitest_tu_shim>.freeze, [">= 0"])
|
32
|
+
s.add_runtime_dependency(%q<tins>.freeze, ["~> 1.0"])
|
33
33
|
else
|
34
|
-
s.add_dependency(%q<gem_hadar
|
35
|
-
s.add_dependency(%q<simplecov
|
36
|
-
s.add_dependency(%q<minitest_tu_shim
|
37
|
-
s.add_dependency(%q<tins
|
34
|
+
s.add_dependency(%q<gem_hadar>.freeze, ["~> 1.9.1"])
|
35
|
+
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
36
|
+
s.add_dependency(%q<minitest_tu_shim>.freeze, [">= 0"])
|
37
|
+
s.add_dependency(%q<tins>.freeze, ["~> 1.0"])
|
38
38
|
end
|
39
39
|
else
|
40
|
-
s.add_dependency(%q<gem_hadar
|
41
|
-
s.add_dependency(%q<simplecov
|
42
|
-
s.add_dependency(%q<minitest_tu_shim
|
43
|
-
s.add_dependency(%q<tins
|
40
|
+
s.add_dependency(%q<gem_hadar>.freeze, ["~> 1.9.1"])
|
41
|
+
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
42
|
+
s.add_dependency(%q<minitest_tu_shim>.freeze, [">= 0"])
|
43
|
+
s.add_dependency(%q<tins>.freeze, ["~> 1.0"])
|
44
44
|
end
|
45
45
|
end
|
data/tests/attribute_test.rb
CHANGED
@@ -39,14 +39,14 @@ class AttributeTest < Test::Unit::TestCase
|
|
39
39
|
def test_nearest_rgb_color
|
40
40
|
assert_equal Attribute.get(:color0).rgb, Attribute.nearest_rgb_color('#000').rgb
|
41
41
|
assert_equal Attribute.get(:color15).rgb, Attribute.nearest_rgb_color('#ffffff').rgb
|
42
|
-
assert_equal :
|
42
|
+
assert_equal :color248, Attribute.nearest_rgb_color('#aaa').name
|
43
43
|
assert_equal :color109, Attribute.nearest_rgb_color('#aaa', :gray => false).name
|
44
44
|
end
|
45
45
|
|
46
46
|
def test_nearest_rgb_on_color
|
47
47
|
assert_equal Attribute.get(:on_color0).rgb, Attribute.nearest_rgb_on_color('#000').rgb
|
48
48
|
assert_equal Attribute.get(:on_color15).rgb, Attribute.nearest_rgb_on_color('#ffffff').rgb
|
49
|
-
assert_equal :
|
49
|
+
assert_equal :on_color248, Attribute.nearest_rgb_on_color('#aaa').name
|
50
50
|
assert_equal :on_color109, Attribute.nearest_rgb_on_color('#aaa', :gray => false).name
|
51
51
|
end
|
52
52
|
|
data/tests/rgb_triple_test.rb
CHANGED
@@ -8,6 +8,7 @@ class RgbTripleTest < Test::Unit::TestCase
|
|
8
8
|
assert_equal '#8000ff', RGBTriple[ rgb ].html
|
9
9
|
assert_equal '#8000ff', RGBTriple[ [ 128, 0, 255 ] ].html
|
10
10
|
assert_equal '#8000ff', RGBTriple[ :red => 128, :green => 0, :blue => 255 ].html
|
11
|
+
assert_equal '#11ddff', RGBTriple[ '#1df' ].html
|
11
12
|
assert_raises ArgumentError do
|
12
13
|
RGBTriple[ nil ]
|
13
14
|
end
|
data/tests/test_helper.rb
CHANGED
@@ -4,10 +4,6 @@ if ENV['START_SIMPLECOV'].to_i == 1
|
|
4
4
|
add_filter "#{File.basename(File.dirname(__FILE__))}/"
|
5
5
|
end
|
6
6
|
end
|
7
|
-
if RUBY_VERSION >= '1.9' && ENV['CODECLIMATE_REPO_TOKEN']
|
8
|
-
require "codeclimate-test-reporter"
|
9
|
-
CodeClimate::TestReporter.start
|
10
|
-
end
|
11
7
|
require 'minitest/unit'
|
12
8
|
require 'test/unit'
|
13
9
|
require 'term/ansicolor'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: term-ansicolor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Frank
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_hadar
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.9.1
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.9.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: simplecov
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
154
|
version: '0'
|
155
155
|
requirements: []
|
156
156
|
rubyforge_project:
|
157
|
-
rubygems_version: 2.
|
157
|
+
rubygems_version: 2.6.11
|
158
158
|
signing_key:
|
159
159
|
specification_version: 4
|
160
160
|
summary: Ruby library that colors strings using ANSI escape sequences
|