Hello community, here is the log from the commit of package rubygem-lolcat for openSUSE:Factory checked in at 2018-10-17 08:41:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-lolcat (Old) and /work/SRC/openSUSE:Factory/.rubygem-lolcat.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-lolcat" Wed Oct 17 08:41:30 2018 rev:4 rq:642181 version:99.9.19 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-lolcat/rubygem-lolcat.changes 2017-08-16 16:12:28.731783339 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-lolcat.new/rubygem-lolcat.changes 2018-10-17 08:42:36.821794068 +0200 @@ -1,0 +2,23 @@ +Wed Sep 5 10:26:28 UTC 2018 - [email protected] + +- updated to version 99.9.19 + no changelog found + +------------------------------------------------------------------- +Thu Apr 19 00:13:11 UTC 2018 - [email protected] + +- updated to version 99.9.11 + no changelog found + +------------------------------------------------------------------- +Mon Apr 16 09:39:17 UTC 2018 - [email protected] + +- remove .gitignore from install tree + +------------------------------------------------------------------- +Mon Apr 9 04:30:00 UTC 2018 - [email protected] + +- updated to version 99.9.10 + no changelog found + +------------------------------------------------------------------- Old: ---- lolcat-90.8.8.gem New: ---- lolcat-99.9.19.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-lolcat.spec ++++++ --- /var/tmp/diff_new_pack.0iQg6N/_old 2018-10-17 08:42:37.185793759 +0200 +++ /var/tmp/diff_new_pack.0iQg6N/_new 2018-10-17 08:42:37.189793756 +0200 @@ -1,7 +1,7 @@ # # spec file for package rubygem-lolcat # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 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,7 +24,7 @@ # Name: rubygem-lolcat -Version: 90.8.8 +Version: 99.9.19 Release: 0 %define mod_name lolcat %define mod_full_name %{mod_name}-%{version} @@ -34,7 +34,7 @@ BuildRequires: ruby-macros >= 5 BuildRequires: update-alternatives Url: https://github.com/busyloop/lolcat -Source: http://rubygems.org/gems/%{mod_full_name}.gem +Source: https://rubygems.org/gems/%{mod_full_name}.gem Source1: gem2rpm.yml Summary: Add the colors of the rainbow to your terminal a.k.a. Rainbows and Unicorns! License: BSD-3-Clause ++++++ lolcat-90.8.8.gem -> lolcat-99.9.19.gem ++++++ Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/lolcat/cat.rb new/lib/lolcat/cat.rb --- old/lib/lolcat/cat.rb 2017-07-14 19:52:21.000000000 +0200 +++ new/lib/lolcat/cat.rb 2018-08-30 16:59:41.000000000 +0200 @@ -82,7 +82,7 @@ :spread => 8.0, :freq => 0.3 } - Lol.cat buf.read.split(/(?<=\n)/), opts + Lol.cat buf, opts puts buf.close exit 1 @@ -112,9 +112,7 @@ $stdout.write(line) end else - until fd.eof? do - $stdout.write(fd.read(8192)) - end + IO.copy_stream(fd, $stdout) end end rescue Errno::ENOENT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/lolcat/lol.rb new/lib/lolcat/lol.rb --- old/lib/lolcat/lol.rb 2017-07-14 19:52:21.000000000 +0200 +++ new/lib/lolcat/lol.rb 2018-08-30 16:59:41.000000000 +0200 @@ -27,7 +27,9 @@ require 'paint' module Lol - STRIP_ANSI = Regexp.compile '\e\[[\d;]*[m|K]', nil + ANSI_ESCAPE = /((?:\e(?:[ -\/]+.|[\]PX^_][^\a\e]*|\[[0-?]*.|.))*)(.?)/m + INCOMPLETE_ESCAPE = /\e(?:[ -\/]*|[\]PX^_][^\a\e]*|\[[0-?]*)$/ + @paint_detected_mode = Paint.detect_mode def self.rainbow(freq, i) @@ -39,18 +41,32 @@ def self.cat(fd, opts={}) print "\e[?25l" if opts[:animate] - fd.each do |line| - opts[:os] += 1 - println(line, opts) + while true do + buf = '' + begin + begin + buf += fd.sysread(4096) + invalid_encoding = !buf.dup.force_encoding(fd.external_encoding).valid_encoding? + end while invalid_encoding or buf.match(INCOMPLETE_ESCAPE) + rescue EOFError + break + end + buf.force_encoding(fd.external_encoding) + buf.lines.each do |line| + opts[:os] += 1 + println(line, opts) + end end ensure - print "\e[?25h" if opts[:animate] + if STDOUT.tty? then + print "\e[m\e[?25h\e[?1;5;2004l" + system("stty sane -istrip <&1"); + end end def self.println(str, defaults={}, opts={}) opts.merge!(defaults) - chomped = str.chomp! - str.gsub! STRIP_ANSI, '' if !str.nil? and ($stdout.tty? or opts[:force]) + chomped = str.sub!(/\n$/, "") str.gsub! "\t", " " opts[:animate] ? println_ani(str, opts) : println_plain(str, opts) puts if chomped @@ -61,18 +77,24 @@ def self.println_plain(str, defaults={}, opts={}) opts.merge!(defaults) set_mode(opts[:truecolor]) - str.chomp.chars.each_with_index do |c,i| - code = rainbow(opts[:freq], opts[:os]+i/opts[:spread]) - print Paint[c, *[ (:black if opts[:invert]), code ].compact ] + str.scan(ANSI_ESCAPE).each_with_index do |c,i| + color = rainbow(opts[:freq], opts[:os]+i/opts[:spread]) + if opts[:invert] then + print c[0], Paint.color(nil, color), c[1], "\e[49m" + else + print c[0], Paint.color(color), c[1], "\e[39m" + end end end def self.println_ani(str, opts={}) return if str.empty? + print "\e7" (1..opts[:duration]).each do |i| - print "\e[#{str.length}D" + print "\e8" opts[:os] += opts[:spread] println_plain(str, opts) + str.gsub!(/\e\[[0-?]*[@JKPX]/, "") sleep 1.0/opts[:speed] end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/lolcat/version.rb new/lib/lolcat/version.rb --- old/lib/lolcat/version.rb 2017-07-14 19:52:21.000000000 +0200 +++ new/lib/lolcat/version.rb 2018-08-30 16:59:41.000000000 +0200 @@ -1,3 +1,3 @@ module Lolcat - VERSION = "90.8.8" + VERSION = "99.9.19" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lolcat.gemspec new/lolcat.gemspec --- old/lolcat.gemspec 2017-07-14 19:52:21.000000000 +0200 +++ new/lolcat.gemspec 2018-08-30 16:59:41.000000000 +0200 @@ -13,7 +13,8 @@ s.add_development_dependency "rake" s.add_dependency "paint", "~> 2.0.0" - s.add_dependency "trollop", "~> 2.1.2" + s.add_dependency "trollop", "= 2.1.3" + s.add_dependency "manpages", "~> 0.6.1" s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/man/lolcat.6 new/man/lolcat.6 --- old/man/lolcat.6 1970-01-01 01:00:00.000000000 +0100 +++ new/man/lolcat.6 2018-08-30 16:59:41.000000000 +0200 @@ -0,0 +1,100 @@ +.TH LOLCAT 6 "June 11, 2017" +.\" Please adjust this date whenever revising the manpage. +.SH NAME +lolcat \- rainbow coloring effect for text console display + +.SH SYNOPSIS +.B lolcat +.RI [ options ] " " [ files ] " " ... + +.SH DESCRIPTION +This manual page documents briefly the +.B lolcat +command. +.PP +\fBlolcat\fP is a program that concatenates files, or standard input, to +standard output (like the generic \fBcat\fP), and adds rainbow coloring to it. + +.SH OPTIONS + +.TP +\fB\-p\fP \fIX\fP, \fB\-\-spread=\fIX\fP +Inclination of the rainbow stripes +.br +(character widths per line hight; high values (>1000) give almost horizonal stripes, low values (0.1) almost vertical ones; default: 3.0). +.TP +\fB\-F\fP \fIX\fP, \fB\-\-freq=\fIX\fP +Frequency of the rainbow effect. +.br +(low values around 0.0001 give almost monochromous screens; default: 0.1). +.TP +\fB\-S\fP \fIX\fP, \fB\-\-seed=\fIX\fP +Initial value for the random number generator; 0 means automatic. +.br +(default: 0). +.TP +\fB\-a\fP, \fB\-\-animate\fP +Fade every line through an animation before printing the next one. +.TP +\fB\-d\fP \fIX\fP, \fB\-\-duration=\fIX\fP +Duration of the animation. +.br +(number of steps before showing next line; default: 12) +.TP +\fB\-s\fP \fIX\fP, \fB\-\-speed=\fIX\fP +Speed of the animation. +.br +(frame rate, ie. number of steps per second; default: 20) +.TP +\fB\-i\fP, \fB\-\-invert\fP +Inverts the background and foreground colors. +.TP +\fB\-t\fP, \fB\-\-truecolor\fP +Enables 24-bit truecolor mode. +.TP +\fB\-f\fP, \fB\-\-force\fP +Force color even when stdout is not a tty. +.TP +.B \-v, \-\-version +Shows lolcat version. +.TP +.B \-h, \-\-help +Shows options summary. + +.SH EXAMPLES + +Typical combinations of \fBlolcat\fP include other programs that generate text: +.br +.br +Large colorful words can be written like this: + +.IP +.EX +echo "KTHXBAI" | toilet | lolcat +.EE +. +.P + +Cows are popular, come in all colors, and tell random epigrams: + +.IP +.EX +fortune | cowsay | lolcat \-a +.EE +. +.P + +.SH SEE ALSO +.BR cat (1), +.BR toilet (1), +.BR fortune (6), +.BR cowsay (6) +.br +.SH AUTHOR +lolcat was written by Moe <[email protected]>. +.PP +This manual page was originally written by chrysn <[email protected]>, +for the Debian project. +.br +Very quickly revamped by Mathieu Aubin <[email protected]> to +include as part of official code repository. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2017-07-14 19:52:21.000000000 +0200 +++ new/metadata 2018-08-30 16:59:41.000000000 +0200 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: lolcat version: !ruby/object:Gem::Version - version: 90.8.8 + version: 99.9.19 platform: ruby authors: - Moe autorequire: bindir: bin cert_chain: [] -date: 2017-07-14 00:00:00.000000000 Z +date: 2018-08-30 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rake @@ -42,16 +42,30 @@ name: trollop requirement: !ruby/object:Gem::Requirement requirements: + - - '=' + - !ruby/object:Gem::Version + version: 2.1.3 + type: :runtime + prerelease: false + version_requirements: !ruby/object:Gem::Requirement + requirements: + - - '=' + - !ruby/object:Gem::Version + version: 2.1.3 +- !ruby/object:Gem::Dependency + name: manpages + requirement: !ruby/object:Gem::Requirement + requirements: - - "~>" - !ruby/object:Gem::Version - version: 2.1.2 + version: 0.6.1 type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version - version: 2.1.2 + version: 0.6.1 description: Rainbows and unicorns! email: - [email protected] @@ -72,6 +86,7 @@ - lib/lolcat/lol.rb - lib/lolcat/version.rb - lolcat.gemspec +- man/lolcat.6 homepage: https://github.com/busyloop/lolcat licenses: [] metadata: {} @@ -91,7 +106,7 @@ version: '0' requirements: [] rubyforge_project: -rubygems_version: 2.5.2 +rubygems_version: 2.7.6 signing_key: specification_version: 4 summary: Okay, no unicorns. But rainbows!!
