mirror of
https://framagit.org/fiat-tux/hat-softwares/lutim.git
synced 2026-03-28 17:42:54 +01:00
Fix #80 Gzip static assets with Mojolicious::Plugin::GzipStatic
This commit is contained in:
1
cpanfile
1
cpanfile
@@ -7,6 +7,7 @@ requires 'Net::Domain::TLD', '>= 1.75'; # Must have the last version to handle (
|
||||
requires 'Mojolicious::Plugin::I18N';
|
||||
requires 'Mojolicious::Plugin::DebugDumperHelper';
|
||||
requires 'Mojolicious::Plugin::StaticCache';
|
||||
requires 'Mojolicious::Plugin::GzipStatic';
|
||||
requires 'Text::Unidecode';
|
||||
requires 'DateTime';
|
||||
requires 'Filesys::DiskUsage';
|
||||
|
||||
@@ -1933,6 +1933,14 @@ DISTRIBUTIONS
|
||||
requirements:
|
||||
ExtUtils::MakeMaker 0
|
||||
Mojolicious 6.11
|
||||
Mojolicious-Plugin-GzipStatic-0.04
|
||||
pathname: L/LD/LDIDRY/Mojolicious-Plugin-GzipStatic-0.04.tar.gz
|
||||
provides:
|
||||
Mojolicious::Plugin::GzipStatic 0.04
|
||||
requirements:
|
||||
ExtUtils::MakeMaker 0
|
||||
IO::Compress::Gzip 0
|
||||
Mojolicious 7.75
|
||||
Mojolicious-Plugin-I18N-1.6
|
||||
pathname: S/SH/SHARIFULN/Mojolicious-Plugin-I18N-1.6.tar.gz
|
||||
provides:
|
||||
|
||||
@@ -102,6 +102,9 @@ sub startup {
|
||||
eval qq(use lib "$lib");
|
||||
$self->plugin('I18N');
|
||||
|
||||
# Static assets gzipping
|
||||
$self->plugin('GzipStatic');
|
||||
|
||||
# Cache static files
|
||||
$self->plugin('StaticCache');
|
||||
|
||||
|
||||
@@ -66,6 +66,9 @@ sub startup {
|
||||
}
|
||||
push @{$self->static->paths}, $self->home->rel_file('themes/default/public');
|
||||
|
||||
# Static assets gzipping
|
||||
$self->plugin('GzipStatic');
|
||||
|
||||
# Cache static files
|
||||
$self->plugin('StaticCache');
|
||||
|
||||
|
||||
5
t/test.t
5
t/test.t
@@ -65,6 +65,11 @@ $t->get_ok('/')
|
||||
->status_is(200)
|
||||
->content_like(qr/Let's Upload That IMage/i);
|
||||
|
||||
# Gzip static assets
|
||||
$t->get_ok('/css/lutim.css')
|
||||
->status_is(200)
|
||||
->header_is(Vary => 'Accept-Encoding');
|
||||
|
||||
# Instance settings informations
|
||||
$t->get_ok('/infos')
|
||||
->status_is(200)
|
||||
|
||||
@@ -32,11 +32,11 @@ msgstr ""
|
||||
msgid "-or-"
|
||||
msgstr ""
|
||||
|
||||
#: lib/Lutim.pm:214 lib/Lutim/Command/cron/stats.pm:151 lib/Lutim/Command/cron/stats.pm:162 lib/Lutim/Command/cron/stats.pm:179 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38
|
||||
#: lib/Lutim.pm:217 lib/Lutim/Command/cron/stats.pm:151 lib/Lutim/Command/cron/stats.pm:162 lib/Lutim/Command/cron/stats.pm:179 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38
|
||||
msgid "1 year"
|
||||
msgstr ""
|
||||
|
||||
#: lib/Lutim.pm:213 lib/Lutim/Command/cron/stats.pm:148 lib/Lutim/Command/cron/stats.pm:159 lib/Lutim/Command/cron/stats.pm:176 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/lutim.js.ep:151 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7
|
||||
#: lib/Lutim.pm:216 lib/Lutim/Command/cron/stats.pm:148 lib/Lutim/Command/cron/stats.pm:159 lib/Lutim/Command/cron/stats.pm:176 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/lutim.js.ep:151 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7
|
||||
msgid "24 hours"
|
||||
msgstr ""
|
||||
|
||||
@@ -495,7 +495,7 @@ msgstr ""
|
||||
msgid "core developer"
|
||||
msgstr ""
|
||||
|
||||
#: lib/Lutim.pm:212 lib/Lutim/Command/cron/stats.pm:147 lib/Lutim/Command/cron/stats.pm:158 lib/Lutim/Command/cron/stats.pm:175 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6
|
||||
#: lib/Lutim.pm:215 lib/Lutim/Command/cron/stats.pm:147 lib/Lutim/Command/cron/stats.pm:158 lib/Lutim/Command/cron/stats.pm:175 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6
|
||||
msgid "no time limit"
|
||||
msgstr ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user