Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' into oalders/sponsors
  • Loading branch information
mickeyn committed May 14, 2017
2 parents 52832e9 + 9547e3f commit 5038d82
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/MetaCPAN/Web/Model/API/Contributors.pm
Expand Up @@ -27,6 +27,9 @@ sub get {
my ( $self, $author, $release ) = @_;
my $cv = $self->cv;

# If there's no release, we'll just redirect
$release //= {};

$self->request( '/release/contributors/' . $author . '/' . $release, )
->cb(
sub {
Expand Down
1 change: 1 addition & 0 deletions lib/MetaCPAN/Web/View/HTML.pm
Expand Up @@ -204,6 +204,7 @@ Template::Alloy->define_vmethod(
my ( $text, $count ) = @_;

# Send args individually since the sub has a prototype.
$count //= 0;
return Text::Pluralize::pluralize( $text, $count );
},
);
Expand Down
2 changes: 1 addition & 1 deletion t/controller/feed.t
Expand Up @@ -106,7 +106,7 @@ test_psgi app, sub {

test_redirect( $cb, 'oalders' );

subtest '404' => sub {
subtest 'author 404' => sub {
my $res = $cb->( GET '/feed/author/XXX343wi^^^' );
is( $res->code, 404, '404 when author does not exist' );
};
Expand Down

0 comments on commit 5038d82

Please sign in to comment.