File tree Expand file tree Collapse file tree 3 files changed +26
-11
lines changed Expand file tree Collapse file tree 3 files changed +26
-11
lines changed Original file line number Diff line number Diff line change
1
+ ! /root /assets /.gitignore
1
2
* .bak
2
3
* .sw *
3
4
.DS_Store
17
18
/node_modules /
18
19
/perltidy.LOG
19
20
/pm_to_blib
21
+ /root /assets
20
22
/root /static /sitemaps
21
23
/tidyall.ERR
22
24
/var
23
- /root /assets
24
- ! /root /assets /.gitignore
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ use Plack::App::File ();
6
6
use JavaScript::Minifier::XS ();
7
7
use Cwd qw( cwd ) ;
8
8
use Plack::MIME ();
9
- use JSON::MaybeXS ();
9
+ use JSON::MaybeXS ();
10
10
11
11
Plack::MIME-> add_type(
12
12
' .eot' => ' application/vnd.ms-fontobject' ,
@@ -40,7 +40,7 @@ sub wrap {
40
40
};
41
41
42
42
my $assets ;
43
- if (!$dev_mode ) {
43
+ if ( !$dev_mode ) {
44
44
$assets = $get_assets -> ();
45
45
}
46
46
@@ -101,11 +101,12 @@ sub wrap {
101
101
mount ' /assets' => sub {
102
102
my $env = shift ;
103
103
my $res = $assets_app -> ($env );
104
- push @{ $res -> [1] }, (
104
+ push @{ $res -> [1] },
105
+ (
105
106
' Cache-Control' => " public, max-age=${year_ttl} , immutable" ,
106
- ' Surrogate-Key' => ' assets' ,
107
+ ' Surrogate-Key' => ' assets' ,
107
108
' Surrogate-Control' => " max-age=${year_ttl} " ,
108
- );
109
+ );
109
110
return $res ;
110
111
};
111
112
Original file line number Diff line number Diff line change 3
3
use strict;
4
4
use warnings;
5
5
6
- # This test is _really_ slow on Travis with Devel::Cover running. Also,
6
+ # This test is _really_ slow with Devel::Cover running. Also,
7
7
# there's really no reason to run this when coverage tests are running, since
8
8
# it's not bringing anything to the table.
9
+ use Test::More $ENV {COVERAGE }
10
+ ? ( skip_all => ' skip under Devel::Cover' )
11
+ : ();
12
+
13
+ use File::Temp ();
9
14
10
15
use Test::Code::TidyAll qw( tidyall_ok ) ;
11
- use Test::More
12
- do { $ENV {COVERAGE } ? ( skip_all => ' skip under Devel::Cover' ) : () };
13
- tidyall_ok( verbose => $ENV {TEST_TIDYALL_VERBOSE } );
16
+
17
+ my %opts = ( verbose => $ENV {TEST_TIDYALL_VERBOSE }, );
18
+
19
+ if ( -e ' .tidyall.d' ? !-w _ : !-w ' .' ) {
20
+ $opts {data_dir } = File::Temp::tempdir(
21
+ TEMPLATE => ' tidyall-XXXXXX' ,
22
+ TMPDIR => 1,
23
+ CLEANUP => 1,
24
+ );
25
+ }
26
+
27
+ tidyall_ok(%opts );
14
28
15
29
done_testing();
You can’t perform that action at this time.
0 commit comments