Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ insert_final_newline = true
# There's no reason to keep this, it just seems to be the overwhelming style currently.
[*.html]
indent_size = 2
[*.tx]
indent_size = 2

[.travis.yml]
indent_size = 2
43 changes: 0 additions & 43 deletions app.psgi
Original file line number Diff line number Diff line change
Expand Up @@ -53,49 +53,6 @@ my $tempdir = is_linux_container() ? "/var/tmp" : "$root_dir/var/tmp";

STDERR->autoflush;

# rmtree causes warnings when tests are running
if ( !$dev_mode && !$ENV{HARNESS_ACTIVE} ) {
my $view = MetaCPAN::Web->view('HTML');

if ( my $tmpl_cache = $view->config->{COMPILE_DIR} ) {
File::Path::rmtree( [ glob "$tmpl_cache/*" ] );
}

my @tmpl_dir = @{ $view->include_path };
my $alloy = Template::Alloy->new( $view->config );

s{/\z}{} for @tmpl_dir;

my @templates;
for my $tmpl_dir (@tmpl_dir) {
File::Find::find(
{
no_chdir => 1,
wanted => sub {
if ( $_ eq $tmpl_dir . '/static' ) {
$File::Find::prune = 1;
return;
}

return
if -d;

push @templates, File::Spec->abs2rel( $_, $tmpl_dir );
},
},
$tmpl_dir,
);
}

for my $template (@templates) {

# might fail if we try to load something that isn't actually a
# template, and it can't be parsed. Although that shouldn't happen
# because we are skipping static files.
eval { $alloy->load_template($template) };
}
}

# explicitly call ->to_app on every Plack::App::* for performance
builder {

Expand Down
7 changes: 4 additions & 3 deletions cpanfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ requires 'Catalyst::Plugin::ConfigLoader';
requires 'Catalyst::Plugin::Static::Simple';
requires 'Catalyst::TraitFor::Request::REST::ForBrowsers';
requires 'Catalyst::View::JSON';
requires 'Catalyst::View::TT::Alloy';
requires 'Catalyst::View::Xslate';
requires 'CatalystX::Fastly::Role::Response', '0.06';
requires 'Config::General';
requires 'Config::ZOMG', '1.000000';
Expand Down Expand Up @@ -73,10 +73,12 @@ requires 'Plack::Session';
requires 'Plack::Test';
requires 'Ref::Util', '>= 0.008';
requires 'Starman', '>= 0.4008';
requires 'Template::Alloy', '== 1.020';
requires 'Term::Size::Any';
requires 'Text::MultiMarkdown';
requires 'Text::Pluralize';
requires 'Text::Xslate::Bridge';
requires 'Text::Xslate::Bridge::Star';
requires 'Text::Xslate::Util';
requires 'Try::Tiny', '0.24';
requires 'Type::Library';
requires 'Types::Common::Numeric';
Expand All @@ -96,7 +98,6 @@ requires 'aliased', '0.34';
requires 'App::Prove';
requires 'Code::TidyAll', '>= 0.74';
requires 'Code::TidyAll::Plugin::Test::Vars', '0.04';
requires 'Path::Iterator::Rule', '1.008';
requires 'Perl::Critic', '1.136';
requires 'Perl::Tidy' => '20210402';
requires 'Test::Code::TidyAll';
Expand Down
183 changes: 110 additions & 73 deletions cpanfile.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -610,23 +610,18 @@ DISTRIBUTIONS
ExtUtils::MakeMaker 0
JSON::MaybeXS 1.003000
MRO::Compat 0
Catalyst-View-TT-Alloy-0.00007
pathname: D/DJ/DJZORT/Catalyst-View-TT-Alloy-0.00007.tar.gz
Catalyst-View-Xslate-0.00019
pathname: D/DM/DMAKI/Catalyst-View-Xslate-0.00019.tar.gz
provides:
Catalyst::Helper::View::TT::Alloy 0.00007
Catalyst::View::TT::Alloy 0.00007
Catalyst::Helper::View::Xslate undef
Catalyst::View::Xslate 0.00019
requirements:
Carp 0
Catalyst 5.7
Data::Dump 0
ExtUtils::MakeMaker 0
Path::Class 0
Catalyst 5.8
ExtUtils::MakeMaker 6.36
File::Find 0
Module::Build 0.38
Scalar::Util 0
Template::Alloy 0
parent 0
perl 5.006
strict 0
warnings 0
Text::Xslate 0.1045
CatalystX-Fastly-Role-Response-0.07
pathname: L/LL/LLAP/CatalystX-Fastly-Role-Response-0.07.tar.gz
provides:
Expand Down Expand Up @@ -954,6 +949,18 @@ DISTRIBUTIONS
Symbol 0
Test 0
perl 5.006
Data-MessagePack-1.01
pathname: S/SY/SYOHEX/Data-MessagePack-1.01.tar.gz
provides:
Data::MessagePack 1.01
Data::MessagePack::Boolean undef
Data::MessagePack::PP undef
requirements:
ExtUtils::CBuilder 0
Math::BigInt 1.89
Module::Build 0.4005
Module::Build::XSUtil 0.19
perl 5.008001
Data-OptList-0.110
pathname: R/RJ/RJBS/Data-OptList-0.110.tar.gz
provides:
Expand Down Expand Up @@ -3014,6 +3021,21 @@ DISTRIBUTIONS
perl 5.006
strict 0
warnings 0
Module-Build-XSUtil-0.19
pathname: H/HI/HIDEAKIO/Module-Build-XSUtil-0.19.tar.gz
provides:
Module::Build::XSUtil 0.19
requirements:
Devel::CheckCompiler 0
Devel::PPPort 0
Exporter 0
ExtUtils::CBuilder 0
File::Basename 0
File::Path 0
Module::Build 0.4005
XSLoader 0
parent 0
perl 5.008001
Module-CPANfile-1.1004
pathname: M/MI/MIYAGAWA/Module-CPANfile-1.1004.tar.gz
provides:
Expand Down Expand Up @@ -3719,6 +3741,44 @@ DISTRIBUTIONS
perl 5.008
strict 0
warnings 0
Mouse-v2.5.10
pathname: S/SK/SKAJI/Mouse-v2.5.10.tar.gz
provides:
Mouse v2.5.10
Mouse::Exporter undef
Mouse::Meta::Attribute undef
Mouse::Meta::Class undef
Mouse::Meta::Method undef
Mouse::Meta::Method::Accessor undef
Mouse::Meta::Method::Constructor undef
Mouse::Meta::Method::Delegation undef
Mouse::Meta::Method::Destructor undef
Mouse::Meta::Module undef
Mouse::Meta::Role undef
Mouse::Meta::Role::Application undef
Mouse::Meta::Role::Application::RoleSummation undef
Mouse::Meta::Role::Composite undef
Mouse::Meta::Role::Method undef
Mouse::Meta::TypeConstraint undef
Mouse::Object undef
Mouse::PurePerl undef
Mouse::Role v2.5.10
Mouse::Spec v2.5.10
Mouse::TypeRegistry undef
Mouse::Util v2.5.10
Mouse::Util::MetaRole undef
Mouse::Util::TypeConstraints undef
Squirrel undef
Squirrel::Role undef
Test::Mouse undef
ouse undef
requirements:
ExtUtils::CBuilder 0
Module::Build 0.4005
Module::Build::XSUtil 0.19
Scalar::Util 1.14
XSLoader 0.02
perl 5.008005
Mozilla-CA-20200520
pathname: A/AB/ABH/Mozilla-CA-20200520.tar.gz
provides:
Expand Down Expand Up @@ -3987,13 +4047,6 @@ DISTRIBUTIONS
POSIX 0
Socket 0
Time::HiRes 0
Number-Compare-0.03
pathname: R/RC/RCLAMP/Number-Compare-0.03.tar.gz
provides:
Number::Compare 0.03
requirements:
ExtUtils::MakeMaker 0
Test::More 0
Number-Format-1.75
pathname: W/WR/WRW/Number-Format-1.75.tar.gz
provides:
Expand Down Expand Up @@ -4445,26 +4498,6 @@ DISTRIBUTIONS
overload 0
parent 0
strict 0
Path-Iterator-Rule-1.014
pathname: D/DA/DAGOLDEN/Path-Iterator-Rule-1.014.tar.gz
provides:
PIR 1.014
Path::Iterator::Rule 1.014
requirements:
Carp 0
ExtUtils::MakeMaker 6.17
File::Basename 0
File::Spec 0
List::Util 0
Number::Compare 0.02
Scalar::Util 0
Text::Glob 0
Try::Tiny 0
if 0
perl 5.008001
strict 0
warnings 0
warnings::register 0
Path-Tiny-0.118
pathname: D/DA/DAGOLDEN/Path-Tiny-0.118.tar.gz
provides:
Expand Down Expand Up @@ -5320,29 +5353,6 @@ DISTRIBUTIONS
Scalar::Util 1.14
perl 5.006
strict 0
Template-Alloy-1.020
pathname: R/RH/RHANDOM/Template-Alloy-1.020.tar.gz
provides:
Template::Alloy 1.020
Template::Alloy::Compile undef
Template::Alloy::Context undef
Template::Alloy::EvalPerlHandle undef
Template::Alloy::Exception undef
Template::Alloy::HTE undef
Template::Alloy::Iterator undef
Template::Alloy::Operator undef
Template::Alloy::Parse undef
Template::Alloy::Perl undef
Template::Alloy::Play undef
Template::Alloy::Stream undef
Template::Alloy::TT undef
Template::Alloy::Tmpl undef
Template::Alloy::VMethod undef
Template::Alloy::Velocity undef
Template::Alloy::_ContextStash undef
requirements:
Digest::MD5 1
ExtUtils::MakeMaker 0
Term-Size-Any-0.002
pathname: F/FE/FERREIRA/Term-Size-Any-0.002.tar.gz
provides:
Expand Down Expand Up @@ -5694,15 +5704,6 @@ DISTRIBUTIONS
Exporter 0
ExtUtils::MakeMaker 0
perl 5.006
Text-Glob-0.11
pathname: R/RC/RCLAMP/Text-Glob-0.11.tar.gz
provides:
Text::Glob 0.11
requirements:
Exporter 0
ExtUtils::MakeMaker 0
constant 0
perl 5.00503
Text-Markdown-1.000031
pathname: B/BO/BOBTFISH/Text-Markdown-1.000031.tar.gz
provides:
Expand Down Expand Up @@ -5746,6 +5747,42 @@ DISTRIBUTIONS
ExtUtils::MakeMaker 0
Test::More 0
perl 5.008001
Text-Xslate-v3.5.8
pathname: S/SK/SKAJI/Text-Xslate-v3.5.8.tar.gz
provides:
Text::Xslate v3.5.8
Text::Xslate::Bridge undef
Text::Xslate::Bridge::Star undef
Text::Xslate::Compiler undef
Text::Xslate::Engine v3.5.8
Text::Xslate::HashWithDefault undef
Text::Xslate::PP v3.5.8
Text::Xslate::PP::Const undef
Text::Xslate::PP::Method undef
Text::Xslate::PP::Opcode v3.5.8
Text::Xslate::PP::State undef
Text::Xslate::PP::Type::Macro undef
Text::Xslate::PP::Type::Pair undef
Text::Xslate::PP::Type::Raw undef
Text::Xslate::Parser undef
Text::Xslate::Runner undef
Text::Xslate::Symbol undef
Text::Xslate::Syntax::Kolon undef
Text::Xslate::Syntax::Metakolon undef
Text::Xslate::Syntax::TTerse undef
Text::Xslate::Type::Raw undef
Text::Xslate::Util undef
requirements:
Data::MessagePack 0.38
Encode 2.26
ExtUtils::CBuilder 0
Module::Build 0.4005
Module::Build::XSUtil 0.19
Mouse v2.5.0
Scalar::Util 1.14
Storable 2.15
parent 0.221
perl 5.008001
Tie-Handle-Offset-0.004
pathname: D/DA/DAGOLDEN/Tie-Handle-Offset-0.004.tar.gz
provides:
Expand Down
1 change: 1 addition & 0 deletions lib/MetaCPAN/Web.pm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ __PACKAGE__->response_class_traits( [ qw(

__PACKAGE__->config(
name => 'MetaCPAN::Web',
default_view => 'Xslate',
disable_component_resolution_regex_fallback => 1,
encoding => 'UTF-8',
'Plugin::Authentication' => {
Expand Down
Loading