Skip to content

Commit

Permalink
Merge pull request #521 from metacpan/leo/fastly_purge_and_headers
Browse files Browse the repository at this point in the history
Leo/fastly purge and headers
  • Loading branch information
oalders committed Nov 17, 2016
2 parents 34f1502 + c40c45b commit 3e915eb
Show file tree
Hide file tree
Showing 36 changed files with 532 additions and 329 deletions.
5 changes: 4 additions & 1 deletion cpanfile
Expand Up @@ -27,6 +27,7 @@ requires 'Catalyst::View::JSON', '0.36';
requires 'CatalystX::Component::Traits';
requires 'CatalystX::InjectComponent';
requires 'CatalystX::RoleApplicator';
requires 'CatalystX::Fastly::Role::Response', '0.06';
requires 'CPAN::Repository::Perms';
requires 'Config::JFDI';
requires 'Cpanel::JSON::XS', '3.0115';
Expand Down Expand Up @@ -86,6 +87,7 @@ requires 'Log::Contextual';
requires 'Log::Log4perl';
requires 'Log::Log4perl::Appender::ScreenColoredLevels';
requires 'MetaCPAN::Moose';
requires 'MetaCPAN::Role', '0.03';
requires 'Minion', '>= 5.01';
requires 'Minion::Backend::SQLite';
requires 'Module::Load';
Expand All @@ -103,6 +105,7 @@ requires 'MooseX::ClassAttribute';
requires 'MooseX::Getopt';
requires 'MooseX::Getopt::Dashes';
requires 'MooseX::Getopt::OptionTypeMap';
requires 'MooseX::Fastly::Role', '0.01';
requires 'MooseX::StrictConstructor';
requires 'MooseX::Types';
requires 'MooseX::Types::Common::String';
Expand All @@ -113,7 +116,7 @@ requires 'MooseX::Types::Structured';
requires 'MooseX::Types::URI';
requires 'Mozilla::CA';
requires 'Net::DNS::Paranoid';
requires 'Net::Fastly', '1.03';
requires 'Net::Fastly', '1.05';
requires 'Net::OpenID::Consumer';
requires 'Net::Twitter', '4.01010';
requires 'OrePAN2';
Expand Down
30 changes: 30 additions & 0 deletions cpanfile.snapshot
Expand Up @@ -884,6 +884,14 @@ DISTRIBUTIONS
MooseX::Traits::Pluggable 0
Scalar::Util 0
namespace::autoclean 0
CatalystX-Fastly-Role-Response-0.06
pathname: L/LL/LLAP/CatalystX-Fastly-Role-Response-0.06.tar.gz
provides:
CatalystX::Fastly::Role::Response 0.06
requirements:
Carp 0
ExtUtils::MakeMaker 0
Moose::Role 0
CatalystX-InjectComponent-0.025
pathname: R/RO/ROKR/CatalystX-InjectComponent-0.025.tar.gz
provides:
Expand Down Expand Up @@ -4193,6 +4201,19 @@ DISTRIBUTIONS
perl 5.006
strict 0
warnings 0
MetaCPAN-Role-0.03
pathname: L/LL/LLAP/MetaCPAN-Role-0.03.tar.gz
provides:
MetaCPAN::Role 0.03
MetaCPAN::Role::Fastly 0.03
MetaCPAN::Role::Fastly::Catalyst 0.03
requirements:
Carp 0
CatalystX::Fastly::Role::Response 0.04
ExtUtils::MakeMaker 0
Moose::Role 0
MooseX::Fastly::Role 0.01
Net::Fastly 1.05
Minion-5.08
pathname: S/SR/SRI/Minion-5.08.tar.gz
provides:
Expand Down Expand Up @@ -5190,6 +5211,15 @@ DISTRIBUTIONS
Test::Exception 0
Test::More 0
namespace::clean 0
MooseX-Fastly-Role-0.01
pathname: L/LL/LLAP/MooseX-Fastly-Role-0.01.tar.gz
provides:
MooseX::Fastly::Role 0.01
requirements:
Carp 0
ExtUtils::MakeMaker 0
Moose::Role 0
Net::Fastly 1.05
MooseX-Getopt-0.70
pathname: D/DR/DROLSKY/MooseX-Getopt-0.70.tar.gz
provides:
Expand Down
248 changes: 0 additions & 248 deletions lib/MetaCPAN/Role/Fastly.pm

This file was deleted.

7 changes: 6 additions & 1 deletion lib/MetaCPAN/Role/HasConfig.pm
Expand Up @@ -6,7 +6,12 @@ use MetaCPAN::Types qw(HashRef);

use FindBin;

has config => (
# Done like this so can be required by a roles
sub config {
return $_[0]->_config;
}

has _config => (
is => 'ro',
isa => HashRef,
lazy => 1,
Expand Down
11 changes: 5 additions & 6 deletions lib/MetaCPAN/Role/Script.pm
@@ -1,7 +1,6 @@
package MetaCPAN::Role::Script;

use strict;
use warnings;
use Moose::Role;

use ElasticSearchX::Model::Document::Types qw(:all);
use FindBin;
Expand All @@ -10,9 +9,12 @@ use Log::Contextual qw( :log :dlog );
use MetaCPAN::Model;
use MetaCPAN::Types qw(:all);
use MetaCPAN::Queue ();
use Moose::Role;

use Carp ();

with( 'MetaCPAN::Role::HasConfig', 'MetaCPAN::Role::Fastly',
'MetaCPAN::Role::Logger' );

has cpan => (
is => 'ro',
isa => Dir,
Expand Down Expand Up @@ -95,9 +97,6 @@ has queue => (
documentation => 'add indexing jobs to the minion queue',
);

with 'MetaCPAN::Role::Fastly', 'MetaCPAN::Role::HasConfig',
'MetaCPAN::Role::Logger';

sub handle_error {
my ( $self, $error ) = @_;

Expand Down

0 comments on commit 3e915eb

Please sign in to comment.