projects
/
gruntmaster-page.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ce37ae0
)
Make Gruntmaster::Page::Base::variants not need overriding
author
Marius Gavrilescu
<marius@ieval.ro>
Sat, 22 Feb 2014 10:29:53 +0000
(12:29 +0200)
committer
Marius Gavrilescu
<marius@ieval.ro>
Sat, 22 Feb 2014 10:30:22 +0000
(12:30 +0200)
lib/Gruntmaster/Page/Base.pm
patch
|
blob
|
blame
|
history
lib/Gruntmaster/Page/CSS.pm
patch
|
blob
|
blame
|
history
lib/Gruntmaster/Page/JS.pm
patch
|
blob
|
blame
|
history
lib/Gruntmaster/Page/Passwd.pm
patch
|
blob
|
blame
|
history
lib/Gruntmaster/Page/Register.pm
patch
|
blob
|
blame
|
history
lib/Gruntmaster/Page/Src.pm
patch
|
blob
|
blame
|
history
lib/Gruntmaster/Page/Submit.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Gruntmaster/Page/Base.pm
b/lib/Gruntmaster/Page/Base.pm
index 6ced6145a68eff7367d87293f4963258fa861985..475be80d6952521e4d0fc96c6c82881913b64764 100644
(file)
--- a/
lib/Gruntmaster/Page/Base.pm
+++ b/
lib/Gruntmaster/Page/Base.pm
@@
-92,6
+92,7
@@
sub vary { '' }
sub max_age { 60 }
sub variants {
sub max_age { 60 }
sub variants {
+ return [] unless exists $templates{$_[0]};
[ map { [ $_, 1, 'text/html', undef, undef, $_, undef ]} keys $templates{$_[0]} ]
}
[ map { [ $_, 1, 'text/html', undef, undef, $_, undef ]} keys $templates{$_[0]} ]
}
diff --git
a/lib/Gruntmaster/Page/CSS.pm
b/lib/Gruntmaster/Page/CSS.pm
index 2553ab6e5c0833f9371850f83a39d59031b5f65c..7165c3adefc8d4bef306b60fd4ba4615c55ca063 100644
(file)
--- a/
lib/Gruntmaster/Page/CSS.pm
+++ b/
lib/Gruntmaster/Page/CSS.pm
@@
-19,6
+19,4
@@
sub generate{
[200, ['Content-Type' => 'text/css', 'Cache-Control' => 'public, max-age=604800', 'X-Forever' => 1], [minify $css] ]
}
[200, ['Content-Type' => 'text/css', 'Cache-Control' => 'public, max-age=604800', 'X-Forever' => 1], [minify $css] ]
}
-sub variants{ [[css => 1, 'text/css', undef, undef, undef, undef]] }
-
1
1
diff --git
a/lib/Gruntmaster/Page/JS.pm
b/lib/Gruntmaster/Page/JS.pm
index b8ddafba37e714c23349ca4f24fb494c96fd52cc..fbaf3daaa163186ae1544a1b4139357a7d0d14d4 100644
(file)
--- a/
lib/Gruntmaster/Page/JS.pm
+++ b/
lib/Gruntmaster/Page/JS.pm
@@
-18,6
+18,4
@@
sub generate{
[200, ['Content-Type' => 'application/javascript', 'Cache-Control' => 'public, max-age=604800', 'X-Forever' => 1], [minify $js] ]
}
[200, ['Content-Type' => 'application/javascript', 'Cache-Control' => 'public, max-age=604800', 'X-Forever' => 1], [minify $js] ]
}
-sub variants{ [[js => 1, 'application/javascript', undef, undef, undef, undef]] }
-
1
1
diff --git
a/lib/Gruntmaster/Page/Passwd.pm
b/lib/Gruntmaster/Page/Passwd.pm
index 86689ac04be0621a93bc59083e5e1f36d399a865..73b768026d8f3dcbcca9aaae8d1aed4286a3c599 100644
(file)
--- a/
lib/Gruntmaster/Page/Passwd.pm
+++ b/
lib/Gruntmaster/Page/Passwd.pm
@@
-22,6
+22,4
@@
sub generate{
reply 'Password changed successfully';
}
reply 'Password changed successfully';
}
-sub variants{ [[reply => 1, undef, undef, undef, undef, undef]] }
-
1
1
diff --git
a/lib/Gruntmaster/Page/Register.pm
b/lib/Gruntmaster/Page/Register.pm
index dcb9451ebd8c40b682372e728796a047fb58c9e0..5a3edd161a7184a9f666ce6e95cc78d836ef9bb6 100644
(file)
--- a/
lib/Gruntmaster/Page/Register.pm
+++ b/
lib/Gruntmaster/Page/Register.pm
@@
-27,6
+27,4
@@
sub generate{
reply 'Registered successfully';
}
reply 'Registered successfully';
}
-sub variants{ [[reply => 1, undef, undef, undef, undef, undef]] }
-
1
1
diff --git
a/lib/Gruntmaster/Page/Src.pm
b/lib/Gruntmaster/Page/Src.pm
index 8e51d8ba71b676455badcb638a57a5ee1d7f6407..6dd5a9c2ad29dc5201a89786628ce2488fa5500b 100644
(file)
--- a/
lib/Gruntmaster/Page/Src.pm
+++ b/
lib/Gruntmaster/Page/Src.pm
@@
-25,6
+25,4
@@
sub generate{
[200, ['Content-Type' => CONTENT_TYPES->{$ext}, 'Cache-Control' => 'max-age=604800', 'X-Forever' => 1], [job_inmeta($job)->{files}{prog}{content}] ]
}
[200, ['Content-Type' => CONTENT_TYPES->{$ext}, 'Cache-Control' => 'max-age=604800', 'X-Forever' => 1], [job_inmeta($job)->{files}{prog}{content}] ]
}
-sub variants{ [[file => 1, undef, undef, undef, undef, undef]] }
-
1
1
diff --git
a/lib/Gruntmaster/Page/Submit.pm
b/lib/Gruntmaster/Page/Submit.pm
index 0159a9d06865f7a3f1132324e171bf310a4c748a..2c9fef0c526cb8d869fd698bd4edbcc9e0abb42e 100644
(file)
--- a/
lib/Gruntmaster/Page/Submit.pm
+++ b/
lib/Gruntmaster/Page/Submit.pm
@@
-61,6
+61,4
@@
sub generate{
[303, [Location => $r->path =~ s,/pb/\w+/submit$,/log/,r], ['']]
}
[303, [Location => $r->path =~ s,/pb/\w+/submit$,/log/,r], ['']]
}
-sub variants{ [[reply => 1, undef, undef, undef, undef, undef]] }
-
1
1
This page took
0.01401 seconds
and
4
git commands to generate.