Skip to content
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/local/
/log4perl_local.conf
/metacpan_server_local.*
/metacpan_server_testing_local.*
/perltidy.LOG
/pm_to_blib
/var
Expand Down
11 changes: 6 additions & 5 deletions lib/MetaCPAN/Server.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ use Moose;

## no critic (Modules::RequireEndWithOne)
use Catalyst qw( +MetaCPAN::Role::Fastly::Catalyst ), '-Log=warn,error,fatal';
use Digest::SHA ();
use Log::Log4perl::Catalyst ();
use Plack::Builder qw( builder enable );
use Ref::Util qw( is_arrayref is_hashref );
use Digest::SHA ();
use Log::Log4perl::Catalyst ();
use Plack::Builder qw( builder enable );
use Ref::Util qw( is_arrayref is_hashref );
use MetaCPAN::Server::Config ();

extends 'Catalyst';

Expand Down Expand Up @@ -72,9 +73,9 @@ __PACKAGE__->config(

__PACKAGE__->log( Log::Log4perl::Catalyst->new( undef, autoflush => 1 ) );

__PACKAGE__->config( MetaCPAN::Server::Config::config() );
__PACKAGE__->setup( qw(
Static::Simple
ConfigLoader
Session
Session::Store::ElasticSearch
Session::State::Cookie
Expand Down
6 changes: 3 additions & 3 deletions lib/MetaCPAN/Server/Config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ sub _zomg {
my $path = shift;

my $config = Config::ZOMG->new(
local_suffix => $ENV{HARNESS_ACTIVE} ? 'testing' : 'local',
name => 'metacpan_server',
path => $path,
name => 'metacpan_server'
. ( $ENV{HARNESS_ACTIVE} ? '_testing' : '' ),
path => $path,
);

my $c = $config->open;
Expand Down
19 changes: 16 additions & 3 deletions metacpan_server_testing.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
git: /usr/bin/git
cpan: var/t/tmp/fakecpan
die_on_error: 1
level: warn
Expand All @@ -8,17 +9,29 @@ elasticsearch_servers:
client: '2_0::Direct'
nodes: http://elasticsearch_test:9200

minion_dsn: "postgresql://metacpan:t00lchain@pghost:5432/minion_queue"

logger:
class: Log::Log4perl::Appender::Screen
name: testing

github_key: foo
github_secret: bar

secret: weak

smtp:
host: smtp.fastmail.com
port: 465
username: [email protected]
password: seekrit

oauth:
github:
key: seekrit
secret: seekrit
google:
key: seekrit
secret: seekrit
twitter:
key: seekrit
secret: seekrit

front_end_url: http://0.0.0.0:5001