Permalink
Browse files

Compression was done wrong

  • Loading branch information...
1 parent 6390547 commit 771d8e98ae4f5d72b98514e94360766c1eb9870d @yanick committed Oct 19, 2012
View
@@ -2,6 +2,8 @@ Revision history for Dist-Zilla-Plugin-ShareDir-Tarball
{{$NEXT}}
+ - Compression was done wrong. Ooops.
+
0.1.0 2012-10-18
- First version, unleashed on an unsuspecting world.
View
@@ -5,5 +5,3 @@ copyright_holder = Yanick Champoux
copyright_year = 2012
[@YANICK]
-[ShareDir]
-
@@ -54,7 +54,7 @@ use warnings;
use Moose;
use Dist::Zilla::File::InMemory;
-use Compress::Zlib qw/ compress /;
+use Compress::Zlib;
use Archive::Tar;
with 'Dist::Zilla::Role::FileMunger';
@@ -69,14 +69,14 @@ sub munge_files {
my $archive = Archive::Tar->new;
for ( @shared ) {
- ( my $archive_name = $_ ) =~ s#share/##;
+ ( my $archive_name = $_->name ) =~ s#share/##;
$archive->add_data( $archive_name => $_->content );
$self->zilla->prune_file($_);
}
$self->add_file( Dist::Zilla::File::InMemory->new(
name => 'share/shared-files.tar.gz',
- content => compress($archive->write),
+ content => Compress::Zlib::memGzip($archive->write),
));
}
View
Binary file not shown.
View
Binary file not shown.

0 comments on commit 771d8e9

Please sign in to comment.