Revision history for App-Codeowners.
+0.43 2019-11-13 10:12:01-07:00 MST7MDT
+ * Fix "create" and "update" commands... to actually work.
+
0.42 2019-11-12 21:52:12-07:00 MST7MDT
* Add "projects" command to list defined projects.
* Add flags to filter matches with the "show" command.
"provides" : {
"App::Codeowners" : {
"file" : "lib/App/Codeowners.pm",
- "version" : "0.42"
+ "version" : "0.43"
},
"App::Codeowners::Formatter" : {
"file" : "lib/App/Codeowners/Formatter.pm",
- "version" : "0.42"
+ "version" : "0.43"
},
"App::Codeowners::Formatter::CSV" : {
"file" : "lib/App/Codeowners/Formatter/CSV.pm",
- "version" : "0.42"
+ "version" : "0.43"
},
"App::Codeowners::Formatter::JSON" : {
"file" : "lib/App/Codeowners/Formatter/JSON.pm",
- "version" : "0.42"
+ "version" : "0.43"
},
"App::Codeowners::Formatter::String" : {
"file" : "lib/App/Codeowners/Formatter/String.pm",
- "version" : "0.42"
+ "version" : "0.43"
},
"App::Codeowners::Formatter::TSV" : {
"file" : "lib/App/Codeowners/Formatter/TSV.pm",
- "version" : "0.42"
+ "version" : "0.43"
},
"App::Codeowners::Formatter::Table" : {
"file" : "lib/App/Codeowners/Formatter/Table.pm",
- "version" : "0.42"
+ "version" : "0.43"
},
"App::Codeowners::Formatter::YAML" : {
"file" : "lib/App/Codeowners/Formatter/YAML.pm",
- "version" : "0.42"
+ "version" : "0.43"
},
"App::Codeowners::Options" : {
"file" : "lib/App/Codeowners/Options.pm",
- "version" : "0.42"
+ "version" : "0.43"
},
"App::Codeowners::Util" : {
"file" : "lib/App/Codeowners/Util.pm",
- "version" : "0.42"
+ "version" : "0.43"
},
"App::Codeowners::Util::Process" : {
"file" : "lib/App/Codeowners/Util.pm",
- "version" : "0.42"
+ "version" : "0.43"
},
"File::Codeowners" : {
"file" : "lib/File/Codeowners.pm",
- "version" : "0.42"
+ "version" : "0.43"
},
"Test::File::Codeowners" : {
"file" : "lib/Test/File/Codeowners.pm",
- "version" : "0.42"
+ "version" : "0.43"
}
},
"release_status" : "stable",
"web" : "https://github.com/chazmcgarvey/git-codeowners"
}
},
- "version" : "0.42",
+ "version" : "0.43",
"x_authority" : "cpan:CCM",
"x_generated_by_perl" : "v5.28.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.15"
provides:
App::Codeowners:
file: lib/App/Codeowners.pm
- version: '0.42'
+ version: '0.43'
App::Codeowners::Formatter:
file: lib/App/Codeowners/Formatter.pm
- version: '0.42'
+ version: '0.43'
App::Codeowners::Formatter::CSV:
file: lib/App/Codeowners/Formatter/CSV.pm
- version: '0.42'
+ version: '0.43'
App::Codeowners::Formatter::JSON:
file: lib/App/Codeowners/Formatter/JSON.pm
- version: '0.42'
+ version: '0.43'
App::Codeowners::Formatter::String:
file: lib/App/Codeowners/Formatter/String.pm
- version: '0.42'
+ version: '0.43'
App::Codeowners::Formatter::TSV:
file: lib/App/Codeowners/Formatter/TSV.pm
- version: '0.42'
+ version: '0.43'
App::Codeowners::Formatter::Table:
file: lib/App/Codeowners/Formatter/Table.pm
- version: '0.42'
+ version: '0.43'
App::Codeowners::Formatter::YAML:
file: lib/App/Codeowners/Formatter/YAML.pm
- version: '0.42'
+ version: '0.43'
App::Codeowners::Options:
file: lib/App/Codeowners/Options.pm
- version: '0.42'
+ version: '0.43'
App::Codeowners::Util:
file: lib/App/Codeowners/Util.pm
- version: '0.42'
+ version: '0.43'
App::Codeowners::Util::Process:
file: lib/App/Codeowners/Util.pm
- version: '0.42'
+ version: '0.43'
File::Codeowners:
file: lib/File/Codeowners.pm
- version: '0.42'
+ version: '0.43'
Test::File::Codeowners:
file: lib/Test/File/Codeowners.pm
- version: '0.42'
+ version: '0.43'
recommends:
Term::Detect::Software: '0'
Unicode::GCString: '0'
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.42'
+version: '0.43'
x_authority: cpan:CCM
x_generated_by_perl: v5.28.0
x_serialization_backend: 'YAML::Tiny version 1.73'
"Test::Exit" => 0,
"Test::More" => 0
},
- "VERSION" => "0.42",
+ "VERSION" => "0.43",
"test" => {
"TESTS" => "t/*.t"
}
VERSION
- version 0.42
+ version 0.43
SYNOPSIS
use App::Codeowners;
-our $VERSION = '0.42'; # VERSION
+our $VERSION = '0.43'; # VERSION
App::Codeowners->main(@ARGV);
=head1 VERSION
-version 0.42
+version 0.43
=head1 SYNOPSIS
use File::Codeowners;
use Path::Tiny;
-our $VERSION = '0.42'; # VERSION
+our $VERSION = '0.43'; # VERSION
sub main {
if ($repopath) {
# if there is a repo we can try to update the list of unowned files
- my $git_files = git_ls_files($repopath);
- if (@$git_files) {
- $codeowners->clear_unowned;
- $codeowners->add_unowned(grep { !$codeowners->match($_) } @$git_files);
- }
+ my ($proc, @filepaths) = git_ls_files($repopath);
+ $proc->wait and exit 1;
+ $codeowners->clear_unowned;
+ $codeowners->add_unowned(grep { !$codeowners->match($_) } @filepaths);
}
$codeowners->write_to_filepath($path);
=head1 VERSION
-version 0.42
+version 0.43
=head1 METHODS
use warnings;
use strict;
-our $VERSION = '0.42'; # VERSION
+our $VERSION = '0.43'; # VERSION
use Module::Load;
=head1 VERSION
-version 0.42
+version 0.43
=head1 SYNOPSIS
use warnings;
use strict;
-our $VERSION = '0.42'; # VERSION
+our $VERSION = '0.43'; # VERSION
use parent 'App::Codeowners::Formatter';
=head1 VERSION
-version 0.42
+version 0.43
=head1 DESCRIPTION
use warnings;
use strict;
-our $VERSION = '0.42'; # VERSION
+our $VERSION = '0.43'; # VERSION
use parent 'App::Codeowners::Formatter';
=head1 VERSION
-version 0.42
+version 0.43
=head1 DESCRIPTION
use warnings;
use strict;
-our $VERSION = '0.42'; # VERSION
+our $VERSION = '0.43'; # VERSION
use parent 'App::Codeowners::Formatter';
=head1 VERSION
-version 0.42
+version 0.43
=head1 DESCRIPTION
use warnings;
use strict;
-our $VERSION = '0.42'; # VERSION
+our $VERSION = '0.43'; # VERSION
use parent 'App::Codeowners::Formatter::CSV';
=head1 VERSION
-version 0.42
+version 0.43
=head1 DESCRIPTION
use warnings;
use strict;
-our $VERSION = '0.42'; # VERSION
+our $VERSION = '0.43'; # VERSION
use parent 'App::Codeowners::Formatter';
=head1 VERSION
-version 0.42
+version 0.43
=head1 DESCRIPTION
use warnings;
use strict;
-our $VERSION = '0.42'; # VERSION
+our $VERSION = '0.43'; # VERSION
use parent 'App::Codeowners::Formatter';
=head1 VERSION
-version 0.42
+version 0.43
=head1 DESCRIPTION
use Path::Tiny;
use Pod::Usage;
-our $VERSION = '0.42'; # VERSION
+our $VERSION = '0.43'; # VERSION
sub early_options {
return {
=head1 VERSION
-version 0.42
+version 0.43
=head1 METHODS
zip
);
-our $VERSION = '0.42'; # VERSION
+our $VERSION = '0.43'; # VERSION
sub find_nearest_codeowners {
=head1 VERSION
-version 0.42
+version 0.43
=head1 DESCRIPTION
use Scalar::Util qw(openhandle);
use Text::Gitignore qw(build_gitignore_matcher);
-our $VERSION = '0.42'; # VERSION
+our $VERSION = '0.43'; # VERSION
sub _croak { require Carp; Carp::croak(@_); }
sub _usage { _croak("Usage: @_\n") }
=head1 VERSION
-version 0.42
+version 0.43
=head1 METHODS
use File::Codeowners;
use Test::Builder;
-our $VERSION = '0.42'; # VERSION
+our $VERSION = '0.43'; # VERSION
my $Test = Test::Builder->new;
=head1 VERSION
-version 0.42
+version 0.43
=head1 SYNOPSIS
};
};
+subtest 'create' => sub {
+ plan skip_all => 'Cannot run git' if !$can_git;
+
+ my $repodir = _setup_git_repo();
+ my $chdir = pushd($repodir);
+
+ my $codeowners_filepath = path('CODEOWNERS');
+ $codeowners_filepath->remove;
+
+ my ($stdout, $stderr, $exit) = run { App::Codeowners->main(qw{create}) };
+ is($exit, 0, 'exited without error');
+ is($stderr, "Wrote CODEOWNERS\n", 'reportedly wrote a CODEOWNERS file');
+
+ ok($codeowners_filepath->is_file, 'did write CODEOWNERS file');
+
+ my $contents = $codeowners_filepath->slurp_utf8;
+ like($contents, qr/^# This file shows mappings/, 'correct contents of file') or diag $contents;
+};
+
done_testing;
exit;