From: Charles McGarvey Date: Mon, 18 Nov 2019 00:37:51 +0000 (-0700) Subject: Version 0.47 X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=4a8ff75b5b2f7bfaadc936757dc2a0f5de3c57e3;p=chaz%2Fgit-codeowners Version 0.47 --- diff --git a/Changes b/Changes index b8d34aa..94ce334 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Revision history for App-Codeowners. +0.47 2019-11-17 17:36:49-07:00 MST7MDT + * Configure git in unit tests to avoid unnecessary test failures. + * Compare long paths on win32 (thanks CPAN testers). + 0.46 2019-11-16 22:58:17-07:00 MST7MDT * Declare dependency on Path::Tiny 0.089 (thanks CPAN testers). diff --git a/META.json b/META.json index cdc7fb6..22654cd 100644 --- a/META.json +++ b/META.json @@ -114,55 +114,55 @@ "provides" : { "App::Codeowners" : { "file" : "lib/App/Codeowners.pm", - "version" : "0.46" + "version" : "0.47" }, "App::Codeowners::Formatter" : { "file" : "lib/App/Codeowners/Formatter.pm", - "version" : "0.46" + "version" : "0.47" }, "App::Codeowners::Formatter::CSV" : { "file" : "lib/App/Codeowners/Formatter/CSV.pm", - "version" : "0.46" + "version" : "0.47" }, "App::Codeowners::Formatter::JSON" : { "file" : "lib/App/Codeowners/Formatter/JSON.pm", - "version" : "0.46" + "version" : "0.47" }, "App::Codeowners::Formatter::String" : { "file" : "lib/App/Codeowners/Formatter/String.pm", - "version" : "0.46" + "version" : "0.47" }, "App::Codeowners::Formatter::TSV" : { "file" : "lib/App/Codeowners/Formatter/TSV.pm", - "version" : "0.46" + "version" : "0.47" }, "App::Codeowners::Formatter::Table" : { "file" : "lib/App/Codeowners/Formatter/Table.pm", - "version" : "0.46" + "version" : "0.47" }, "App::Codeowners::Formatter::YAML" : { "file" : "lib/App/Codeowners/Formatter/YAML.pm", - "version" : "0.46" + "version" : "0.47" }, "App::Codeowners::Options" : { "file" : "lib/App/Codeowners/Options.pm", - "version" : "0.46" + "version" : "0.47" }, "App::Codeowners::Util" : { "file" : "lib/App/Codeowners/Util.pm", - "version" : "0.46" + "version" : "0.47" }, "App::Codeowners::Util::Process" : { "file" : "lib/App/Codeowners/Util.pm", - "version" : "0.46" + "version" : "0.47" }, "File::Codeowners" : { "file" : "lib/File/Codeowners.pm", - "version" : "0.46" + "version" : "0.47" }, "Test::File::Codeowners" : { "file" : "lib/Test/File/Codeowners.pm", - "version" : "0.46" + "version" : "0.47" } }, "release_status" : "stable", @@ -177,7 +177,7 @@ "web" : "https://github.com/chazmcgarvey/git-codeowners" } }, - "version" : "0.46", + "version" : "0.47", "x_authority" : "cpan:CCM", "x_generated_by_perl" : "v5.28.0", "x_serialization_backend" : "Cpanel::JSON::XS version 4.15" diff --git a/META.yml b/META.yml index a2b2626..babd239 100644 --- a/META.yml +++ b/META.yml @@ -31,43 +31,43 @@ no_index: provides: App::Codeowners: file: lib/App/Codeowners.pm - version: '0.46' + version: '0.47' App::Codeowners::Formatter: file: lib/App/Codeowners/Formatter.pm - version: '0.46' + version: '0.47' App::Codeowners::Formatter::CSV: file: lib/App/Codeowners/Formatter/CSV.pm - version: '0.46' + version: '0.47' App::Codeowners::Formatter::JSON: file: lib/App/Codeowners/Formatter/JSON.pm - version: '0.46' + version: '0.47' App::Codeowners::Formatter::String: file: lib/App/Codeowners/Formatter/String.pm - version: '0.46' + version: '0.47' App::Codeowners::Formatter::TSV: file: lib/App/Codeowners/Formatter/TSV.pm - version: '0.46' + version: '0.47' App::Codeowners::Formatter::Table: file: lib/App/Codeowners/Formatter/Table.pm - version: '0.46' + version: '0.47' App::Codeowners::Formatter::YAML: file: lib/App/Codeowners/Formatter/YAML.pm - version: '0.46' + version: '0.47' App::Codeowners::Options: file: lib/App/Codeowners/Options.pm - version: '0.46' + version: '0.47' App::Codeowners::Util: file: lib/App/Codeowners/Util.pm - version: '0.46' + version: '0.47' App::Codeowners::Util::Process: file: lib/App/Codeowners/Util.pm - version: '0.46' + version: '0.47' File::Codeowners: file: lib/File/Codeowners.pm - version: '0.46' + version: '0.47' Test::File::Codeowners: file: lib/Test/File/Codeowners.pm - version: '0.46' + version: '0.47' recommends: Pod::Usage: '0' Term::Detect::Software: '0' @@ -93,7 +93,7 @@ resources: bugtracker: https://github.com/chazmcgarvey/git-codeowners/issues homepage: https://github.com/chazmcgarvey/git-codeowners repository: https://github.com/chazmcgarvey/git-codeowners.git -version: '0.46' +version: '0.47' x_authority: cpan:CCM x_generated_by_perl: v5.28.0 x_serialization_backend: 'YAML::Tiny version 1.73' diff --git a/Makefile.PL b/Makefile.PL index 23496be..ae4b301 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -47,7 +47,7 @@ my %WriteMakefileArgs = ( "Test::Exit" => 0, "Test::More" => 0 }, - "VERSION" => "0.46", + "VERSION" => "0.47", "test" => { "TESTS" => "t/*.t" } diff --git a/README b/README index 8b5ba75..0b9aa08 100644 --- a/README +++ b/README @@ -4,7 +4,7 @@ NAME VERSION - version 0.46 + version 0.47 SYNOPSIS diff --git a/bin/git-codeowners b/bin/git-codeowners index 92774eb..6ea28c6 100755 --- a/bin/git-codeowners +++ b/bin/git-codeowners @@ -10,7 +10,7 @@ use strict; use App::Codeowners; -our $VERSION = '0.46'; # VERSION +our $VERSION = '0.47'; # VERSION App::Codeowners->main(@ARGV); @@ -26,7 +26,7 @@ git-codeowners - A tool for managing CODEOWNERS files =head1 VERSION -version 0.46 +version 0.47 =head1 SYNOPSIS diff --git a/lib/App/Codeowners.pm b/lib/App/Codeowners.pm index 282236b..0a21fb6 100644 --- a/lib/App/Codeowners.pm +++ b/lib/App/Codeowners.pm @@ -14,7 +14,7 @@ use Encode qw(encode); use File::Codeowners; use Path::Tiny; -our $VERSION = '0.46'; # VERSION +our $VERSION = '0.47'; # VERSION sub main { @@ -218,7 +218,7 @@ App::Codeowners - A tool for managing CODEOWNERS files =head1 VERSION -version 0.46 +version 0.47 =head1 DESCRIPTION diff --git a/lib/App/Codeowners/Formatter.pm b/lib/App/Codeowners/Formatter.pm index 4b0e640..2f974d8 100644 --- a/lib/App/Codeowners/Formatter.pm +++ b/lib/App/Codeowners/Formatter.pm @@ -5,7 +5,7 @@ package App::Codeowners::Formatter; use warnings; use strict; -our $VERSION = '0.46'; # VERSION +our $VERSION = '0.47'; # VERSION use Module::Load; @@ -120,7 +120,7 @@ App::Codeowners::Formatter - Base class for formatting codeowners output =head1 VERSION -version 0.46 +version 0.47 =head1 SYNOPSIS diff --git a/lib/App/Codeowners/Formatter/CSV.pm b/lib/App/Codeowners/Formatter/CSV.pm index 4dd7bd0..036bb44 100644 --- a/lib/App/Codeowners/Formatter/CSV.pm +++ b/lib/App/Codeowners/Formatter/CSV.pm @@ -5,7 +5,7 @@ package App::Codeowners::Formatter::CSV; use warnings; use strict; -our $VERSION = '0.46'; # VERSION +our $VERSION = '0.47'; # VERSION use parent 'App::Codeowners::Formatter'; @@ -63,7 +63,7 @@ App::Codeowners::Formatter::CSV - Format codeowners output as comma-separated va =head1 VERSION -version 0.46 +version 0.47 =head1 DESCRIPTION diff --git a/lib/App/Codeowners/Formatter/JSON.pm b/lib/App/Codeowners/Formatter/JSON.pm index 94fbbb0..2d1c300 100644 --- a/lib/App/Codeowners/Formatter/JSON.pm +++ b/lib/App/Codeowners/Formatter/JSON.pm @@ -5,7 +5,7 @@ package App::Codeowners::Formatter::JSON; use warnings; use strict; -our $VERSION = '0.46'; # VERSION +our $VERSION = '0.47'; # VERSION use parent 'App::Codeowners::Formatter'; @@ -42,7 +42,7 @@ App::Codeowners::Formatter::JSON - Format codeowners output as JSON =head1 VERSION -version 0.46 +version 0.47 =head1 DESCRIPTION diff --git a/lib/App/Codeowners/Formatter/String.pm b/lib/App/Codeowners/Formatter/String.pm index a875499..6c98c69 100644 --- a/lib/App/Codeowners/Formatter/String.pm +++ b/lib/App/Codeowners/Formatter/String.pm @@ -5,7 +5,7 @@ package App::Codeowners::Formatter::String; use warnings; use strict; -our $VERSION = '0.46'; # VERSION +our $VERSION = '0.47'; # VERSION use parent 'App::Codeowners::Formatter'; @@ -136,7 +136,7 @@ App::Codeowners::Formatter::String - Format codeowners output using printf-like =head1 VERSION -version 0.46 +version 0.47 =head1 DESCRIPTION diff --git a/lib/App/Codeowners/Formatter/TSV.pm b/lib/App/Codeowners/Formatter/TSV.pm index 7a20a18..25b8d54 100644 --- a/lib/App/Codeowners/Formatter/TSV.pm +++ b/lib/App/Codeowners/Formatter/TSV.pm @@ -5,7 +5,7 @@ package App::Codeowners::Formatter::TSV; use warnings; use strict; -our $VERSION = '0.46'; # VERSION +our $VERSION = '0.47'; # VERSION use parent 'App::Codeowners::Formatter::CSV'; @@ -25,7 +25,7 @@ App::Codeowners::Formatter::TSV - Format codeowners output as tab-separated valu =head1 VERSION -version 0.46 +version 0.47 =head1 DESCRIPTION diff --git a/lib/App/Codeowners/Formatter/Table.pm b/lib/App/Codeowners/Formatter/Table.pm index 7d64a0b..d419333 100644 --- a/lib/App/Codeowners/Formatter/Table.pm +++ b/lib/App/Codeowners/Formatter/Table.pm @@ -5,7 +5,7 @@ package App::Codeowners::Formatter::Table; use warnings; use strict; -our $VERSION = '0.46'; # VERSION +our $VERSION = '0.47'; # VERSION use parent 'App::Codeowners::Formatter'; @@ -40,7 +40,7 @@ App::Codeowners::Formatter::Table - Format codeowners output as a table =head1 VERSION -version 0.46 +version 0.47 =head1 DESCRIPTION diff --git a/lib/App/Codeowners/Formatter/YAML.pm b/lib/App/Codeowners/Formatter/YAML.pm index b54f8e2..de0bc60 100644 --- a/lib/App/Codeowners/Formatter/YAML.pm +++ b/lib/App/Codeowners/Formatter/YAML.pm @@ -5,7 +5,7 @@ package App::Codeowners::Formatter::YAML; use warnings; use strict; -our $VERSION = '0.46'; # VERSION +our $VERSION = '0.47'; # VERSION use parent 'App::Codeowners::Formatter'; @@ -36,7 +36,7 @@ App::Codeowners::Formatter::YAML - Format codeowners output as YAML =head1 VERSION -version 0.46 +version 0.47 =head1 DESCRIPTION diff --git a/lib/App/Codeowners/Options.pm b/lib/App/Codeowners/Options.pm index cf91cce..153376f 100644 --- a/lib/App/Codeowners/Options.pm +++ b/lib/App/Codeowners/Options.pm @@ -8,7 +8,7 @@ use strict; use Getopt::Long 2.39 (); use Path::Tiny; -our $VERSION = '0.46'; # VERSION +our $VERSION = '0.47'; # VERSION sub pod2usage { eval { require Pod::Usage }; @@ -299,7 +299,7 @@ App::Codeowners::Options - Getopt and shell completion for App::Codeowners =head1 VERSION -version 0.46 +version 0.47 =head1 METHODS diff --git a/lib/App/Codeowners/Util.pm b/lib/App/Codeowners/Util.pm index 5df7664..b816956 100644 --- a/lib/App/Codeowners/Util.pm +++ b/lib/App/Codeowners/Util.pm @@ -23,7 +23,7 @@ our @EXPORT_OK = qw( zip ); -our $VERSION = '0.46'; # VERSION +our $VERSION = '0.47'; # VERSION sub find_nearest_codeowners { @@ -280,7 +280,7 @@ App::Codeowners::Util - Grab bag of utility subs for Codeowners modules =head1 VERSION -version 0.46 +version 0.47 =head1 DESCRIPTION diff --git a/lib/File/Codeowners.pm b/lib/File/Codeowners.pm index 39a178b..0ae71a8 100644 --- a/lib/File/Codeowners.pm +++ b/lib/File/Codeowners.pm @@ -10,7 +10,7 @@ use Path::Tiny 0.089; use Scalar::Util qw(openhandle); use Text::Gitignore qw(build_gitignore_matcher); -our $VERSION = '0.46'; # VERSION +our $VERSION = '0.47'; # VERSION sub _croak { require Carp; Carp::croak(@_); } sub _usage { _croak("Usage: @_\n") } @@ -354,7 +354,7 @@ File::Codeowners - Read and write CODEOWNERS files =head1 VERSION -version 0.46 +version 0.47 =head1 METHODS diff --git a/lib/Test/File/Codeowners.pm b/lib/Test/File/Codeowners.pm index 44c40a3..14d4c2d 100644 --- a/lib/Test/File/Codeowners.pm +++ b/lib/Test/File/Codeowners.pm @@ -10,7 +10,7 @@ use Encode qw(encode); use File::Codeowners; use Test::Builder; -our $VERSION = '0.46'; # VERSION +our $VERSION = '0.47'; # VERSION my $Test = Test::Builder->new; @@ -88,7 +88,7 @@ Test::File::Codeowners - Write tests for CODEOWNERS files =head1 VERSION -version 0.46 +version 0.47 =head1 SYNOPSIS diff --git a/t/app-codeowners-util.t b/t/app-codeowners-util.t index d44b06f..477d848 100644 --- a/t/app-codeowners-util.t +++ b/t/app-codeowners-util.t @@ -42,12 +42,13 @@ subtest 'git_ls_files' => sub { subtest 'git_toplevel' => sub { plan skip_all => 'Cannot run git' if !$can_git; my $repodir =_setup_git_repo(); + my $repodir_fixed = _fix_win32_path($repodir); my $r = App::Codeowners::Util::git_toplevel($repodir); - is($r->canonpath, $repodir->canonpath, 'found toplevel directory from toplevel'); + is($r->canonpath, $repodir_fixed->canonpath, 'found toplevel directory from toplevel'); $r = App::Codeowners::Util::git_toplevel($repodir->child('a/b')); - is($r->canonpath, $repodir->canonpath, 'found toplevel directory'); + is($r->canonpath, $repodir_fixed->canonpath, 'found toplevel directory'); }; subtest 'find_nearest_codeowners' => sub { @@ -90,6 +91,8 @@ sub _setup_git_repo { my $repodir = tempdir; run_git('-C', $repodir, 'init')->wait; + run_git('-C', $repodir, qw{config --local user.email app-codeowners@example.com})->wait; + run_git('-C', $repodir, qw{config --local user.name App-Codeowners})->wait; $repodir->child('foo.txt')->touchpath; $repodir->child('a/b/c/bar.txt')->touchpath; @@ -97,6 +100,15 @@ sub _setup_git_repo { return $repodir; } +sub _fix_win32_path { + my $path = shift; + # Git for Windows shows full paths + if (eval { require Win32 }) { + $path = path(Win32::GetLongPathName($path)); + } + return $path; +} + sub _spew_codeowners { my $path = path(shift); $path->spew_utf8(\"foo.txt \@twix\n"); diff --git a/t/app-codeowners.t b/t/app-codeowners.t index b5e430e..48493d1 100644 --- a/t/app-codeowners.t +++ b/t/app-codeowners.t @@ -114,6 +114,8 @@ a/ @snickers END run_git('-C', $repodir, qw{init})->wait; + run_git('-C', $repodir, qw{config --local user.email app-codeowners@example.com})->wait; + run_git('-C', $repodir, qw{config --local user.name App-Codeowners})->wait; run_git('-C', $repodir, qw{add .})->wait; run_git('-C', $repodir, qw{commit -m}, 'initial commit')->wait;