Permalink
Browse files

Build results of 9dc78e5 (on master)

  • Loading branch information...
xenoterracide committed Apr 4, 2012
2 parents 5c841d7 + 9dc78e5 commit a1c8b1481653613876d03a31c48fa92c322d2db1
Showing with 70 additions and 11 deletions.
  1. +7 −0 Changes
  2. +1 −0 MANIFEST
  3. +1 −1 META.json
  4. +1 −1 META.yml
  5. +1 −1 Makefile.PL
  6. +1 −1 README
  7. +1 −1 lib/Dist/Zilla/Plugin/PodSpellingTests.pm
  8. +5 −3 lib/Dist/Zilla/Plugin/Test/PodSpelling.pm
  9. +3 −3 t/attributes.t
  10. +49 −0 t/dashed.t
View
@@ -1,8 +1,15 @@
Revision history for Perl extension Dist-Zilla-Plugin-Test-PodSpelling
+2.002004 2012-04-04
+ - appears that I forgot to merge 2.002002 before releasing 2.002003
+
2.002003 2012-04-04
- make tests required for authors but no one else
+2.002002 2012-03-07
+ - fix issue with a dash in the copyrigh holder GH #5
+ - use Test::Requires over eval
+
2.002001 2012-01-10
- fix copyright year
View
@@ -21,6 +21,7 @@ t/author-critic.t
t/author-pod-spell.t
t/author-test-eol.t
t/checked.t
+t/dashed.t
t/file.t
t/release-cpan-changes.t
t/release-dist-manifest.t
View
@@ -71,6 +71,6 @@
"web" : "https://github.com/xenoterracide/Dist-Zilla-Plugin-Test-PodSpelling"
}
},
- "version" : "2.002003"
+ "version" : "2.002004"
}
View
@@ -45,4 +45,4 @@ resources:
bugtracker: https://github.com/xenoterracide/Dist-Zilla-Plugin-Test-PodSpelling/issues
homepage: http://search.cpan.org/dist/Dist-Zilla-Plugin-Test-PodSpelling/
repository: git://github.com/xenoterracide/Dist-Zilla-Plugin-Test-PodSpelling.git
-version: 2.002003
+version: 2.002004
View
@@ -41,7 +41,7 @@ my %WriteMakefileArgs = (
"strict" => 0,
"warnings" => 0
},
- "VERSION" => "2.002003",
+ "VERSION" => "2.002004",
"test" => {
"TESTS" => "t/*.t"
}
View
2 README
@@ -2,7 +2,7 @@ NAME
Dist::Zilla::Plugin::Test::PodSpelling - Author tests for POD spelling
VERSION
- version 2.002003
+ version 2.002004
SYNOPSIS
In "dist.ini":
@@ -27,7 +27,7 @@ Dist::Zilla::Plugin::PodSpellingTests - (DEPRECATED) The old name of the PodSpel
=head1 VERSION
-version 2.002003
+version 2.002004
=head1 SYNOPSIS
@@ -3,7 +3,7 @@ use 5.008;
use strict;
use warnings;
-our $VERSION = '2.002003'; # VERSION
+our $VERSION = '2.002004'; # VERSION
use Moose;
extends 'Dist::Zilla::Plugin::InlineFiles';
@@ -56,7 +56,9 @@ around add_file => sub {
if ( $self->zilla->copyright_holder ) {
for ( split( ' ', $self->zilla->copyright_holder ) ) {
- my ( $word ) = $_ =~ /(\w+)/xms;
+ my ( $word ) = $_ =~ /(\w{2,})/xms;
+
+ next unless $word;
$self->log_debug( 'copyright_holder word: ' . $word );
@@ -118,7 +120,7 @@ Dist::Zilla::Plugin::Test::PodSpelling - Author tests for POD spelling
=head1 VERSION
-version 2.002003
+version 2.002004
=head1 SYNOPSIS
View
@@ -37,14 +37,14 @@ sub get_content {
}
my $content = get_content({});
- like $content, qr/use Pod::Wordlist::hanekomu/, q[use default wordlist];
+ like $content, qr/Pod::Wordlist::hanekomu/, q[use default wordlist];
unlike $content, qr/set_spell_cmd/, q[by default don't set spell command];
like $content, qr/add_stopwords/, q[by default we add stopwords];
like $content, qr/__DATA__\s$author/, q[DATA handle includes author];
$content = get_content({wordlist => 'Foo::Bar'});
-unlike $content, qr/use Pod::Wordlist::hanekomu/, q[custom word list];
- like $content, qr/use Foo::Bar/, q[custom word list];
+unlike $content, qr/Pod::Wordlist::hanekomu/, q[custom word list];
+ like $content, qr/Foo::Bar/, q[custom word list];
$content = get_content({spell_cmd => 'all_wrong'});
like $content, qr/set_spell_cmd.+all_wrong/, q[custom spell checker];
View
@@ -0,0 +1,49 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use Test::More 0.88;
+use Test::DZil;
+
+# test the file content generated when various attributes are set
+
+my $fname = 'Fo';
+my $mi = 'G';
+my $lname1 = 'oer';
+my $lname2 = 'bar';
+my $author = "$fname $mi $lname1 - $lname2";
+
+sub get_content {
+ my ($args) = @_;
+
+ my $name = 'Test::PodSpelling';
+ my $zilla = Builder->from_config(
+ { dist_root => 'corpus/foo' },
+ {
+ add_files => {
+ 'source/dist.ini' => dist_ini(
+ {
+ name => 'Spell-Checked',
+ version => 1,
+ abstract => 'spelled wrong',
+ license => 'Perl_5',
+ author => $author,
+ copyright_holder => $author,
+ },
+ [$name => $args],
+ )
+ }
+ }
+ );
+
+ my $plugin = $zilla->plugin_named($name);
+ $plugin->gather_files;
+ return $zilla->files->[0]->content;
+}
+
+my $content = get_content({});
+like $content, qr/^$fname $/xms, q[includes first name];
+like $content, qr/^$lname1$/xms, q[includes last name 1];
+like $content, qr/^$lname2$/xms, q[includes last name 2];
+unlike $content, qr/^$mi $/xms, q[doesnot include the midddle initial];
+
+done_testing;

0 comments on commit a1c8b14

Please sign in to comment.