This is an automated email from the git hooks/post-receive script. intrigeri pushed a commit to annotated tag 0.13 in repository libdist-zilla-plugin-test-eol-perl.
commit dc961c96c38c515d96f8607ac23cefba0007024c Author: Karen Etheridge <[email protected]> Date: Sun Oct 12 12:01:06 2014 -0700 bring back EOLTests.pm from 0.002 --- lib/Dist/Zilla/Plugin/EOLTests.pm | 59 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/lib/Dist/Zilla/Plugin/EOLTests.pm b/lib/Dist/Zilla/Plugin/EOLTests.pm new file mode 100644 index 0000000..90235c5 --- /dev/null +++ b/lib/Dist/Zilla/Plugin/EOLTests.pm @@ -0,0 +1,59 @@ +package Dist::Zilla::Plugin::EOLTests; +# ABSTRACT: Release tests making sure correct line endings are used + +use Moose; +use namespace::autoclean; + +extends 'Dist::Zilla::Plugin::InlineFiles'; +with 'Dist::Zilla::Role::TextTemplate'; + +=head1 DESCRIPTION + +This is an extension of L<Dist::Zilla::Plugin::InlineFiles>, providing +the following files: + +=for :list +* xt/release/eol.t +a standard Test::EOL test + +=attr trailing_whitespace + +If this option is set to a true value, +C<< { trailing_whitespace => 1 } >> will be passed to +L<Test::EOL/all_perl_files_ok>. It defaults to C<1>. + +=cut + +has trailing_whitespace => ( + is => 'ro', + isa => 'Bool', + default => 1, +); + +around add_file => sub { + my ($orig, $self, $file) = @_; + return $self->$orig( + Dist::Zilla::File::InMemory->new({ + name => $file->name, + content => $self->fill_in_string( + $file->content, + { trailing_ws => \$self->trailing_whitespace }, + ), + }), + ); +}; + +__PACKAGE__->meta->make_immutable; + +1; + +__DATA__ +___[ xt/release/eol.t ]___ +use strict; +use warnings; +use Test::More; + +eval 'use Test::EOL'; +plan skip_all => 'Test::EOL required' if $@; + +all_perl_files_ok({ trailing_whitespace => {{ $trailing_ws }} }); -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdist-zilla-plugin-test-eol-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits
