New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anonymize the test archives #2

Merged
merged 2 commits into from Jan 28, 2015

Conversation

Projects
None yet
2 participants
@book
Contributor

book commented Jan 28, 2015

The first commit contains the script used to anonymize the archives.
The second commit contains a new set of test archives with the same properties for the metadata, and random data for the content.

This should close #1.

@oalders

This comment has been minimized.

Show comment
Hide comment
@oalders

oalders Jan 28, 2015

Owner

Thanks very much! 👍

Owner

oalders commented Jan 28, 2015

Thanks very much! 👍

oalders added a commit that referenced this pull request Jan 28, 2015

Merge pull request #2 from book/master
Anonymize the test archives

@oalders oalders merged commit 66a1eba into oalders:master Jan 28, 2015

@oalders

This comment has been minimized.

Show comment
Hide comment
@oalders

oalders Jan 28, 2015

Owner

@book, before I spend a lot time on this, I figure I'll ask if you have any ideas.

~/Documents/github/archive-any ∙ dzil build
[DZ] beginning to build Archive-Any
[ExtraTests] rewriting release test xt/release/cpan-changes.t
Could not decode UTF-8 t/Acme-POE-Knee-1.10.zip; filename set by GatherDir (Dist::Zilla::Plugin::GatherDir line 215); encoded_content added by GatherDir (Dist::Zilla::Plugin::GatherDir line 216); error was: utf8 "\xD6" does not map to Unicode at /Users/olaf/perl5/lib/perl
5/darwin-thread-multi-2level/Encode.pm line 200.
; maybe you need the [Encoding] plugin to specify an encoding at /Users/olaf/perl5/lib/perl5/Dist/Zilla/Role/File.pm line 153.
        Dist::Zilla::Role::File::_throw('Dist::Zilla::File::OnDisk=HASH(0x7fa18d29fe20)', 'decode UTF-8', 'utf8 "\xD6" does not map to Unicode at /Users/olaf/perl5/lib/...') called at /Users/olaf/perl5/lib/perl5/Dist/Zilla/Role/File.pm line 145
        Dist::Zilla::Role::File::catch {...} ('utf8 "\xD6" does not map to Unicode at /Users/olaf/perl5/lib/...') called at /System/Library/Perl/Extras/5.18/Try/Tiny.pm line 104
        Try::Tiny::try('CODE(0x7fa19046bd50)', 'Try::Tiny::Catch=REF(0x7fa18a601b68)') called at /Users/olaf/perl5/lib/perl5/Dist/Zilla/Role/File.pm line 145
        Dist::Zilla::Role::File::_decode('Dist::Zilla::File::OnDisk=HASH(0x7fa18d29fe20)', 'PK\x{3}\x{4}\x{14}\x{0}\x{2}\x{0}\x{0}\x{0}\x{d6}{\x{17}+\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{13}\x{0}\x{0}\x{0}Acme-POE-Knee-1.10/PK\x{3}\x{4}\x{14}\x{0}
\x{2}\x{0}\x{0}\x{0}\x{d6}{...') called at /Users/olaf/perl5/lib/perl5/Dist/Zilla/Role/MutableFile.pm line 54
        Dist::Zilla::Role::MutableFile::content('Dist::Zilla::File::OnDisk=HASH(0x7fa18d29fe20)') called at /Users/olaf/perl5/lib/perl5/Dist/Zilla/Plugin/AutoPrereqs.pm line 145
        Dist::Zilla::Plugin::AutoPrereqs::register_prereqs('Dist::Zilla::Plugin::AutoPrereqs=HASH(0x7fa18cf6ee40)') called at /Users/olaf/perl5/lib/perl5/Dist/Zilla/Dist/Builder.pm line 325
        Dist::Zilla::Dist::Builder::build_in('Dist::Zilla::Dist::Builder=HASH(0x7fa18b1bcaf0)', undef) called at /Users/olaf/perl5/lib/perl5/Dist/Zilla/Dist/Builder.pm line 389
        Dist::Zilla::Dist::Builder::ensure_built_in('Dist::Zilla::Dist::Builder=HASH(0x7fa18b1bcaf0)') called at /Users/olaf/perl5/lib/perl5/Dist/Zilla/Dist/Builder.pm line 378
        Dist::Zilla::Dist::Builder::ensure_built('Dist::Zilla::Dist::Builder=HASH(0x7fa18b1bcaf0)') called at /Users/olaf/perl5/lib/perl5/Dist/Zilla/Dist/Builder.pm line 442
        Dist::Zilla::Dist::Builder::build_archive('Dist::Zilla::Dist::Builder=HASH(0x7fa18b1bcaf0)') called at /Users/olaf/perl5/lib/perl5/Dist/Zilla/App/Command/build.pm line 66
        Dist::Zilla::App::Command::build::execute('Dist::Zilla::App::Command::build=HASH(0x7fa18b97d918)', 'Getopt::Long::Descriptive::Opts::__OPT__::2=HASH(0x7fa18ba1bf98)', 'ARRAY(0x7fa18a993048)') called at /Users/olaf/perl5/lib/perl5/App/Cmd.pm line 445
        App::Cmd::execute_command('Dist::Zilla::App=HASH(0x7fa18a9d3908)', 'Dist::Zilla::App::Command::build=HASH(0x7fa18b97d918)', 'Getopt::Long::Descriptive::Opts::__OPT__::2=HASH(0x7fa18ba1bf98)') called at /Users/olaf/perl5/lib/perl5/App/Cmd.pm line 312
        App::Cmd::run('Dist::Zilla::App') called at /Users/olaf/perl5/bin/dzil line 12
Owner

oalders commented Jan 28, 2015

@book, before I spend a lot time on this, I figure I'll ask if you have any ideas.

~/Documents/github/archive-any ∙ dzil build
[DZ] beginning to build Archive-Any
[ExtraTests] rewriting release test xt/release/cpan-changes.t
Could not decode UTF-8 t/Acme-POE-Knee-1.10.zip; filename set by GatherDir (Dist::Zilla::Plugin::GatherDir line 215); encoded_content added by GatherDir (Dist::Zilla::Plugin::GatherDir line 216); error was: utf8 "\xD6" does not map to Unicode at /Users/olaf/perl5/lib/perl
5/darwin-thread-multi-2level/Encode.pm line 200.
; maybe you need the [Encoding] plugin to specify an encoding at /Users/olaf/perl5/lib/perl5/Dist/Zilla/Role/File.pm line 153.
        Dist::Zilla::Role::File::_throw('Dist::Zilla::File::OnDisk=HASH(0x7fa18d29fe20)', 'decode UTF-8', 'utf8 "\xD6" does not map to Unicode at /Users/olaf/perl5/lib/...') called at /Users/olaf/perl5/lib/perl5/Dist/Zilla/Role/File.pm line 145
        Dist::Zilla::Role::File::catch {...} ('utf8 "\xD6" does not map to Unicode at /Users/olaf/perl5/lib/...') called at /System/Library/Perl/Extras/5.18/Try/Tiny.pm line 104
        Try::Tiny::try('CODE(0x7fa19046bd50)', 'Try::Tiny::Catch=REF(0x7fa18a601b68)') called at /Users/olaf/perl5/lib/perl5/Dist/Zilla/Role/File.pm line 145
        Dist::Zilla::Role::File::_decode('Dist::Zilla::File::OnDisk=HASH(0x7fa18d29fe20)', 'PK\x{3}\x{4}\x{14}\x{0}\x{2}\x{0}\x{0}\x{0}\x{d6}{\x{17}+\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{13}\x{0}\x{0}\x{0}Acme-POE-Knee-1.10/PK\x{3}\x{4}\x{14}\x{0}
\x{2}\x{0}\x{0}\x{0}\x{d6}{...') called at /Users/olaf/perl5/lib/perl5/Dist/Zilla/Role/MutableFile.pm line 54
        Dist::Zilla::Role::MutableFile::content('Dist::Zilla::File::OnDisk=HASH(0x7fa18d29fe20)') called at /Users/olaf/perl5/lib/perl5/Dist/Zilla/Plugin/AutoPrereqs.pm line 145
        Dist::Zilla::Plugin::AutoPrereqs::register_prereqs('Dist::Zilla::Plugin::AutoPrereqs=HASH(0x7fa18cf6ee40)') called at /Users/olaf/perl5/lib/perl5/Dist/Zilla/Dist/Builder.pm line 325
        Dist::Zilla::Dist::Builder::build_in('Dist::Zilla::Dist::Builder=HASH(0x7fa18b1bcaf0)', undef) called at /Users/olaf/perl5/lib/perl5/Dist/Zilla/Dist/Builder.pm line 389
        Dist::Zilla::Dist::Builder::ensure_built_in('Dist::Zilla::Dist::Builder=HASH(0x7fa18b1bcaf0)') called at /Users/olaf/perl5/lib/perl5/Dist/Zilla/Dist/Builder.pm line 378
        Dist::Zilla::Dist::Builder::ensure_built('Dist::Zilla::Dist::Builder=HASH(0x7fa18b1bcaf0)') called at /Users/olaf/perl5/lib/perl5/Dist/Zilla/Dist/Builder.pm line 442
        Dist::Zilla::Dist::Builder::build_archive('Dist::Zilla::Dist::Builder=HASH(0x7fa18b1bcaf0)') called at /Users/olaf/perl5/lib/perl5/Dist/Zilla/App/Command/build.pm line 66
        Dist::Zilla::App::Command::build::execute('Dist::Zilla::App::Command::build=HASH(0x7fa18b97d918)', 'Getopt::Long::Descriptive::Opts::__OPT__::2=HASH(0x7fa18ba1bf98)', 'ARRAY(0x7fa18a993048)') called at /Users/olaf/perl5/lib/perl5/App/Cmd.pm line 445
        App::Cmd::execute_command('Dist::Zilla::App=HASH(0x7fa18a9d3908)', 'Dist::Zilla::App::Command::build=HASH(0x7fa18b97d918)', 'Getopt::Long::Descriptive::Opts::__OPT__::2=HASH(0x7fa18ba1bf98)') called at /Users/olaf/perl5/lib/perl5/App/Cmd.pm line 312
        App::Cmd::run('Dist::Zilla::App') called at /Users/olaf/perl5/bin/dzil line 12
@book

This comment has been minimized.

Show comment
Hide comment
@book

book Jan 28, 2015

Contributor

Have a look at Dist::Zilla::Plugin::Encoding.

I would add something like this to dist.ini:

[Encoding]
encoding = bytes
filename = t/Acme-POE-Knee-1.10.zip
filename = t/LoadHtml.5_0.tar.gz
filename = t/impolite.tar.gz
filename = t/lib.tgz
filename = t/lib.zip
filename = t/naughty.hominawoof
filename = t/naughty.tar
filename = t/naughty.tar.gz
filename = t/your-0.01.tar.gz

Hope this works.

Contributor

book commented Jan 28, 2015

Have a look at Dist::Zilla::Plugin::Encoding.

I would add something like this to dist.ini:

[Encoding]
encoding = bytes
filename = t/Acme-POE-Knee-1.10.zip
filename = t/LoadHtml.5_0.tar.gz
filename = t/impolite.tar.gz
filename = t/lib.tgz
filename = t/lib.zip
filename = t/naughty.hominawoof
filename = t/naughty.tar
filename = t/naughty.tar.gz
filename = t/your-0.01.tar.gz

Hope this works.

@oalders

This comment has been minimized.

Show comment
Hide comment
@oalders

oalders Jan 28, 2015

Owner

Thanks. That was it! Your challenge is complete. 👍 https://metacpan.org/release/OALDERS/Archive-Any-0.0942

Owner

oalders commented Jan 28, 2015

Thanks. That was it! Your challenge is complete. 👍 https://metacpan.org/release/OALDERS/Archive-Any-0.0942

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment