Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Compression was done wrong

  • Loading branch information...
commit 771d8e98ae4f5d72b98514e94360766c1eb9870d 1 parent 6390547
@yanick authored
View
2  Changes
@@ -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
2  dist.ini
@@ -5,5 +5,3 @@ copyright_holder = Yanick Champoux
copyright_year = 2012
[@YANICK]
-[ShareDir]
-
View
6 lib/Dist/Zilla/Plugin/ShareDir/Tarball.pm
@@ -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
BIN  share/shared-files.tar
Binary file not shown
View
BIN  share/shared-files.tar.gz
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.