Skip to content

Commit

Permalink
fixups and cleanups after code review
Browse files Browse the repository at this point in the history
  • Loading branch information
ranguard committed Sep 9, 2016
1 parent cf6c389 commit d8a31be
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions cpanfile
Expand Up @@ -58,10 +58,10 @@ requires 'Moo', '2.000002';
requires 'MooseX::ClassAttribute';
requires 'MooseX::Role::Parameterized', '1.02';
requires 'MooseX::StrictConstructor';
requires 'MooseX::Fastly::Role';
requires 'MooseX::Fastly::Role', '0.01';
requires 'PerlIO::gzip';
requires 'MetaCPAN::Moose';
requires 'MetaCPAN::Role';
requires 'MetaCPAN::Role', '0.02';
requires 'MooseX::Types::Common::Numeric';
requires 'MooseX::Types::Common::String';
requires 'MooseX::Types::Moose';
Expand Down
10 changes: 5 additions & 5 deletions cpanfile.snapshot
Expand Up @@ -2528,12 +2528,12 @@ DISTRIBUTIONS
perl 5.006
strict 0
warnings 0
MetaCPAN-Role-0.01
pathname: L/LL/LLAP/MetaCPAN-Role-0.01.tar.gz
MetaCPAN-Role-0.02
pathname: L/LL/LLAP/MetaCPAN-Role-0.02.tar.gz
provides:
MetaCPAN::Role 0.01
MetaCPAN::Role::Fastly 0.01
MetaCPAN::Role::Fastly::Catalyst 0.01
MetaCPAN::Role 0.02
MetaCPAN::Role::Fastly 0.02
MetaCPAN::Role::Fastly::Catalyst 0.02
requirements:
Carp 0
CatalystX::Fastly::Role::Response 0
Expand Down
1 change: 0 additions & 1 deletion lib/MetaCPAN/Web/Controller/Account/Favorite.pm
Expand Up @@ -26,7 +26,6 @@ sub add : Local : Args(0) {
$res = $model->add_favorite( $data, $c->token )->recv;
}

# TODO: validate these values?
# We need to purge if the rating has changes until the fav count
# is moved from server to client side
$c->purge_author_key( $data->{author} ) if $data->{author};
Expand Down
1 change: 0 additions & 1 deletion lib/MetaCPAN/Web/Controller/Feed.pm
Expand Up @@ -15,7 +15,6 @@ use Importer 'MetaCPAN::Web::Elasticsearch::Adapter' =>

sub feed_index : PathPart('feed') : Chained('/') : CaptureArgs(0) {
my ( $self, $c ) = @_;

}

sub recent : Chained('feed_index') PathPart Args(0) {
Expand Down
4 changes: 2 additions & 2 deletions lib/MetaCPAN/Web/Controller/Recent.pm
Expand Up @@ -18,9 +18,9 @@ sub index : Path : Args(0) {
my $latest = [ map { $_->{fields} } @{ $data->{hits}->{hits} } ];
single_valued_arrayref_to_scalar($latest);

$c->add_surrogate_key('RECENT');
$c->add_surrogate_key('RECENT','DIST_UPDATES');
$c->browser_max_age('1m');
$c->cdn_max_age('1m'); # tough to paging for now
$c->cdn_max_age('1y'); # DIST_UPDATES will purge it

$c->stash(
{
Expand Down
2 changes: 1 addition & 1 deletion t/controller/pod.t
Expand Up @@ -28,7 +28,7 @@ test_psgi app, sub {
is(
$res->headers->header('Surrogate-Key'),
'dist=MOOSE author=ETHER content_type=text/html content_type=text',
'Surrogate-Key dist/author/content typ'
'Surrogate-Key dist/author/content type'
);

my $tx2 = tx($res);
Expand Down

0 comments on commit d8a31be

Please sign in to comment.