Skip to content

Commit

Permalink
Fix sidebar explorer link for releases
Browse files Browse the repository at this point in the history
closes #1075.
  • Loading branch information
rwstauner committed Feb 5, 2014
1 parent 08b9494 commit 5353ac2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion root/inc/release-tools.html
Expand Up @@ -10,7 +10,7 @@
</li>
<%- END %>
<li>
<a href="http://explorer.metacpan.org/?url=/module/<% release.author %>/<% release.name %>/<% module.path %>">
<a href="http://explorer.metacpan.org/?url=/<% module ? ['module', module.author, module.release, module.path].join("/") : ['release', release.author, release.name].join("/") %>">
<i class="icon-list-alt"></i> MetaCPAN Explorer
</a>
</li>
Expand Down
9 changes: 8 additions & 1 deletion t/controller/shared/release-info.t
Expand Up @@ -191,7 +191,14 @@ test_psgi app, sub {
'reverse deps link uses dist name'
);

# TODO: explorer
$tx->like(
'//a[starts-with(@href, "http://explorer.metacpan.org/?url")]/@href',
$type eq 'module' ?
qr!\?url=/module/\w+/${release}-${version}/.+!
: qr!\?url=/release/\w+/${release}-${version}\z!,
'explorer link points to module file or release',
);

# TODO: activity
}
}
Expand Down

0 comments on commit 5353ac2

Please sign in to comment.