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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5099b1eabbfe82fc6b439af1e0cb88bb4e6d7be8
4
- data.tar.gz: 117f27d8658a7b1cc0060c68569b14e596f029f6
3
+ metadata.gz: 9a042afabf731967c78b64fe085f173784f44332
4
+ data.tar.gz: 6fd120153a072fe269e12c15a02fd3b95a2a7312
5
5
  SHA512:
6
- metadata.gz: 4ed73586397d8ebcbb3dbd1fb11a9dcbd4e43884606ef9a246e12e714dd5713fdb3ef702832c8948db95589ccbe816353eb6b4053c88b416c7f2d08ad03bb0a0
7
- data.tar.gz: e3d04d1f82719b58f05b798ebedf6f64335f1d5078cdd060f58e7c6aa98091c9ab99e41facfef6a34a40fb6ddd9f4d4d9ed6d33d11d53601832b520280ef1120
6
+ metadata.gz: ab4ae6ba91654b2ff44cff7060c721af7c64f4a00cad507e9dcad3645ab638ade9646f12698e476b14eeb47688a59aab7661e53182dfbebe877380b501be6b78
7
+ data.tar.gz: 7139367ab4fef2fdc336a74a8424c0fac5e249e109b52d6ae410e1b25bc7466c4df2905d33374ac470fa086e7433417c41d60a57844e159b0711f9f2ed385c7f
@@ -3,12 +3,11 @@ rvm:
3
3
  - 2.1
4
4
  - 2.2
5
5
  - 2.3.1
6
+ - 2.4.1
6
7
  - ruby-head
7
8
  - jruby
8
9
  matrix:
9
10
  allow_failures:
10
11
  - rvm: ruby-head
11
12
  - rvm: jruby
12
- env:
13
- - CODECLIMATE_REPO_TOKEN=ef2c31d6fd3c385eef57dcb62374be51b56af36dd4405763d3e43a1c06330b33
14
13
  sudo: false
data/CHANGES CHANGED
@@ -1,3 +1,4 @@
1
+ 2017-03-24 - 1.4.1 * Correct triple html color support
1
2
  2016-09-27 - 1.4.0 * Extend colorized strings with Term::ANSIColor
2
3
  2015-06-23 - 1.3.2 * Fix release 1.3.1
3
4
  2014-06-17 - 1.3.1 * This release was a bit premature, yanked it.
data/Gemfile CHANGED
@@ -3,5 +3,3 @@
3
3
  source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
-
7
- gem "codeclimate-test-reporter", :group => :test, :require => nil
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.0
1
+ 1.4.1
@@ -83,7 +83,7 @@ module Term
83
83
  result = ''
84
84
  result << "\e[#{attribute.code}m" if Term::ANSIColor.coloring?
85
85
  if block_given?
86
- result << yield
86
+ result << yield.to_s
87
87
  elsif string.respond_to?(:to_str)
88
88
  result << string.to_str
89
89
  elsif respond_to?(:to_str)
@@ -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) << 4) })
23
+ new(*$~.captures.map { |c| convert_value((c + c).to_i(16)) })
24
24
  end
25
25
  end
26
26
 
@@ -1,6 +1,6 @@
1
1
  module Term::ANSIColor
2
2
  # Term::ANSIColor version
3
- VERSION = '1.4.0'
3
+ VERSION = '1.4.1'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
@@ -1,45 +1,45 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: term-ansicolor 1.4.0 ruby lib
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.0"
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 = "2016-09-27"
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.5.1"
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>, ["~> 1.8.0"])
30
- s.add_development_dependency(%q<simplecov>, [">= 0"])
31
- s.add_development_dependency(%q<minitest_tu_shim>, [">= 0"])
32
- s.add_runtime_dependency(%q<tins>, ["~> 1.0"])
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>, ["~> 1.8.0"])
35
- s.add_dependency(%q<simplecov>, [">= 0"])
36
- s.add_dependency(%q<minitest_tu_shim>, [">= 0"])
37
- s.add_dependency(%q<tins>, ["~> 1.0"])
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>, ["~> 1.8.0"])
41
- s.add_dependency(%q<simplecov>, [">= 0"])
42
- s.add_dependency(%q<minitest_tu_shim>, [">= 0"])
43
- s.add_dependency(%q<tins>, ["~> 1.0"])
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
@@ -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 :color247, Attribute.nearest_rgb_color('#aaa').name
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 :on_color247, Attribute.nearest_rgb_on_color('#aaa').name
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
 
@@ -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
@@ -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.0
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: 2016-09-27 00:00:00.000000000 Z
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.8.0
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.8.0
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.5.1
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