Hello community,

here is the log from the commit of package rubygem-term-ansicolor for 
openSUSE:Factory checked in at 2016-10-10 16:22:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-term-ansicolor (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-term-ansicolor.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-term-ansicolor"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/rubygem-term-ansicolor/rubygem-term-ansicolor.changes
    2015-07-28 11:43:37.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-term-ansicolor.new/rubygem-term-ansicolor.changes
       2016-10-10 16:22:59.000000000 +0200
@@ -1,0 +2,8 @@
+Wed Sep 28 04:59:19 UTC 2016 - [email protected]
+
+- updated to version 1.4.0
+ see installed CHANGES
+
+  2016-09-27 - 1.4.0 * Extend colorized strings with Term::ANSIColor
+
+-------------------------------------------------------------------

Old:
----
  term-ansicolor-1.3.2.gem

New:
----
  term-ansicolor-1.4.0.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-term-ansicolor.spec ++++++
--- /var/tmp/diff_new_pack.u8IKEE/_old  2016-10-10 16:23:01.000000000 +0200
+++ /var/tmp/diff_new_pack.u8IKEE/_new  2016-10-10 16:23:01.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-term-ansicolor
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,14 +24,14 @@
 #
 
 Name:           rubygem-term-ansicolor
-Version:        1.3.2
+Version:        1.4.0
 Release:        0
 %define mod_name term-ansicolor
 %define mod_full_name %{mod_name}-%{version}
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+BuildRequires:  %{ruby >= 2.0}
 BuildRequires:  %{rubygem gem2rpm}
 BuildRequires:  %{rubygem rdoc > 3.10}
-BuildRequires:  %{ruby}
 BuildRequires:  ruby-macros >= 5
 BuildRequires:  update-alternatives
 Url:            http://flori.github.com/term-ansicolor

++++++ term-ansicolor-1.3.2.gem -> term-ansicolor-1.4.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.travis.yml new/.travis.yml
--- old/.travis.yml     2015-06-23 12:02:01.000000000 +0200
+++ new/.travis.yml     2016-09-27 12:16:09.000000000 +0200
@@ -2,11 +2,13 @@
   - 2.0
   - 2.1
   - 2.2
+  - 2.3.1
   - ruby-head
-  - rbx-20mode
-  - jruby-head
+  - jruby
 matrix:
   allow_failures:
     - rvm: ruby-head
-    - rvm: jruby-head
-    - rvm: rbx-20mode
+    - rvm: jruby
+env:
+  - 
CODECLIMATE_REPO_TOKEN=ef2c31d6fd3c385eef57dcb62374be51b56af36dd4405763d3e43a1c06330b33
+sudo: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGES new/CHANGES
--- old/CHANGES 2015-06-23 12:02:01.000000000 +0200
+++ new/CHANGES 2016-09-27 12:16:09.000000000 +0200
@@ -1,3 +1,4 @@
+2016-09-27 - 1.4.0 * Extend colorized strings with Term::ANSIColor
 2015-06-23 - 1.3.2 * Fix release 1.3.1
 2014-06-17 - 1.3.1 * This release was a bit premature, yanked it.
 2014-02-06 - 1.3.0 * Support bright and faint color names.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/COPYING new/COPYING
--- old/COPYING 2015-06-23 12:02:01.000000000 +0200
+++ new/COPYING 2016-09-27 12:16:09.000000000 +0200
@@ -1,12 +1,12 @@
-                   GNU GENERAL PUBLIC LICENSE
-                      Version 2, June 1991
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
 
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
-                           Preamble
+                            Preamble
 
   The licenses for most software are designed to take away your
 freedom to share and change it.  By contrast, the GNU General Public
@@ -15,7 +15,7 @@
 General Public License applies to most of the Free Software
 Foundation's software and to any other program whose authors commit to
 using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
+the GNU Lesser General Public License instead.)  You can apply it to
 your programs, too.
 
   When we speak of free software, we are referring to freedom, not
@@ -55,8 +55,8 @@
 
   The precise terms and conditions for copying, distribution and
 modification follow.
-
-                   GNU GENERAL PUBLIC LICENSE
+
+                    GNU GENERAL PUBLIC LICENSE
    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 
   0. This License applies to any program or other work which contains
@@ -110,7 +110,7 @@
     License.  (Exception: if the Program itself is interactive but
     does not normally print such an announcement, your work based on
     the Program is not required to print an announcement.)
-
+
 These requirements apply to the modified work as a whole.  If
 identifiable sections of that work are not derived from the Program,
 and can be reasonably considered independent and separate works in
@@ -168,7 +168,7 @@
 access to copy the source code from the same place counts as
 distribution of the source code, even though third parties are not
 compelled to copy the source along with the object code.
-
+
   4. You may not copy, modify, sublicense, or distribute the Program
 except as expressly provided under this License.  Any attempt
 otherwise to copy, modify, sublicense or distribute the Program is
@@ -225,7 +225,7 @@
 
 This section is intended to make thoroughly clear what is believed to
 be a consequence of the rest of this License.
-
+
   8. If the distribution and/or use of the Program is restricted in
 certain countries either by patents or by copyrighted interfaces, the
 original copyright holder who places the Program under this License
@@ -255,7 +255,7 @@
 of preserving the free status of all derivatives of our free software and
 of promoting the sharing and reuse of software generally.
 
-                           NO WARRANTY
+                            NO WARRANTY
 
   11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
@@ -277,9 +277,9 @@
 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
 POSSIBILITY OF SUCH DAMAGES.
 
-                    END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Programs
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
 
   If you develop a new program, and you want it to be of the greatest
 possible use to the public, the best way to achieve this is to make it
@@ -303,10 +303,9 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.
 
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 Also add information on how to contact you by electronic and paper mail.
 
@@ -336,5 +335,6 @@
 This General Public License does not permit incorporating your program into
 proprietary programs.  If your program is a subroutine library, you may
 consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
+library.  If this is what you want to do, use the GNU Lesser General
 Public License instead of this License.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Gemfile new/Gemfile
--- old/Gemfile 2015-06-23 12:02:01.000000000 +0200
+++ new/Gemfile 2016-09-27 12:16:09.000000000 +0200
@@ -3,3 +3,5 @@
 source 'https://rubygems.org'
 
 gemspec
+
+gem "codeclimate-test-reporter", :group => :test, :require => nil
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Rakefile new/Rakefile
--- old/Rakefile        2015-06-23 12:02:01.000000000 +0200
+++ new/Rakefile        2016-09-27 12:16:09.000000000 +0200
@@ -15,12 +15,14 @@
   test_dir    'tests'
   ignore      '.*.sw[pon]', 'pkg', 'Gemfile.lock', '.rvmrc', 'coverage', 
'tags', '.bundle'
   readme      'README.rdoc'
-  executables << 'cdiff' << 'decolor' << 'colortab' << 'term_mandel' << 
'term_display'
+  executables.merge Dir['bin/*'].map { |x| File.basename(x) }
 
   dependency             'tins', '~>1.0'
   development_dependency 'simplecov'
   development_dependency 'minitest_tu_shim'
 
+  required_ruby_version '>= 2.0'
+
   install_library do
     destdir = "#{ENV['DESTDIR']}"
     libdir = CONFIG["sitelibdir"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/VERSION new/VERSION
--- old/VERSION 2015-06-23 12:02:01.000000000 +0200
+++ new/VERSION 2016-09-27 12:16:09.000000000 +0200
@@ -1 +1 @@
-1.3.2
+1.4.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bin/cdiff new/bin/cdiff
--- old/bin/cdiff       2015-06-23 12:02:01.000000000 +0200
+++ new/bin/cdiff       1970-01-01 01:00:00.000000000 +0100
@@ -1,19 +0,0 @@
-#!/usr/bin/env ruby
-#
-## Little unix filter that colorizes diff output.
-#
-
-require 'term/ansicolor'
-
-include Term::ANSIColor
-
-ARGF.each do |line|
-  STDOUT.print(
-    case line
-    when /^\+/ then green { line }
-    when /^-/ then red { line }
-    when /^(@@|diff)/ then blue { line }
-    else line
-    end
-  )
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bin/colortab new/bin/colortab
--- old/bin/colortab    2015-06-23 12:02:01.000000000 +0200
+++ new/bin/colortab    1970-01-01 01:00:00.000000000 +0100
@@ -1,48 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'term/ansicolor'
-
-class String
-  include Term::ANSIColor
-end
-
-def print_color(c)
-  color = Term::ANSIColor::Attribute[c]
-  text = [
-    Term::ANSIColor::Attribute.nearest_rgb_color('#000'),
-    Term::ANSIColor::Attribute.nearest_rgb_color('#fff'),
-  ].max_by { |t| t.distance_to(color) }
-  print ("%3u #{color.rgb.html} " % c).on_color(color.name).color(text.name)
-end
-
-for c in 0..3
-  print_color c
-end
-puts
-
-for c in 4..7
-  print_color c
-end
-puts
-
-for c in 8..11
-  print_color c
-end
-puts
-
-for c in 12..15
-  print_color c
-end
-puts
-
-for c in 16..231
-  (c - 16) % 6 == 0 and puts
-  print_color c
-end
-puts
-
-for c in 232..255
-  (c - 16) % 6 == 0 and puts
-  print_color c
-end
-puts
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bin/decolor new/bin/decolor
--- old/bin/decolor     2015-06-23 12:02:01.000000000 +0200
+++ new/bin/decolor     1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-#!/usr/bin/env ruby
-#
-## Little unix filter that uncolorizes any input stream.
-#
-
-require 'term/ansicolor'
-
-include Term::ANSIColor
-
-ARGF.each do |line|
-  puts line.uncolored
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bin/term_cdiff new/bin/term_cdiff
--- old/bin/term_cdiff  1970-01-01 01:00:00.000000000 +0100
+++ new/bin/term_cdiff  2016-09-27 12:16:09.000000000 +0200
@@ -0,0 +1,19 @@
+#!/usr/bin/env ruby
+#
+## Little unix filter that colorizes diff output.
+#
+
+require 'term/ansicolor'
+
+include Term::ANSIColor
+
+ARGF.each do |line|
+  STDOUT.print(
+    case line
+    when /^\+/ then green { line }
+    when /^-/ then red { line }
+    when /^(@@|diff)/ then blue { line }
+    else line
+    end
+  )
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bin/term_colortab new/bin/term_colortab
--- old/bin/term_colortab       1970-01-01 01:00:00.000000000 +0100
+++ new/bin/term_colortab       2016-09-27 12:16:09.000000000 +0200
@@ -0,0 +1,48 @@
+#!/usr/bin/env ruby
+
+require 'term/ansicolor'
+
+class String
+  include Term::ANSIColor
+end
+
+def print_color(c)
+  color = Term::ANSIColor::Attribute[c]
+  text = [
+    Term::ANSIColor::Attribute.nearest_rgb_color('#000'),
+    Term::ANSIColor::Attribute.nearest_rgb_color('#fff'),
+  ].max_by { |t| t.distance_to(color) }
+  print ("%3u #{color.rgb.html} " % c).on_color(color.name).color(text.name)
+end
+
+for c in 0..3
+  print_color c
+end
+puts
+
+for c in 4..7
+  print_color c
+end
+puts
+
+for c in 8..11
+  print_color c
+end
+puts
+
+for c in 12..15
+  print_color c
+end
+puts
+
+for c in 16..231
+  (c - 16) % 6 == 0 and puts
+  print_color c
+end
+puts
+
+for c in 232..255
+  (c - 16) % 6 == 0 and puts
+  print_color c
+end
+puts
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bin/term_decolor new/bin/term_decolor
--- old/bin/term_decolor        1970-01-01 01:00:00.000000000 +0100
+++ new/bin/term_decolor        2016-09-27 12:16:09.000000000 +0200
@@ -0,0 +1,12 @@
+#!/usr/bin/env ruby
+#
+## Little unix filter that uncolorizes any input stream.
+#
+
+require 'term/ansicolor'
+
+include Term::ANSIColor
+
+ARGF.each do |line|
+  puts line.uncolored
+end
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/examples/example.rb new/examples/example.rb
--- old/examples/example.rb     2015-06-23 12:02:01.000000000 +0200
+++ new/examples/example.rb     2016-09-27 12:16:09.000000000 +0200
@@ -1,11 +1,11 @@
+#!/usr/bin/env ruby
+#
 require 'term/ansicolor'
 
 # Use this trick to work around namespace cluttering that
 # happens if you just include Term::ANSIColor:
 
-class Color
-  extend Term::ANSIColor
-end
+Color = Object.new.extend Term::ANSIColor
 
 print Color.red, Color.bold, "No Namespace cluttering:", Color.clear, "\n"
 print Color.green + "green" + Color.clear, "\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/term/ansicolor/attribute/color256.rb 
new/lib/term/ansicolor/attribute/color256.rb
--- old/lib/term/ansicolor/attribute/color256.rb        1970-01-01 
01:00:00.000000000 +0100
+++ new/lib/term/ansicolor/attribute/color256.rb        2016-09-27 
12:16:09.000000000 +0200
@@ -0,0 +1,69 @@
+module Term
+  module ANSIColor
+    class Attribute
+      class Color256
+        Attribute.set :color0, 0, :html => '#000000'
+        Attribute.set :color1, 1, :html => '#800000'
+        Attribute.set :color2, 2, :html => '#808000'
+        Attribute.set :color3, 3, :html => '#808000'
+        Attribute.set :color4, 4, :html => '#000080'
+        Attribute.set :color5, 5, :html => '#800080'
+        Attribute.set :color6, 6, :html => '#008080'
+        Attribute.set :color7, 7, :html => '#c0c0c0'
+
+        Attribute.set :color8, 8, :html => '#808080'
+        Attribute.set :color9, 9, :html => '#ff0000'
+        Attribute.set :color10, 10, :html => '#00ff00'
+        Attribute.set :color11, 11, :html => '#ffff00'
+        Attribute.set :color12, 12, :html => '#0000ff'
+        Attribute.set :color13, 13, :html => '#ff00ff'
+        Attribute.set :color14, 14, :html => '#00ffff'
+        Attribute.set :color15, 15, :html => '#ffffff'
+
+        steps = [ 0x00, 0x5f, 0x87, 0xaf, 0xd7, 0xff ]
+
+        for i in 16..231
+          red, green, blue = (i - 16).to_s(6).rjust(3, '0').each_char.map { 
|c| steps[c.to_i] }
+          Attribute.set "color#{i}", i, :red => red, :green => green, :blue => 
blue
+        end
+
+        grey = 8
+        for i in 232..255
+          Attribute.set "color#{i}", i, :red => grey, :green => grey, :blue => 
grey
+          grey += 10
+        end
+
+        Attribute.set :on_color0, 0, :html => '#000000'
+        Attribute.set :on_color1, 1, :html => '#800000'
+        Attribute.set :on_color2, 2, :html => '#808000'
+        Attribute.set :on_color3, 3, :html => '#808000'
+        Attribute.set :on_color4, 4, :html => '#000080'
+        Attribute.set :on_color5, 5, :html => '#800080'
+        Attribute.set :on_color6, 6, :html => '#008080'
+        Attribute.set :on_color7, 7, :html => '#c0c0c0'
+
+        Attribute.set :on_color8, 8, :html => '#808080'
+        Attribute.set :on_color9, 9, :html => '#ff0000'
+        Attribute.set :on_color10, 10, :html => '#00ff00'
+        Attribute.set :on_color11, 11, :html => '#ffff00'
+        Attribute.set :on_color12, 12, :html => '#0000ff'
+        Attribute.set :on_color13, 13, :html => '#ff00ff'
+        Attribute.set :on_color14, 14, :html => '#00ffff'
+        Attribute.set :on_color15, 15, :html => '#ffffff'
+
+        steps = [ 0x00, 0x5f, 0x87, 0xaf, 0xd7, 0xff ]
+
+        for i in 16..231
+          red, green, blue = (i - 16).to_s(6).rjust(3, '0').each_char.map { 
|c| steps[c.to_i] }
+          Attribute.set "on_color#{i}", i, :red => red, :green => green, :blue 
=> blue
+        end
+
+        grey = 8
+        for i in 232..255
+          Attribute.set "on_color#{i}", i, :red => grey, :green => grey, :blue 
=> grey
+          grey += 10
+        end
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/term/ansicolor/attribute/color8.rb 
new/lib/term/ansicolor/attribute/color8.rb
--- old/lib/term/ansicolor/attribute/color8.rb  1970-01-01 01:00:00.000000000 
+0100
+++ new/lib/term/ansicolor/attribute/color8.rb  2016-09-27 12:16:09.000000000 
+0200
@@ -0,0 +1,25 @@
+module Term
+  module ANSIColor
+    class Attribute
+      class Color8
+        Attribute.set :black,   30
+        Attribute.set :red,     31
+        Attribute.set :green,   32
+        Attribute.set :yellow,  33
+        Attribute.set :blue,    34
+        Attribute.set :magenta, 35
+        Attribute.set :cyan,    36
+        Attribute.set :white,   37
+
+        Attribute.set :on_black,   40
+        Attribute.set :on_red,     41
+        Attribute.set :on_green,   42
+        Attribute.set :on_yellow,  43
+        Attribute.set :on_blue,    44
+        Attribute.set :on_magenta, 45
+        Attribute.set :on_cyan,    46
+        Attribute.set :on_white,   47
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/term/ansicolor/attribute/intense_color8.rb 
new/lib/term/ansicolor/attribute/intense_color8.rb
--- old/lib/term/ansicolor/attribute/intense_color8.rb  1970-01-01 
01:00:00.000000000 +0100
+++ new/lib/term/ansicolor/attribute/intense_color8.rb  2016-09-27 
12:16:09.000000000 +0200
@@ -0,0 +1,43 @@
+module Term
+  module ANSIColor
+    class Attribute
+      class IntenseColor8
+        # High intensity, aixterm (works in OS X)
+        Attribute.set :intense_black,   90
+        Attribute.set :bright_black,    90
+        Attribute.set :intense_red,     91
+        Attribute.set :bright_red,      91
+        Attribute.set :intense_green,   92
+        Attribute.set :bright_green,    92
+        Attribute.set :intense_yellow,  93
+        Attribute.set :bright_yellow,   93
+        Attribute.set :intense_blue,    94
+        Attribute.set :bright_blue,     94
+        Attribute.set :intense_magenta, 95
+        Attribute.set :bright_magenta,  95
+        Attribute.set :intense_cyan,    96
+        Attribute.set :bright_cyan,     96
+        Attribute.set :intense_white,   97
+        Attribute.set :bright_white,    97
+
+        # High intensity background,  aixterm (works in OS X)
+        Attribute.set :on_intense_black,   100
+        Attribute.set :on_bright_black,    100
+        Attribute.set :on_intense_red,     101
+        Attribute.set :on_bright_red,      101
+        Attribute.set :on_intense_green,   102
+        Attribute.set :on_bright_green,    102
+        Attribute.set :on_intense_yellow,  103
+        Attribute.set :on_bright_yellow,   103
+        Attribute.set :on_intense_blue,    104
+        Attribute.set :on_bright_blue,     104
+        Attribute.set :on_intense_magenta, 105
+        Attribute.set :on_bright_magenta,  105
+        Attribute.set :on_intense_cyan,    106
+        Attribute.set :on_bright_cyan,     106
+        Attribute.set :on_intense_white,   107
+        Attribute.set :on_bright_white,    107
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/term/ansicolor/attribute/text.rb 
new/lib/term/ansicolor/attribute/text.rb
--- old/lib/term/ansicolor/attribute/text.rb    1970-01-01 01:00:00.000000000 
+0100
+++ new/lib/term/ansicolor/attribute/text.rb    2016-09-27 12:16:09.000000000 
+0200
@@ -0,0 +1,21 @@
+module Term
+  module ANSIColor
+    class Attribute
+      class Text
+        Attribute.set :clear,         0 # String#clear is already used to 
empty string in Ruby 1.9
+        Attribute.set :reset,         0 # synonym for :clear
+        Attribute.set :bold,          1
+        Attribute.set :dark,          2
+        Attribute.set :faint,         2
+        Attribute.set :italic,        3 # not widely implemented
+        Attribute.set :underline,     4
+        Attribute.set :underscore,    4 # synonym for :underline
+        Attribute.set :blink,         5
+        Attribute.set :rapid_blink,   6 # not widely implemented
+        Attribute.set :negative,      7 # no reverse because of String#reverse
+        Attribute.set :concealed,     8
+        Attribute.set :strikethrough, 9 # not widely implemented
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/term/ansicolor/attribute.rb 
new/lib/term/ansicolor/attribute.rb
--- old/lib/term/ansicolor/attribute.rb 2015-06-23 12:02:01.000000000 +0200
+++ new/lib/term/ansicolor/attribute.rb 2016-09-27 12:16:09.000000000 +0200
@@ -45,8 +45,12 @@
         @__store__[name.to_sym]
       end
 
-      def self.rgb_colors(&block)
-        @rgb_colors ||= attributes.select(&:rgb_color?).each(&block)
+      def self.rgb_colors(options = {}, &block)
+        colors = @rgb_colors ||= attributes.select(&:rgb_color?)
+        if options.key?(:gray) && !options[:gray]
+          colors = colors.reject(&:gray?)
+        end
+        colors.each(&block)
       end
 
       def self.named_attributes(&block)
@@ -55,19 +59,13 @@
 
       def self.nearest_rgb_color(color, options = {})
         rgb = RGBTriple[color]
-        colors = rgb_colors
-        if options.key?(:gray) && !options[:gray]
-          colors = colors.reject(&:gray?)
-        end
+        colors = rgb_colors(options)
         colors.reject(&:background?).min_by { |c| c.distance_to(rgb, options) }
       end
 
       def self.nearest_rgb_on_color(color, options = {})
         rgb = RGBTriple[color]
-        colors = rgb_colors
-        if options.key?(:gray) && !options[:gray]
-          colors = colors.reject(&:gray?)
-        end
+        colors = rgb_colors(options)
         colors.select(&:background?).min_by { |c| c.distance_to(rgb, options) }
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/term/ansicolor/version.rb 
new/lib/term/ansicolor/version.rb
--- old/lib/term/ansicolor/version.rb   2015-06-23 12:02:01.000000000 +0200
+++ new/lib/term/ansicolor/version.rb   2016-09-27 12:16:09.000000000 +0200
@@ -1,6 +1,6 @@
 module Term::ANSIColor
   # Term::ANSIColor version
-  VERSION         = '1.3.2'
+  VERSION         = '1.4.0'
   VERSION_ARRAY   = VERSION.split('.').map(&:to_i) # :nodoc:
   VERSION_MAJOR   = VERSION_ARRAY[0] # :nodoc:
   VERSION_MINOR   = VERSION_ARRAY[1] # :nodoc:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/term/ansicolor.rb new/lib/term/ansicolor.rb
--- old/lib/term/ansicolor.rb   2015-06-23 12:02:01.000000000 +0200
+++ new/lib/term/ansicolor.rb   2016-09-27 12:16:09.000000000 +0200
@@ -7,136 +7,10 @@
     require 'term/ansicolor/attribute'
     require 'term/ansicolor/rgb_triple'
     require 'term/ansicolor/ppm_reader'
-
-    Attribute.set :clear             ,   0 # String#clear is already used to 
empty string in Ruby 1.9
-    Attribute.set :reset             ,   0 # synonym for :clear
-    Attribute.set :bold              ,   1
-    Attribute.set :dark              ,   2
-    Attribute.set :faint             ,   2
-    Attribute.set :italic            ,   3 # not widely implemented
-    Attribute.set :underline         ,   4
-    Attribute.set :underscore        ,   4 # synonym for :underline
-    Attribute.set :blink             ,   5
-    Attribute.set :rapid_blink       ,   6 # not widely implemented
-    Attribute.set :negative          ,   7 # no reverse because of 
String#reverse
-    Attribute.set :concealed         ,   8
-    Attribute.set :strikethrough     ,   9 # not widely implemented
-
-    Attribute.set :black             ,  30
-    Attribute.set :red               ,  31
-    Attribute.set :green             ,  32
-    Attribute.set :yellow            ,  33
-    Attribute.set :blue              ,  34
-    Attribute.set :magenta           ,  35
-    Attribute.set :cyan              ,  36
-    Attribute.set :white             ,  37
-
-    Attribute.set :on_black          ,  40
-    Attribute.set :on_red            ,  41
-    Attribute.set :on_green          ,  42
-    Attribute.set :on_yellow         ,  43
-    Attribute.set :on_blue           ,  44
-    Attribute.set :on_magenta        ,  45
-    Attribute.set :on_cyan           ,  46
-    Attribute.set :on_white          ,  47
-
-    # High intensity, aixterm (works in OS X)
-    Attribute.set :intense_black     ,  90
-    Attribute.set :bright_black      ,  90
-    Attribute.set :intense_red       ,  91
-    Attribute.set :bright_red        ,  91
-    Attribute.set :intense_green     ,  92
-    Attribute.set :bright_green      ,  92
-    Attribute.set :intense_yellow    ,  93
-    Attribute.set :bright_yellow     ,  93
-    Attribute.set :intense_blue      ,  94
-    Attribute.set :bright_blue       ,  94
-    Attribute.set :intense_magenta   ,  95
-    Attribute.set :bright_magenta    ,  95
-    Attribute.set :intense_cyan      ,  96
-    Attribute.set :bright_cyan       ,  96
-    Attribute.set :intense_white     ,  97
-    Attribute.set :bright_white      ,  97
-
-    # High intensity background, aixterm (works in OS X)
-    Attribute.set :on_intense_black  , 100
-    Attribute.set :on_bright_black   , 100
-    Attribute.set :on_intense_red    , 101
-    Attribute.set :on_bright_red     , 101
-    Attribute.set :on_intense_green  , 102
-    Attribute.set :on_bright_green   , 102
-    Attribute.set :on_intense_yellow , 103
-    Attribute.set :on_bright_yellow  , 103
-    Attribute.set :on_intense_blue   , 104
-    Attribute.set :on_bright_blue    , 104
-    Attribute.set :on_intense_magenta, 105
-    Attribute.set :on_bright_magenta , 105
-    Attribute.set :on_intense_cyan   , 106
-    Attribute.set :on_bright_cyan    , 106
-    Attribute.set :on_intense_white  , 107
-    Attribute.set :on_bright_white   , 107
-
-    Attribute.set :color0, 0, :html => '#000000'
-    Attribute.set :color1, 1, :html => '#800000'
-    Attribute.set :color2, 2, :html => '#808000'
-    Attribute.set :color3, 3, :html => '#808000'
-    Attribute.set :color4, 4, :html => '#000080'
-    Attribute.set :color5, 5, :html => '#800080'
-    Attribute.set :color6, 6, :html => '#008080'
-    Attribute.set :color7, 7, :html => '#c0c0c0'
-
-    Attribute.set :color8, 8, :html => '#808080'
-    Attribute.set :color9, 9, :html => '#ff0000'
-    Attribute.set :color10, 10, :html => '#00ff00'
-    Attribute.set :color11, 11, :html => '#ffff00'
-    Attribute.set :color12, 12, :html => '#0000ff'
-    Attribute.set :color13, 13, :html => '#ff00ff'
-    Attribute.set :color14, 14, :html => '#00ffff'
-    Attribute.set :color15, 15, :html => '#ffffff'
-
-    steps = [ 0x00, 0x5f, 0x87, 0xaf, 0xd7, 0xff ]
-
-    for i in 16..231
-      red, green, blue = (i - 16).to_s(6).rjust(3, '0').each_char.map { |c| 
steps[c.to_i] }
-      Attribute.set "color#{i}", i, :red => red, :green => green, :blue => blue
-    end
-
-    grey = 8
-    for i in 232..255
-      Attribute.set "color#{i}", i, :red => grey, :green => grey, :blue => grey
-      grey += 10
-    end
-
-    Attribute.set :on_color0, 0, :html => '#000000'
-    Attribute.set :on_color1, 1, :html => '#800000'
-    Attribute.set :on_color2, 2, :html => '#808000'
-    Attribute.set :on_color3, 3, :html => '#808000'
-    Attribute.set :on_color4, 4, :html => '#000080'
-    Attribute.set :on_color5, 5, :html => '#800080'
-    Attribute.set :on_color6, 6, :html => '#008080'
-    Attribute.set :on_color7, 7, :html => '#c0c0c0'
-
-    Attribute.set :on_color8, 8, :html => '#808080'
-    Attribute.set :on_color9, 9, :html => '#ff0000'
-    Attribute.set :on_color10, 10, :html => '#00ff00'
-    Attribute.set :on_color11, 11, :html => '#ffff00'
-    Attribute.set :on_color12, 12, :html => '#0000ff'
-    Attribute.set :on_color13, 13, :html => '#ff00ff'
-    Attribute.set :on_color14, 14, :html => '#00ffff'
-    Attribute.set :on_color15, 15, :html => '#ffffff'
-
-    steps = [ 0x00, 0x5f, 0x87, 0xaf, 0xd7, 0xff ]
-
-    for i in 16..231
-      red, green, blue = (i - 16).to_s(6).rjust(3, '0').each_char.map { |c| 
steps[c.to_i] }
-      Attribute.set "on_color#{i}", i, :red => red, :green => green, :blue => 
blue
-    end
-
-    grey = 8
-    for i in 232..255
-      Attribute.set "on_color#{i}", i, :red => grey, :green => grey, :blue => 
grey
-      grey += 10
-    end
+    require 'term/ansicolor/attribute/text'
+    require 'term/ansicolor/attribute/color8'
+    require 'term/ansicolor/attribute/intense_color8'
+    require 'term/ansicolor/attribute/color256'
 
     # :stopdoc:
     ATTRIBUTE_NAMES = Attribute.named_attributes.map(&:name)
@@ -196,7 +70,7 @@
         to_str.gsub(COLORED_REGEXP, '')
       else
         ''
-      end
+      end.extend(Term::ANSIColor)
     end
 
     alias uncolored uncolor
@@ -218,7 +92,7 @@
         return result #only switch on
       end
       result << "\e[0m" if Term::ANSIColor.coloring?
-      result
+      result.extend(Term::ANSIColor)
     end
 
     def on_color(name, string = nil, &block)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2015-06-23 12:02:01.000000000 +0200
+++ new/metadata        2016-09-27 12:16:09.000000000 +0200
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: term-ansicolor
 version: !ruby/object:Gem::Version
-  version: 1.3.2
+  version: 1.4.0
 platform: ruby
 authors:
 - Florian Frank
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2015-06-23 00:00:00.000000000 Z
+date: 2016-09-27 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: gem_hadar
@@ -16,14 +16,14 @@
     requirements:
     - - "~>"
       - !ruby/object:Gem::Version
-        version: 1.3.1
+        version: 1.8.0
   type: :development
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
     - - "~>"
       - !ruby/object:Gem::Version
-        version: 1.3.1
+        version: 1.8.0
 - !ruby/object:Gem::Dependency
   name: simplecov
   requirement: !ruby/object:Gem::Requirement
@@ -70,16 +70,20 @@
   terminal output
 email: [email protected]
 executables:
-- cdiff
-- decolor
-- colortab
-- term_mandel
+- term_cdiff
+- term_colortab
+- term_decolor
 - term_display
+- term_mandel
 extensions: []
 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
@@ -93,9 +97,9 @@
 - README.rdoc
 - Rakefile
 - VERSION
-- bin/cdiff
-- bin/colortab
-- bin/decolor
+- bin/term_cdiff
+- bin/term_colortab
+- bin/term_decolor
 - bin/term_display
 - bin/term_mandel
 - examples/ColorTest.gif
@@ -111,6 +115,10 @@
 - 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
@@ -138,7 +146,7 @@
   requirements:
   - - ">="
     - !ruby/object:Gem::Version
-      version: '0'
+      version: '2.0'
 required_rubygems_version: !ruby/object:Gem::Requirement
   requirements:
   - - ">="
@@ -146,7 +154,7 @@
       version: '0'
 requirements: []
 rubyforge_project: 
-rubygems_version: 2.4.6
+rubygems_version: 2.5.1
 signing_key: 
 specification_version: 4
 summary: Ruby library that colors strings using ANSI escape sequences
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/term-ansicolor.gemspec new/term-ansicolor.gemspec
--- old/term-ansicolor.gemspec  2015-06-23 12:02:01.000000000 +0200
+++ new/term-ansicolor.gemspec  2016-09-27 12:16:09.000000000 +0200
@@ -1,23 +1,24 @@
 # -*- encoding: utf-8 -*-
-# stub: term-ansicolor 1.3.2 ruby lib
+# stub: term-ansicolor 1.4.0 ruby lib
 
 Gem::Specification.new do |s|
   s.name = "term-ansicolor"
-  s.version = "1.3.2"
+  s.version = "1.4.0"
 
   s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? 
:required_rubygems_version=
   s.require_paths = ["lib"]
   s.authors = ["Florian Frank"]
-  s.date = "2015-06-23"
+  s.date = "2016-09-27"
   s.description = "This library uses ANSI escape sequences to control the 
attributes of terminal output"
   s.email = "[email protected]"
-  s.executables = ["cdiff", "decolor", "colortab", "term_mandel", 
"term_display"]
-  s.extra_rdoc_files = ["README.rdoc", "lib/term/ansicolor.rb", 
"lib/term/ansicolor/attribute.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"]
-  s.files = [".gitignore", ".travis.yml", "CHANGES", "COPYING", "Gemfile", 
"README.rdoc", "Rakefile", "VERSION", "bin/cdiff", "bin/colortab", 
"bin/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/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"]
+  s.executables = ["term_cdiff", "term_colortab", "term_decolor", 
"term_display", "term_mandel"]
+  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"]
+  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"]
   s.homepage = "http://flori.github.com/term-ansicolor";
   s.licenses = ["GPL-2"]
   s.rdoc_options = ["--title", "Term-ansicolor - Ruby library that colors 
strings using ANSI escape sequences", "--main", "README.rdoc"]
-  s.rubygems_version = "2.4.6"
+  s.required_ruby_version = Gem::Requirement.new(">= 2.0")
+  s.rubygems_version = "2.5.1"
   s.summary = "Ruby library that colors strings using ANSI escape sequences"
   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"]
 
@@ -25,18 +26,18 @@
     s.specification_version = 4
 
     if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
-      s.add_development_dependency(%q<gem_hadar>, ["~> 1.3.1"])
+      s.add_development_dependency(%q<gem_hadar>, ["~> 1.8.0"])
       s.add_development_dependency(%q<simplecov>, [">= 0"])
       s.add_development_dependency(%q<minitest_tu_shim>, [">= 0"])
       s.add_runtime_dependency(%q<tins>, ["~> 1.0"])
     else
-      s.add_dependency(%q<gem_hadar>, ["~> 1.3.1"])
+      s.add_dependency(%q<gem_hadar>, ["~> 1.8.0"])
       s.add_dependency(%q<simplecov>, [">= 0"])
       s.add_dependency(%q<minitest_tu_shim>, [">= 0"])
       s.add_dependency(%q<tins>, ["~> 1.0"])
     end
   else
-    s.add_dependency(%q<gem_hadar>, ["~> 1.3.1"])
+    s.add_dependency(%q<gem_hadar>, ["~> 1.8.0"])
     s.add_dependency(%q<simplecov>, [">= 0"])
     s.add_dependency(%q<minitest_tu_shim>, [">= 0"])
     s.add_dependency(%q<tins>, ["~> 1.0"])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tests/ansicolor_test.rb new/tests/ansicolor_test.rb
--- old/tests/ansicolor_test.rb 2015-06-23 12:02:01.000000000 +0200
+++ new/tests/ansicolor_test.rb 2016-09-27 12:16:09.000000000 +0200
@@ -1,5 +1,7 @@
 require 'test_helper'
 
+OldString = String.dup
+
 class String
   include Term::ANSIColor
 end
@@ -130,4 +132,11 @@
     assert string.frozen?
     assert_equal red, string.red
   end
+
+  def test_extending
+    string = OldString.new('new')
+    assert_equal false, Term::ANSIColor === string
+    string = Color.red(string)
+    assert_kind_of Term::ANSIColor, 'new'
+  end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tests/test_helper.rb new/tests/test_helper.rb
--- old/tests/test_helper.rb    2015-06-23 12:02:01.000000000 +0200
+++ new/tests/test_helper.rb    2016-09-27 12:16:09.000000000 +0200
@@ -4,5 +4,10 @@
     add_filter "#{File.basename(File.dirname(__FILE__))}/"
   end
 end
+if RUBY_VERSION >= '1.9' && ENV['CODECLIMATE_REPO_TOKEN']
+  require "codeclimate-test-reporter"
+  CodeClimate::TestReporter.start
+end
+require 'minitest/unit'
 require 'test/unit'
 require 'term/ansicolor'


Reply via email to