pruning t/002 isn't correct, need to prevent it from being added at all
Jesse Luehrs [Sat, 1 Jan 2011 21:36:59 +0000 (15:36 -0600)]
dist.ini
inc/GatherDir.pm [new file with mode: 0644]

index 5df2d08..fbb1e5c 100644 (file)
--- a/dist.ini
+++ b/dist.ini
@@ -6,15 +6,25 @@ copyright_holder = Infinity Interactive, Inc.
 
 version = 1.9900
 
-[@Filter]
-bundle = @Basic
-remove = MakeMaker
+[=inc::GatherDir]
+[PruneCruft]
+[ManifestSkip]
+[MetaYAML]
+[License]
+[Readme]
+[ExtraTests]
+[ExecDir]
+[ShareDir]
 
 [=inc::MakeMaker]
+[Manifest]
+
+[TestRelease]
+[ConfirmRelease]
+[UploadToCPAN]
 
 [PruneFiles]
 filenames = Makefile.PL
-match     = ^t/002_recipes/.*
 
 [PkgVersion]
 
diff --git a/inc/GatherDir.pm b/inc/GatherDir.pm
new file mode 100644 (file)
index 0000000..d21793f
--- /dev/null
@@ -0,0 +1,16 @@
+package inc::GatherDir;
+
+use Moose;
+
+extends 'Dist::Zilla::Plugin::GatherDir';
+
+around _file_from_filename => sub {
+    my $orig = shift;
+    my $self = shift;
+    my $file = $self->$orig(@_);
+    return $file if $file->name =~ m+^t/002_recipes/basics_recipe10\.t+;
+    return ()    if $file->name =~ m+^t/002_recipes+;
+    return $file;
+};
+
+1;