Hello community,

here is the log from the commit of package ack for openSUSE:Factory checked in 
at 2020-07-09 17:44:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ack (Old)
 and      /work/SRC/openSUSE:Factory/.ack.new.3060 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ack"

Thu Jul  9 17:44:19 2020 rev:30 rq:819711 version:3.4.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/ack/ack.changes  2020-01-28 10:57:53.637152344 
+0100
+++ /work/SRC/openSUSE:Factory/.ack.new.3060/ack.changes        2020-07-09 
17:44:23.372558665 +0200
@@ -1,0 +2,7 @@
+Mon Jul  6 19:39:51 UTC 2020 - Andreas Stieger <[email protected]>
+
+- ack 3.4.0:
+  * tweaks to coloring in output
+  * Add --toml for the TOML filetype
+
+-------------------------------------------------------------------

Old:
----
  ack-v3.3.1.tar.gz

New:
----
  ack-v3.4.0.tar.gz

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

Other differences:
------------------
++++++ ack.spec ++++++
--- /var/tmp/diff_new_pack.LXtmW6/_old  2020-07-09 17:44:24.620562617 +0200
+++ /var/tmp/diff_new_pack.LXtmW6/_new  2020-07-09 17:44:24.620562617 +0200
@@ -24,7 +24,7 @@
 %endif
 %{!?perl_make_install:  %global perl_make_install make DESTDIR=%{buildroot} 
install_vendor}
 Name:           ack
-Version:        3.3.1
+Version:        3.4.0
 Release:        0
 Summary:        Grep-Like Text Finder
 License:        Artistic-2.0

++++++ ack-v3.3.1.tar.gz -> ack-v3.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ack-v3.3.1/Changes new/ack-v3.4.0/Changes
--- old/ack-v3.3.1/Changes      2020-01-13 20:21:51.000000000 +0100
+++ new/ack-v3.4.0/Changes      2020-06-30 06:05:03.000000000 +0200
@@ -1,5 +1,19 @@
 History file for ack 3.  https://beyondgrep.com/
 
+v3.4.0      Mon Jun 29 23:04:18 CDT 2020
+========================================
+[FEATURES]
+When calling "ack -c" to get a list of filenames and counts, the filename
+would not be colored like when getting normal search results.  Now it will.
+Thanks to Matthew Hughes for adding the feature, and Ophir Lifshitz for the
+suggestion. (GH#282)
+
+Added --toml for the TOML filetype. (GH#306)
+
+[FIXES]
+The test t/ack-x.t would fail when run as root. Now it is skipped. Thanks,
+Michael LaGrasta. (GH#217)
+
 
 v3.3.1      Mon Jan 13 10:27:16 CST 2020
 ========================================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ack-v3.3.1/META.json new/ack-v3.4.0/META.json
--- old/ack-v3.3.1/META.json    2020-01-13 20:22:54.000000000 +0100
+++ new/ack-v3.4.0/META.json    2020-06-30 06:09:48.000000000 +0200
@@ -4,7 +4,7 @@
       "Andy Lester <[email protected]>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter 
version 2.150010",
+   "generated_by" : "ExtUtils::MakeMaker version 7.38, CPAN::Meta::Converter 
version 2.150010",
    "license" : [
       "artistic_2"
    ],
@@ -69,6 +69,6 @@
       },
       "x_MailingList" : "https://groups.google.com/group/ack-users";
    },
-   "version" : "v3.3.1",
+   "version" : "v3.4.0",
    "x_serialization_backend" : "JSON::PP version 4.02"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ack-v3.3.1/META.yml new/ack-v3.4.0/META.yml
--- old/ack-v3.3.1/META.yml     2020-01-13 20:22:54.000000000 +0100
+++ new/ack-v3.4.0/META.yml     2020-06-30 06:09:47.000000000 +0200
@@ -7,7 +7,7 @@
 configure_requires:
   ExtUtils::MakeMaker: '0'
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 
2.150010'
+generated_by: 'ExtUtils::MakeMaker version 7.38, CPAN::Meta::Converter version 
2.150010'
 license: artistic_2
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -43,5 +43,5 @@
   homepage: https://beyondgrep.com/
   license: https://www.perlfoundation.org/artistic-license-20.html
   repository: git://github.com/beyondgrep/ack3.git
-version: v3.3.1
+version: v3.4.0
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ack-v3.3.1/ack new/ack-v3.4.0/ack
--- old/ack-v3.3.1/ack  2020-01-13 20:21:51.000000000 +0100
+++ new/ack-v3.4.0/ack  2020-06-30 06:05:21.000000000 +0200
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-our $VERSION = 'v3.3.1'; # Check https://beyondgrep.com/ for updates
+our $VERSION = 'v3.4.0'; # Check https://beyondgrep.com/ for updates
 
 use 5.010001;
 
@@ -324,7 +324,11 @@
 
         if ( !$opt_l || $matches_for_this_file > 0 ) {
             if ( $opt_show_filename ) {
-                App::Ack::say( $file->name, ':', $matches_for_this_file );
+                my $display_filename = $file->name;
+                if ( $opt_color ) {
+                    $display_filename = 
Term::ANSIColor::colored($display_filename, $ENV{ACK_COLOR_FILENAME});
+                }
+                App::Ack::say( $display_filename, ':', $matches_for_this_file 
);
             }
             else {
                 App::Ack::say( $matches_for_this_file );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ack-v3.3.1/lib/App/Ack/ConfigDefault.pm 
new/ack-v3.4.0/lib/App/Ack/ConfigDefault.pm
--- old/ack-v3.3.1/lib/App/Ack/ConfigDefault.pm 2020-01-13 20:18:17.000000000 
+0100
+++ new/ack-v3.4.0/lib/App/Ack/ConfigDefault.pm 2020-06-30 06:04:32.000000000 
+0200
@@ -452,6 +452,10 @@
 # http//template-toolkit.org/
 --type-add=ttml:ext:tt,tt2,ttml
 
+# TOML
+# https://toml.io/
+--type-add=toml:ext:toml
+
 # Typescript
 # https://www.typescriptlang.org/
 --type-add=ts:ext:ts,tsx
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ack-v3.3.1/lib/App/Ack.pm 
new/ack-v3.4.0/lib/App/Ack.pm
--- old/ack-v3.3.1/lib/App/Ack.pm       2020-01-13 20:21:51.000000000 +0100
+++ new/ack-v3.4.0/lib/App/Ack.pm       2020-06-30 06:05:26.000000000 +0200
@@ -16,7 +16,7 @@
 our $VERSION;
 our $COPYRIGHT;
 BEGIN {
-    $VERSION = 'v3.3.1'; # Check https://beyondgrep.com/ for updates
+    $VERSION = 'v3.4.0'; # Check https://beyondgrep.com/ for updates
     $COPYRIGHT = 'Copyright 2005-2020 Andy Lester.';
 }
 our $STANDALONE = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ack-v3.3.1/t/ack-color.t new/ack-v3.4.0/t/ack-color.t
--- old/ack-v3.3.1/t/ack-color.t        2020-01-13 20:18:17.000000000 +0100
+++ new/ack-v3.4.0/t/ack-color.t        2020-06-30 06:04:32.000000000 +0200
@@ -8,7 +8,7 @@
 use lib 't';
 use Util;
 
-plan tests => 14;
+plan tests => 15;
 
 prep_environment();
 
@@ -131,7 +131,51 @@
         "${red}$file${color_end}",
         "${bold_white_on_green}11${color_end}:${blue_bold}22${color_end}:Look 
on my works, ye ${cyan_on_red}Mighty${color_end}, and despair!'$line_end",
     ] );
+};
+
+
+subtest 'Filename colors with count' => sub {
+    if ( !has_io_pty() ) {
+        plan skip_all => 'IO::Pty is required for this test';
+        return;
+    }
+
+    plan tests => 6;
+
+    # Try it with default color.
+    my $file = reslash('t/text/bill-of-rights.txt');
+    my $expected_with_color = "${green_bold}$file${color_end}:1";
+    my $expected_without_color = "$file:1";
+    my @args = qw(
+        Congress
+        --count
+        --with-filename
+    );
 
+    my @default_results = run_ack_interactive( @args, $file );
+    is_deeply( \@default_results, [$expected_with_color], 'Filename colored by 
default' );
+
+    # Now try it with red as the color.
+    $expected_with_color = "${red}$file${color_end}:1";
+    @args = ( @args, '--color-filename=red' );
+
+    my @red_results = run_ack_interactive( @args, $file );
+    is_deeply( \@red_results, [$expected_with_color], 'Color is now red' );
+
+
+    # Now redirect our output and make sure the color doesn't come up.
+    my @non_interactive_colorless_results = run_ack( @args, $file );
+    is_deeply(
+        \@non_interactive_colorless_results,
+        [$expected_without_color], "Filename not colored when output is 
redirected",
+    );
+
+    # Now redirect output, but add --color explicitly.
+    my @non_interactive_colored_results = run_ack( @args, '--color', $file );
+    is_deeply(
+        \@non_interactive_colored_results,
+        [$expected_with_color], "Filename colored when output is redirected 
and '--color' is used",
+    );
 };
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ack-v3.3.1/t/ack-x.t new/ack-v3.4.0/t/ack-x.t
--- old/ack-v3.3.1/t/ack-x.t    2020-01-13 20:18:17.000000000 +0100
+++ new/ack-v3.4.0/t/ack-x.t    2020-06-30 06:04:32.000000000 +0200
@@ -56,6 +56,9 @@
 # We have to show that -s supresses errors on missing and unreadable files,
 # while still giving results on files that are there.
 subtest 'GH #175' => sub {
+
+    plan skip_all => q{Can't be run as root} if $> == 0;
+
     plan tests => 5;
 
     my @search_files;


Reply via email to