Skip to content
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

Bugfix metadata links #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ distribution_type: module
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.3.html
version: 1.3
resources:
bugtracker: https://rt.dummy.cpan.org/Public/Dist/Display.html?Name=CPAN-Test-Dummy-Perl5-Make-Features
2 changes: 1 addition & 1 deletion dist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fake_home = 1 ; fakes $ENV{HOME} just in case
[PodSyntaxTests] ; xt/release/pod-syntax.t
[PodCoverageTests] ; xt/release/pod-coverage.t
;[Test::Portability] ; xt/release/portability.t (of file name) ; disabled because of long filenames in the test cpan mirrors
[KwaliteeTests] ; xt/release/kwalitee.t
[Test::Kwalitee] ; xt/release/kwalitee.t
[Test::Version] ; xt/release/test-version.t

; metadata
Expand Down
2 changes: 1 addition & 1 deletion lib/CPAN/Mini/Webserver/Templates.pm
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ private template 'metadata' => sub {
dt { ucfirst $datum; }
dd {
a {
attr { href => $arguments->{base_url} . $meta->{resources}->{$datum}; };
attr { href => $meta->{resources}->{$datum}; };
$meta->{resources}->{$datum};
}

Expand Down
6 changes: 6 additions & 0 deletions t/simple.t
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ like( $html, qr{$desc} );
redirect_ok( "/~$cpan_id/$dist/$dist/lib/$module", "/package/$cpan_id/$dist/Bundle::CpanTestDummies/" );
error404_ok( "/package/$cpan_id/$dist/Bundle::CpanTestDummies2/" );

# Metadata links
my $mddist = 'CPAN-Test-Dummy-Perl5-Make-Features-1.06';
$html = html_page_ok( "/~$cpan_id/$mddist" );
my $mdurl = quotemeta 'https://rt.dummy.cpan.org/Public/Dist/Display.html?Name=CPAN-Test-Dummy-Perl5-Make-Features';
like ( $html, qr{<a href="$mdurl">$mdurl</a>} );

# 'static' files
css_ok( '/static/css/screen.css' );
css_ok( '/static/css/print.css' );
Expand Down