Hello community,

here is the log from the commit of package perl-Mojolicious-Plugin-AssetPack 
for openSUSE:Factory checked in at 2020-09-07 21:35:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Mojolicious-Plugin-AssetPack (Old)
 and      
/work/SRC/openSUSE:Factory/.perl-Mojolicious-Plugin-AssetPack.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Mojolicious-Plugin-AssetPack"

Mon Sep  7 21:35:58 2020 rev:44 rq:832732 version:2.09

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-Mojolicious-Plugin-AssetPack/perl-Mojolicious-Plugin-AssetPack.changes
      2019-05-13 14:51:45.478972818 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-Mojolicious-Plugin-AssetPack.new.3399/perl-Mojolicious-Plugin-AssetPack.changes
    2020-09-07 21:36:10.233403400 +0200
@@ -1,0 +2,10 @@
+Mon Sep  7 03:10:40 UTC 2020 - Tina Müller <[email protected]>
+
+- updated to 2.09
+   see /usr/share/doc/packages/perl-Mojolicious-Plugin-AssetPack/Changes
+
+  2.09 2020-09-07T08:56:50+0900
+   - Prevent JavaScript from runnning in 404 assets #140
+   - Slimmed down the bundled documentation
+
+-------------------------------------------------------------------

Old:
----
  Mojolicious-Plugin-AssetPack-2.08.tar.gz

New:
----
  Mojolicious-Plugin-AssetPack-2.09.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Mojolicious-Plugin-AssetPack.spec ++++++
--- /var/tmp/diff_new_pack.X6z1NQ/_old  2020-09-07 21:36:11.637404050 +0200
+++ /var/tmp/diff_new_pack.X6z1NQ/_new  2020-09-07 21:36:11.637404050 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Mojolicious-Plugin-AssetPack
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,13 @@
 
 
 Name:           perl-Mojolicious-Plugin-AssetPack
-Version:        2.08
+Version:        2.09
 Release:        0
 %define cpan_name Mojolicious-Plugin-AssetPack
 Summary:        Compress and convert css, less, sass, javascript and 
coffeescript files
 License:        Artistic-2.0
 Group:          Development/Libraries/Perl
-Url:            https://metacpan.org/release/%{cpan_name}
+URL:            https://metacpan.org/release/%{cpan_name}
 Source0:        
https://cpan.metacpan.org/authors/id/J/JH/JHTHORSEN/%{cpan_name}-%{version}.tar.gz
 Source1:        cpanspec.yml
 BuildArch:      noarch
@@ -40,30 +40,14 @@
 %{perl_requires}
 
 %description
-Mojolicious::Plugin::AssetPack is Mojolicious plugin for processing static
-assets. The idea is that JavaScript and CSS files should be served as one
-minified file to save bandwidth and roundtrip time to the server.
-
-Note that the main author have moved on to using
-Mojolicious::Plugin::Webpack instead, which uses https://webpack.js.org/
-under the hood, but is just as convenient to use as this plugin. It is very
-easy to try out Mojolicious::Plugin::Webpack, since it will detect your
-AssetPack based project automatically, and migrate them over to webpack
-once the plugin is loaded.
-
-There are many external tools for doing this, but integrating them with
-Mojolicious can be a struggle: You want to serve the source files directly
-while developing, but a minified version in production. This assetpack
-plugin will handle all of that automatically for you.
-
-Your application creates and refers to an asset by its topic (virtual asset
-name). The process of building actual assets from their components is
-delegated to "pipe objects". Please see
-Mojolicious::Plugin::AssetPack::Guides::Tutorial/Pipes for a complete list.
+Mojolicious::Plugin::AssetPack has a very limited feature set, especially
+when it comes to processing JavaScript. It is recommended that you switch
+to Mojolicious::Plugin::Webpack if you want to write modern JavaScript
+code.
 
 %prep
 %setup -q -n %{cpan_name}-%{version}
-find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
+find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path 
"*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644
 
 %build
 perl Makefile.PL INSTALLDIRS=vendor

++++++ Mojolicious-Plugin-AssetPack-2.08.tar.gz -> 
Mojolicious-Plugin-AssetPack-2.09.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-2.08/Changes 
new/Mojolicious-Plugin-AssetPack-2.09/Changes
--- old/Mojolicious-Plugin-AssetPack-2.08/Changes       2019-05-07 
16:16:40.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-2.09/Changes       2020-09-07 
01:56:50.000000000 +0200
@@ -1,5 +1,9 @@
 Revision history for perl distribution Mojolicious-Plugin-AssetPack
 
+2.09 2020-09-07T08:56:50+0900
+ - Prevent JavaScript from runnning in 404 assets #140
+ - Slimmed down the bundled documentation
+
 2.08 2019-05-07T21:16:40+0700
  - Fix link to Mojolicious::Plugin::Webpack
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-2.08/MANIFEST 
new/Mojolicious-Plugin-AssetPack-2.09/MANIFEST
--- old/Mojolicious-Plugin-AssetPack-2.08/MANIFEST      2019-05-07 
16:16:41.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-2.09/MANIFEST      2020-09-07 
01:56:53.000000000 +0200
@@ -10,9 +10,6 @@
 lib/Mojolicious/Plugin/AssetPack.pm
 lib/Mojolicious/Plugin/AssetPack/Asset.pm
 lib/Mojolicious/Plugin/AssetPack/Asset/Null.pm
-lib/Mojolicious/Plugin/AssetPack/Guides/Cookbook.pod
-lib/Mojolicious/Plugin/AssetPack/Guides/Developing.pod
-lib/Mojolicious/Plugin/AssetPack/Guides/Tutorial.pod
 lib/Mojolicious/Plugin/AssetPack/Pipe.pm
 lib/Mojolicious/Plugin/AssetPack/Pipe/CoffeeScript.pm
 lib/Mojolicious/Plugin/AssetPack/Pipe/Combine.pm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-2.08/META.json 
new/Mojolicious-Plugin-AssetPack-2.09/META.json
--- old/Mojolicious-Plugin-AssetPack-2.08/META.json     2019-05-07 
16:16:41.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-2.09/META.json     2020-09-07 
01:56:52.000000000 +0200
@@ -4,7 +4,7 @@
       "Jan Henning Thorsen <[email protected]>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter 
version 2.150010",
+   "generated_by" : "ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter 
version 2.150010",
    "license" : [
       "artistic_2"
    ],
@@ -53,7 +53,7 @@
          "web" : "https://github.com/jhthorsen/mojolicious-plugin-assetpack";
       }
    },
-   "version" : "2.08",
+   "version" : "2.09",
    "x_contributors" : [
       "Jan Henning Thorsen <[email protected]>",
       "Alexander Rymasheusky",
@@ -61,5 +61,5 @@
       "Per Edin <[email protected]>",
       "Viktor Turskyi"
    ],
-   "x_serialization_backend" : "JSON::PP version 2.97001"
+   "x_serialization_backend" : "JSON::PP version 4.04"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-2.08/META.yml 
new/Mojolicious-Plugin-AssetPack-2.09/META.yml
--- old/Mojolicious-Plugin-AssetPack-2.08/META.yml      2019-05-07 
16:16:41.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-2.09/META.yml      2020-09-07 
01:56:52.000000000 +0200
@@ -7,7 +7,7 @@
 configure_requires:
   ExtUtils::MakeMaker: '0'
 dynamic_config: 0
-generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 
2.150010'
+generated_by: 'ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 
2.150010'
 license: artistic_2
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -25,7 +25,7 @@
   bugtracker: https://github.com/jhthorsen/mojolicious-plugin-assetpack/issues
   homepage: https://github.com/jhthorsen/mojolicious-plugin-assetpack
   repository: https://github.com/jhthorsen/mojolicious-plugin-assetpack.git
-version: '2.08'
+version: '2.09'
 x_contributors:
   - 'Jan Henning Thorsen <[email protected]>'
   - 'Alexander Rymasheusky'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-2.08/Makefile.PL 
new/Mojolicious-Plugin-AssetPack-2.09/Makefile.PL
--- old/Mojolicious-Plugin-AssetPack-2.08/Makefile.PL   2019-05-07 
16:16:40.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-2.09/Makefile.PL   2020-09-07 
01:56:50.000000000 +0200
@@ -8,6 +8,7 @@
   ABSTRACT_FROM  => 'lib/Mojolicious/Plugin/AssetPack.pm',
   VERSION_FROM   => 'lib/Mojolicious/Plugin/AssetPack.pm',
   EXE_FILES      => [qw()],
+  OBJECT         => '',
   BUILD_REQUIRES => {}
 ,
   TEST_REQUIRES  => {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-2.08/README.md 
new/Mojolicious-Plugin-AssetPack-2.09/README.md
--- old/Mojolicious-Plugin-AssetPack-2.08/README.md     2019-05-07 
16:16:40.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-2.09/README.md     2020-09-07 
01:56:50.000000000 +0200
@@ -2,90 +2,27 @@
 
 Mojolicious::Plugin::AssetPack - Compress and convert css, less, sass, 
javascript and coffeescript files
 
-# VERSION
-
-2.08
-
-# SYNOPSIS
-
-## Application
-
-    use Mojolicious::Lite;
-
-    # Load plugin and pipes in the right order
-    plugin AssetPack => {
-      pipes => [qw(Less Sass Css CoffeeScript Riotjs JavaScript Combine)]
-    };
-
-    # define asset
-    app->asset->process(
-      # virtual name of the asset
-      "app.css" => (
-
-        # source files used to create the asset
-        "sass/bar.scss",
-        
"https://github.com/Dogfalo/materialize/blob/master/sass/materialize.scss";,
-      )
-    );
-
-## Template
-
-    <html>
-      <head>
-        %= asset "app.css"
-      </head>
-      <body><%= content %></body>
-    </html>
-
 # DESCRIPTION
 
-[Mojolicious::Plugin::AssetPack](https://metacpan.org/pod/Mojolicious::Plugin::AssetPack)
 is [Mojolicious plugin](https://metacpan.org/pod/Mojolicious::Plugin)
-for processing static assets. The idea is that JavaScript and CSS files should
-be served as one minified file to save bandwidth and roundtrip time to the
-server.
-
-Note that the main author have moved on to using
-[Mojolicious::Plugin::Webpack](https://metacpan.org/pod/Mojolicious::Plugin::Webpack)
 instead, which uses
-[https://webpack.js.org/](https://webpack.js.org/) under the hood, but is just 
as convenient to use as
-this plugin. It is very easy to try out
-[Mojolicious::Plugin::Webpack](https://metacpan.org/pod/Mojolicious::Plugin::Webpack),
 since it will detect your AssetPack
-based project automatically, and migrate them over to webpack once the plugin
-is loaded.
-
-There are many external tools for doing this, but integrating them with
-[Mojolicious](https://metacpan.org/pod/Mojolicious) can be a struggle: You 
want to serve the source files directly
-while developing, but a minified version in production. This assetpack plugin
-will handle all of that automatically for you.
+[Mojolicious::Plugin::AssetPack](https://metacpan.org/pod/Mojolicious%3A%3APlugin%3A%3AAssetPack)
 has a very limited feature set, especially
+when it comes to processing JavaScript. It is recommended that you switch to
+[Mojolicious::Plugin::Webpack](https://metacpan.org/pod/Mojolicious%3A%3APlugin%3A%3AWebpack)
 if you want to write modern JavaScript code.
 
-Your application creates and refers to an asset by its topic (virtual asset
-name).  The process of building actual assets from their components is
-delegated to "pipe objects". Please see
-["Pipes" in 
Mojolicious::Plugin::AssetPack::Guides::Tutorial](https://metacpan.org/pod/Mojolicious::Plugin::AssetPack::Guides::Tutorial#Pipes)
 for a complete list.
+## Existing user?
 
-# BREAKING CHANGES
+It is _very_ simple to migrate from 
[Mojolicious::Plugin::AssetPack](https://metacpan.org/pod/Mojolicious%3A%3APlugin%3A%3AAssetPack)
 to
+[Mojolicious::Plugin::Webpack](https://metacpan.org/pod/Mojolicious%3A%3APlugin%3A%3AWebpack).
 Just check out the one line change in
+["MIGRATING-FROM-ASSETPACK" in 
Mojolicious::Plugin::Webpack](https://metacpan.org/pod/Mojolicious%3A%3APlugin%3A%3AWebpack#MIGRATING-FROM-ASSETPACK).
 
-## assetpack.db (v1.47)
+## Don't want to switch?
 
-`assetpack.db` no longer track files downloaded from the internet. It will
-mostly "just work", but in some cases version 1.47 might download assets that
-have already been downloaded with AssetPack version 1.46 and earlier.
+Your existing code will probably continue to work for a long time, but it will
+get more and more difficult to write _new_ working JavaScript with
+[Mojolicious::Plugin::AssetPack](https://metacpan.org/pod/Mojolicious%3A%3APlugin%3A%3AAssetPack)
 as time goes by.
 
-The goal is to remove `assetpack.db` completely.
+## New user?
 
-# GUIDES
-
-- 
[Mojolicious::Plugin::AssetPack::Guides::Tutorial](https://metacpan.org/pod/Mojolicious::Plugin::AssetPack::Guides::Tutorial)
-
-    The tutorial will give an introduction to how AssetPack can be used.
-
-- 
[Mojolicious::Plugin::AssetPack::Guides::Developing](https://metacpan.org/pod/Mojolicious::Plugin::AssetPack::Guides::Developing)
-
-    The "developing" guide will give insight on how to do effective 
development with
-    AssetPack and more details about the internals in this plugin.
-
-- 
[Mojolicious::Plugin::AssetPack::Guides::Cookbook](https://metacpan.org/pod/Mojolicious::Plugin::AssetPack::Guides::Cookbook)
-
-    The cookbook has various receipes on how to cook with AssetPack.
+Look no further. Just jump over to 
[Mojolicious::Plugin::Webpack](https://metacpan.org/pod/Mojolicious%3A%3APlugin%3A%3AWebpack).
 
 # HELPERS
 
@@ -97,13 +34,11 @@
     $bytestream = $c->asset("app.css", media => "print");
 
 `asset()` is the main entry point to this plugin. It can either be used to
-access the 
[Mojolicious::Plugin::AssetPack](https://metacpan.org/pod/Mojolicious::Plugin::AssetPack)
 instance or as a tag helper.
+access the 
[Mojolicious::Plugin::AssetPack](https://metacpan.org/pod/Mojolicious%3A%3APlugin%3A%3AAssetPack)
 instance or as a tag helper.
 
 The helper name "asset" can be customized by specifying "helper" when
 [registering](#register) the plugin.
 
-See 
[Mojolicious::Plugin::AssetPack::Guides::Tutorial](https://metacpan.org/pod/Mojolicious::Plugin::AssetPack::Guides::Tutorial)
 for more details.
-
 # ATTRIBUTES
 
 ## minify
@@ -114,42 +49,36 @@
 Set this to true to combine and minify the assets. Defaults to false if
 ["mode" in Mojolicious](https://metacpan.org/pod/Mojolicious#mode) is 
"development" and true otherwise.
 
-See ["Application mode" in 
Mojolicious::Plugin::AssetPack::Guides::Tutorial](https://metacpan.org/pod/Mojolicious::Plugin::AssetPack::Guides::Tutorial#Application-mode)
-for more details.
-
 ## route
 
     $route = $self->route;
     $self = $self->route($route);
 
-A 
[Mojolicious::Routes::Route](https://metacpan.org/pod/Mojolicious::Routes::Route)
 object used to serve assets. The default route
+A 
[Mojolicious::Routes::Route](https://metacpan.org/pod/Mojolicious%3A%3ARoutes%3A%3ARoute)
 object used to serve assets. The default route
 responds to HEAD and GET requests and calls
-[serve\_asset()](https://metacpan.org/pod/Mojolicious::Plugin::AssetPack::Store#serve_asset)
 on ["store"](#store)
+[serve\_asset()](https://metacpan.org/pod/Mojolicious%3A%3APlugin%3A%3AAssetPack%3A%3AStore#serve_asset)
 on ["store"](#store)
 to serve the asset.
 
 The default route will be built and added to the 
[application](https://metacpan.org/pod/Mojolicious)
 when ["process"](#process) is called the first time.
 
-See ["ASSETS FROM CUSTOM DOMAIN" in 
Mojolicious::Plugin::AssetPack::Guides::Cookbook](https://metacpan.org/pod/Mojolicious::Plugin::AssetPack::Guides::Cookbook#ASSETS-FROM-CUSTOM-DOMAIN)
-for an example on how to customize this route.
-
 ## store
 
     $obj = $self->store;
     $self = $self->store(Mojolicious::Plugin::AssetPack::Store->new);
 
-Holds a 
[Mojolicious::Plugin::AssetPack::Store](https://metacpan.org/pod/Mojolicious::Plugin::AssetPack::Store)
 object used to locate, store
+Holds a 
[Mojolicious::Plugin::AssetPack::Store](https://metacpan.org/pod/Mojolicious%3A%3APlugin%3A%3AAssetPack%3A%3AStore)
 object used to locate, store
 and serve assets.
 
 ## tag\_for
 
-Deprecated. Use ["renderer" in 
Mojolicious::Plugin::AssetPack::Asset](https://metacpan.org/pod/Mojolicious::Plugin::AssetPack::Asset#renderer)
 instead.
+Deprecated. Use ["renderer" in 
Mojolicious::Plugin::AssetPack::Asset](https://metacpan.org/pod/Mojolicious%3A%3APlugin%3A%3AAssetPack%3A%3AAsset#renderer)
 instead.
 
 ## ua
 
     $ua = $self->ua;
 
-Holds a [Mojo::UserAgent](https://metacpan.org/pod/Mojo::UserAgent) which can 
be used to fetch assets either from local
+Holds a [Mojo::UserAgent](https://metacpan.org/pod/Mojo%3A%3AUserAgent) which 
can be used to fetch assets either from local
 application or from remote web servers.
 
 # METHODS
@@ -167,9 +96,7 @@
     $self = $self->process($definition_file);
 
 Used to process assets. A `$definition_file` can be used to define `$topic`
-and `@assets` in a separate file. See
-["Process assets" in 
Mojolicious::Plugin::AssetPack::Guides::Tutorial](https://metacpan.org/pod/Mojolicious::Plugin::AssetPack::Guides::Tutorial#Process-assets)
 for more
-details.
+and `@assets` in a separate file.
 
 `$definition_file` defaults to "assetpack.def".
 
@@ -177,8 +104,8 @@
 
     $collection = $self->processed($topic);
 
-Can be used to retrieve a 
[Mojo::Collection](https://metacpan.org/pod/Mojo::Collection) object, with zero 
or more
-[Mojolicious::Plugin::AssetPack::Asset](https://metacpan.org/pod/Mojolicious::Plugin::AssetPack::Asset)
 objects. Returns undef if `$topic` is
+Can be used to retrieve a 
[Mojo::Collection](https://metacpan.org/pod/Mojo%3A%3ACollection) object, with 
zero or more
+[Mojolicious::Plugin::AssetPack::Asset](https://metacpan.org/pod/Mojolicious%3A%3APlugin%3A%3AAssetPack%3A%3AAsset)
 objects. Returns undef if `$topic` is
 not defined with ["process"](#process).
 
 ## register
@@ -198,9 +125,6 @@
 
         $app->plugin(AssetPack => {pipes => [qw(Sass Css Combine)]);
 
-    See ["Pipes" in 
Mojolicious::Plugin::AssetPack::Guides::Tutorial](https://metacpan.org/pod/Mojolicious::Plugin::AssetPack::Guides::Tutorial#Pipes)
 for a complete
-    list of available pipes.
-
 - proxy
 
     A hash of proxy settings. Set this to `0` to disable proxy detection.
@@ -208,20 +132,15 @@
     should bypass the proxy (if any proxy is detected). Default is to bypass 
all
     requests to localhost.
 
-    See ["detect" in 
Mojo::UserAgent::Proxy](https://metacpan.org/pod/Mojo::UserAgent::Proxy#detect) 
for more information.
+    See ["detect" in 
Mojo::UserAgent::Proxy](https://metacpan.org/pod/Mojo%3A%3AUserAgent%3A%3AProxy#detect)
 for more information.
 
 # SEE ALSO
 
-[Mojolicious::Plugin::Webpack](https://metacpan.org/pod/Mojolicious::Plugin::Webpack).
-
-["GUIDES"](#guides),
-[Mojolicious::Plugin::AssetPack::Asset](https://metacpan.org/pod/Mojolicious::Plugin::AssetPack::Asset),
-[Mojolicious::Plugin::AssetPack::Pipe](https://metacpan.org/pod/Mojolicious::Plugin::AssetPack::Pipe)
 and
-[Mojolicious::Plugin::AssetPack::Store](https://metacpan.org/pod/Mojolicious::Plugin::AssetPack::Store).
+[Mojolicious::Plugin::Webpack](https://metacpan.org/pod/Mojolicious%3A%3APlugin%3A%3AWebpack).
 
 # COPYRIGHT AND LICENSE
 
-Copyright (C) 2014, Jan Henning Thorsen
+Copyright (C) 2020, Jan Henning Thorsen
 
 This program is free software, you can redistribute it and/or modify it under
 the terms of the Artistic License version 2.0.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Mojolicious-Plugin-AssetPack-2.08/lib/Mojolicious/Plugin/AssetPack/Asset.pm 
new/Mojolicious-Plugin-AssetPack-2.09/lib/Mojolicious/Plugin/AssetPack/Asset.pm
--- 
old/Mojolicious-Plugin-AssetPack-2.08/lib/Mojolicious/Plugin/AssetPack/Asset.pm 
    2018-11-01 02:31:50.000000000 +0100
+++ 
new/Mojolicious-Plugin-AssetPack-2.09/lib/Mojolicious/Plugin/AssetPack/Asset.pm 
    2020-09-07 01:46:04.000000000 +0200
@@ -14,7 +14,7 @@
 $TAG_TEMPLATE{$_} = [qw(source src)] for qw(mp3 mp4 ogg ogv webm);
 
 has checksum => sub { 
Mojolicious::Plugin::AssetPack::Util::checksum(shift->content) };
-has format => sub {
+has format   => sub {
   my $self = shift;
   my $name = $self->url =~ /^https?:/ ? Mojo::URL->new($self->url)->path->[-1] 
: (split m!(\\|/)!, $self->url)[-1];
 
@@ -27,7 +27,7 @@
 
 has _asset => sub {
   my $self = shift;
-  return $self->content(delete $self->{content})->_asset if $self->{content};
+  return $self->content(delete $self->{content})->_asset      if 
$self->{content};
   return Mojo::Asset::File->new(path => delete $self->{path}) if $self->{path};
   return Mojo::Asset::Memory->new;
 };
@@ -40,7 +40,7 @@
     my $url = Mojo::URL->new($self->url);
     my $qs  = $url->query->to_string;
     $name = $url->path->[-1];
-    $qs =~ s!\W!_!g;
+    $qs   =~ s!\W!_!g;
     $name =~ s!\.\w+$!!;
     $name .= "_$qs" if $qs;
   }
@@ -80,7 +80,7 @@
 sub path {
   my $self = shift;
   return $self->_asset(Mojo::Asset::File->new(path => $_[0])) if $_[0];
-  return Mojo::File->new($self->_asset->path) if 
$self->_asset->isa('Mojo::Asset::File');
+  return Mojo::File->new($self->_asset->path)                 if 
$self->_asset->isa('Mojo::Asset::File');
   return undef;
 }
 
@@ -90,7 +90,7 @@
 
 sub _default_tag_for {
   my ($asset, $c, $args, @attrs) = @_;
-  my $url = $asset->url_for($c);
+  my $url      = $asset->url_for($c);
   my @template = @{$TAG_TEMPLATE{$asset->format} || $TAG_TEMPLATE{css}};
   splice @template, 1, 0, type => $c->app->types->type($asset->format) if 
$template[0] eq 'source';
   return $c->tag(@template, Mojo::URL->new("$args->{base_url}$url"), @attrs);
@@ -178,9 +178,7 @@
 =item * C<%args>
 
 A hash-ref with "base_url" and
-L<topic|Mojolicious::Plugin::AssetPack::Pipe/topic>. See
-L<Mojolicious::Plugin::AssetPack::Guides::Cookbook/ASSETS FROM CUSTOM DOMAIN>
-of example "base_url".
+L<topic|Mojolicious::Plugin::AssetPack::Pipe/topic>.
 
 =item * C<@attrs>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Mojolicious-Plugin-AssetPack-2.08/lib/Mojolicious/Plugin/AssetPack/Guides/Cookbook.pod
 
new/Mojolicious-Plugin-AssetPack-2.09/lib/Mojolicious/Plugin/AssetPack/Guides/Cookbook.pod
--- 
old/Mojolicious-Plugin-AssetPack-2.08/lib/Mojolicious/Plugin/AssetPack/Guides/Cookbook.pod
  2018-09-08 16:18:41.000000000 +0200
+++ 
new/Mojolicious-Plugin-AssetPack-2.09/lib/Mojolicious/Plugin/AssetPack/Guides/Cookbook.pod
  1970-01-01 01:00:00.000000000 +0100
@@ -1,222 +0,0 @@
-=head1 NAME
-
-Mojolicious::Plugin::AssetPack::Guides::Cookbook - AssetPack recipes
-
-=head1 OVERVIEW
-
-This guide will provide recipes for cooking with
-L<Mojolicious::Plugin::AssetPack>.
-
-=head1 ASSETS FROM CUSTOM DOMAIN
-
-You might want to serve the assets from a domain different from where the main
-app is running. The reasons for that might be:
-
-=over 2
-
-=item *
-
-No cookies send on each request. This is especially useful when you use
-L<Mojolicious> sessions as they are stored in cookies and clients send whole
-session with every request.
-
-=item *
-
-More requests done in parallel. Browsers have limits for sending parallel
-request to one domain. With separate domain static files can be loaded in
-parallel.
-
-=item *
-
-Serve files directly (by absolute url) from CDN (or Amazon S3).
-
-=back
-
-=head2 Synopsis
-
-You need to customize L<Mojolicious::Plugin::AssetPack/route> to accomplish
-this:
-
-  $app->asset->route->to(base_url => "http://cdn.example.com/my-assets/";);
-
-=head2 Caveat
-
-Many recent browsers blocks mixed content, meaning if your HTML is served over
-HTTPS, then you can't serve the assets over HTTP. One way to fix this is by
-using "//" instead of a scheme specific URL. Example:
-
-  base_url => "//cdn.example.com/my-assets/"
-
-This will tell the browser to use the same scheme for fetching assets, as it
-did fetching the web page.
-
-=head2 See also
-
-L<https://developers.google.com/speed/docs/best-practices/request#ServeFromCookielessDomain>.
-
-=head1 DYNAMIC ASSETS
-
-Any L<web|Mojolicious::Plugin::AssetPack::Guides::Tutorial/Web> asset with the
-hostname "local" will be routed to the current L<Mojolicious> application.
-Example:
-
-  $ cat assetpack.def
-  ! app.js
-  < http://local/some/resource.js
-
-The above URL will make AssetPack issue a request to the current Mojolicious
-application, allowing it to render dynamic JavaScript. Example Mojolicious
-resource:
-
-  get "/some/resource" => [format => "js"], sub {
-    my $c = shift;
-    $c->render(text => sprintf "rand = %s\n", rand);
-  };
-
-=head2 Sass
-
-Sass files can also be generated dynamically. Here is an example Sass file:
-
-  @import "http://local/sass/dynamic";;
-  $color: red !default;
-  body { color: $color; }
-
-Normally, the C<@import> statement would be left untouched, but AssetPack will
-(in the special case where the host is "local") inline the result from that
-resource. This allow C<$color> to be set from the application and override the
-default C<$color> in the file above. Example:
-
-  get "/sass/_dynamic" => [format => "scss"], sub {
-    my $c = shift;
-    $c->render(text => "\$color: black;\n");
-  };
-
-Note that this feature is EXPERIMENTAL and not compatible with standard Sass
-rules.
-
-=head1 ONLINE ASSETS
-
-Instead of making custom AssetPack plugins, it is possible to simply include
-projects such as Bootstrap, FontAwesome or jQuery directly from the web
-instead.
-
-=head2 Bootstrap
-
-The SASS version of L<http://getbootstrap.com> can easily be included by 
defining it
-in the 
L<assetspack.def|Mojolicious::Plugin::AssetPack::Guides::Tutorial/Defining 
assets in a definition file>
-file:
-
-  $ cat - > assets/assetpack.def
-  ! app.css
-  < 
https://github.com/twbs/bootstrap-sass/raw/master/assets/stylesheets/_bootstrap.scss
-
-After that, you might want to customize bootstrap. This can then be done by 
changing
-"assetpack.def" to:
-
-  ! app.css
-  << 
https://github.com/twbs/bootstrap-sass/raw/master/assets/stylesheets/_bootstrap.scss
-  < sass/main.scss
-
-"assets/sass/main.scss" should then have a modified version of
-L<https://github.com/twbs/bootstrap-sass/raw/master/assets/stylesheets/_bootstrap.scss>:
-
-  @import "variables.scss";
-  @import 
"../cache/github.com/twbs/bootstrap-sass/raw/master/assets/stylesheets/bootstrap/mixins";
-  @import 
"../cache/github.com/twbs/bootstrap-sass/raw/master/assets/stylesheets/bootstrap/normalize";
-  @import 
"../cache/github.com/twbs/bootstrap-sass/raw/master/assets/stylesheets/bootstrap/print";
-  ...
-
-The file "_variables.scss" should also be copied to "assets/sass".
-
-(Note that the rest of the example file above is truncated)
-
-=head2 Font awesome
-
-L<https://fortawesome.github.io/Font-Awesome/> can be included with the snippet
-below:
-
-  $app->asset->process(
-    "app.css" => (
-      
"https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css";,
-    )
-  );
-
-See also L<Mojolicious::Plugin::AssetPack::Pipe::Fetch> for information about
-automatically fetching related font files.
-
-=head2 Google fonts
-
-L<https://www.google.com/fonts> can be included with this snippet:
-
-  $app->asset->process(
-    "app.css" => (
-      "https://fonts.googleapis.com/css?family=Roboto:400,700";,
-      "your-app.css",
-    )
-  );
-
-=head2 JavaScript polyfills
-
-L<https://github.com/Modernizr/Modernizr> contains a list of many shims which
-can be included. Here is just one example:
-
-  $app->asset->process(
-    "app.js" => (
-      "http://cdnjs.cloudflare.com/ajax/libs/es5-shim/2.3.0/es5-shim.js";,
-      "http://cdnjs.cloudflare.com/ajax/libs/es5-shim/2.3.0/es5-sham.js";,
-      "your-app.js",
-    )
-  );
-
-=head2 jQuery
-
-L<http://jquery.com> can easily be included by referring to a CDN:
-
-  $app->asset->process(
-    "app.js" => (
-      "http://code.jquery.com/jquery-1.12.0.js";,
-      "your-app.js",
-    )
-  );
-
-=head2 Materialize CSS
-
-L<http://materializecss.com/> can be included by defining it
-in the 
L<assetspack.def|Mojolicious::Plugin::AssetPack::Guides::Tutorial/Defining 
assets in a definition file>
-file. L<Mojolicious::Plugin::AssetPack::Pipe::Sass> will also discover all
-the "@import" files and download those recusively as well.
-
-  $ cat - > assets/assetpack.def
-  ! app.css
-  < 
https://raw.githubusercontent.com/Dogfalo/materialize/master/sass/materialize.scss
-  < https://fonts.googleapis.com/icon?family=Material+Icons
-
-After that, you might want to customize Materialize. This can then be done by 
changing
-"assetpack.def" to:
-
-  ! app.css
-  << 
https://raw.githubusercontent.com/Dogfalo/materialize/master/sass/materialize.scss
-  < https://fonts.googleapis.com/icon?family=Material+Icons
-  < sass/main.scss
-
-"assets/sass/main.scss" should then have a modified version of
-L<https://raw.githubusercontent.com/Dogfalo/materialize/master/sass/materialize.scss>:
-
-  @charset "UTF-8";
-  @import 
"../cache/raw.githubusercontent.com/Dogfalo/materialize/master/sass/components/prefixer";
-  @import 
"../cache/raw.githubusercontent.com/Dogfalo/materialize/master/sass/components/mixins";
-  @import 
"../cache/raw.githubusercontent.com/Dogfalo/materialize/master/sass/components/color";
-  @import "variables.scss";
-  ...
-
-The file "_variables.scss" should also be copied to "assets/sass".
-
-(Note that the rest of the example file above is truncated)
-
-=head1 SEE ALSO
-
-L<Mojolicious::Plugin::AssetPack>,
-L<Mojolicious::Plugin::AssetPack::Guides::Developing> and
-L<Mojolicious::Plugin::AssetPack::Guides::Tutorial>.
-
-=cut
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Mojolicious-Plugin-AssetPack-2.08/lib/Mojolicious/Plugin/AssetPack/Guides/Developing.pod
 
new/Mojolicious-Plugin-AssetPack-2.09/lib/Mojolicious/Plugin/AssetPack/Guides/Developing.pod
--- 
old/Mojolicious-Plugin-AssetPack-2.08/lib/Mojolicious/Plugin/AssetPack/Guides/Developing.pod
        2018-09-08 16:18:41.000000000 +0200
+++ 
new/Mojolicious-Plugin-AssetPack-2.09/lib/Mojolicious/Plugin/AssetPack/Guides/Developing.pod
        1970-01-01 01:00:00.000000000 +0100
@@ -1,90 +0,0 @@
-=head1 NAME
-
-Mojolicious::Plugin::AssetPack::Guides::Developing - Developing with AssetPack
-
-=head1 OVERVIEW
-
-This guide will provide a setup for effective development with
-L<Mojolicious::Plugin::AssetPack>.
-
-=head1 GUIDE
-
-=head2 Environment variables
-
-It is possible to set environment variables to change the behavior of 
AssetPack:
-
-=over 2
-
-=item * MOJO_ASSETPACK_DEBUG
-
-Set this environment variable to get more debug to STDERR. Currently you can
-set it to a value between 0 and 3, where 3 provides the most debug.
-
-=item * MOJO_ASSETPACK_LAZY
-
-Set this environment variable if you want to delay processing the assets until
-they are requested. This can be very useful while developing when the assets
-are changed frequently.
-
-=back
-
-=head2 Faster development cycle
-
-For a faster development cycle, you can use L<MOJO_ASSETPACK_LAZY>. This
-environment variable will make AssetPack only rebuild the asset that is in use
-on the current web page.
-
-  $ MOJO_ASSETPACK_LAZY=1 morbo myapp.pl
-
-=head2 Enforcing production assets
-
-To be sure that production assets are built correctly, you can add a unit test
-like the one below. This is especially important if you are using
-L</MOJO_ASSETPACK_LAZY>.
-
-  use Test::Mojo;
-  use Test::More;
-
-  $ENV{MOJO_MODE} = "production";
-  my $t = Test::Mojo->new("MyApp");
-
-  $t->get_ok("/")
-    ->element_exists(q(head link[href$="/app.css"]))
-    ->element_exists(q(body script[src$="/app.js"]));
-
-  done_testing;
-
-The C<element_exists()> tests should match the topics defined when defining the
-different assets.
-
-=head1 Optional modules
-
-There are some optional modules you might want to install:
-
-=over 2
-
-=item * L<CSS::Minifier::XS>
-
-Used by L<Mojolicious::Plugin::AssetPack::Pipe::Css>.
-
-=item * L<CSS::Sass>
-
-Used by L<Mojolicious::Plugin::AssetPack::Pipe::Sass>.
-
-=item * L<IO::Socket::SSL>
-
-Required if you want to download assets served over SSL.
-
-=item * L<JavaScript::Minifier::XS>
-
-Used by L<Mojolicious::Plugin::AssetPack::Pipe::JavaScript>.
-
-=back
-
-=head1 SEE ALSO
-
-L<Mojolicious::Plugin::AssetPack>,
-L<Mojolicious::Plugin::AssetPack::Guides::Cookbook> and
-L<Mojolicious::Plugin::AssetPack::Guides::Tutorial>.
-
-=cut
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Mojolicious-Plugin-AssetPack-2.08/lib/Mojolicious/Plugin/AssetPack/Guides/Tutorial.pod
 
new/Mojolicious-Plugin-AssetPack-2.09/lib/Mojolicious/Plugin/AssetPack/Guides/Tutorial.pod
--- 
old/Mojolicious-Plugin-AssetPack-2.08/lib/Mojolicious/Plugin/AssetPack/Guides/Tutorial.pod
  2018-09-08 16:18:41.000000000 +0200
+++ 
new/Mojolicious-Plugin-AssetPack-2.09/lib/Mojolicious/Plugin/AssetPack/Guides/Tutorial.pod
  1970-01-01 01:00:00.000000000 +0100
@@ -1,328 +0,0 @@
-=head1 NAME
-
-Mojolicious::Plugin::AssetPack::Guides::Tutorial - AssetPack tutorial
-
-=head1 OVERVIEW
-
-This guide will give detailed information about how to define assets and
-include them into your templates.
-
-See L<Mojolicious::Plugin::AssetPack/DESCRIPTION> for a short description of
-AssetPack.
-
-=head1 GUIDE
-
-=head2 Loading the plugin
-
-The plugin needs to be installed an loaded before any assets can be defined:
-
-  $app->plugin(AssetPack => \%args);
-
-Details about C<%args> can be found under
-L<Mojolicious::Plugin::AssetPack/register>, but there is one mandatory
-argument worth noting: "pipes". "pipes" need to be a list of all the pipes
-you need to process your assets. Example:
-
-  $app->plugin(AssetPack => {pipes => [qw(Sass Css Combine)]});
-
-Loading the plugin with the list above will enable AssetPack to process Sass
-and Css files, minify them and combine them into a single asset in production.
-
-=head2 Optional dependencies
-
-AssetPack has only optional dependencies. The reason for that is that the
-dependencies should only be required while developing, and not for running
-the application. See 
L<https://github.com/jhthorsen/mojolicious-plugin-assetpack/blob/v2/cpanfile>
-for a complete list, but here are the current list:
-
-=over 2
-
-=item * L<CSS::Minifier::XS> 0.09
-
-Used to minify CSS.
-
-=item * L<CSS::Sass> 3.3.0
-
-Used to process and minify CSS.
-
-=item * L<Imager::File::PNG> 0.90
-
-TODO: Used to generate CSS sprites.
-
-=item * L<JavaScript::Minifier::XS> 0.11
-
-Used to minify JavaScript.
-
-=back
-
-=head2 Pipes
-
-AssetPack does not do any heavy lifting itself: All the processing is left to
-the L<pipe objects|Mojolicious::Plugin::AssetPack::Pipe>.
-
-=over 2
-
-=item * L<Mojolicious::Plugin::AssetPack::Pipe::CoffeeScript>
-
-Process CoffeeScript coffee files. Should be loaded before
-L<Mojolicious::Plugin::AssetPack::Pipe::JavaScript>.
-
-=item * L<Mojolicious::Plugin::AssetPack::Pipe::Combine>
-
-Combine multiple assets to one. Should be loaded last.
-
-=item * L<Mojolicious::Plugin::AssetPack::Pipe::Css>
-
-Minify CSS.
-
-=item * L<Mojolicious::Plugin::AssetPack::Pipe::Favicon>
-
-There is a special topic called "favicon.ico", combined with the
-L<Mojolicious::Plugin::AssetPack::Pipe::Favicon> pipe which can be used to
-describe favicons, touch icons and tile icons.
-
-=item * L<Mojolicious::Plugin::AssetPack::Pipe::Fetch>
-
-Will look for "url(...)" in CSS files and download the related assets.
-
-=item * L<Mojolicious::Plugin::AssetPack::Pipe::JavaScript>
-
-Minify JavaScript.
-
-=item * L<Mojolicious::Plugin::AssetPack::Pipe::Jpeg>
-
-Used to crush "jpeg" image files.
-
-=item * L<Mojolicious::Plugin::AssetPack::Pipe::Less>
-
-Process Less CSS files. Should be loaded before
-L<Mojolicious::Plugin::AssetPack::Pipe::Css>.
-
-=item * L<Mojolicious::Plugin::AssetPack::Pipe::Png>
-
-Used to crush "png" image files.
-
-=item * L<Mojolicious::Plugin::AssetPack::Pipe::Riotjs>
-
-Process L<http://riotjs.com/> tag files. Should be loaded before
-L<Mojolicious::Plugin::AssetPack::Pipe::JavaScript>.
-
-=item * L<Mojolicious::Plugin::AssetPack::Pipe::Sass>
-
-Process sass and scss files. Should be loaded before
-L<Mojolicious::Plugin::AssetPack::Pipe::Css>.
-
-=back
-
-=head2 Where to place source files
-
-The source/input files that make up a virtual asset (topic) can come from
-either...
-
-=head3 On disk
-
-AssetPack will look for source files in the "assets" directory, relative to the
-application L<home|Mojo/home>. Unlike the "public" directory, this directory is
-not shared on the internet, but the generated assets will still be available
-thanks to a custom L<route|Mojolicious::Plugin::AssetPack/route>.
-
-L<Mojolicious::Plugin::AssetPack::Store> is a sub class of
-L<Mojolicious::Static>, allowing it to find files relative to
-L<Mojolicious::Static/paths>. For example, to change asset search paths, you
-can do:
-
-    $app->asset->store->paths(["/some/new/location", "/other/location"]);
-
-=head3 DATA section
-
-L<Mojolicious::Plugin::AssetPack::Store> is a sub class of
-L<Mojolicious::Static>, allowing it to look for files in DATA sections of
-L<Mojolicious::Static/classes>.
-
-The DATA section can also be used to lookup "@import" files. (Currently only
-supported by L<Mojolicious::Plugin::AssetPack::Pipe::Sass>)
-
-=head3 Web
-
-Any file starting with "http" or "https" will be downloaded from web using
-L<Mojolicious::Plugin::AssetPack/ua>.
-
-It will also parse recursively "@import" files and download those as well.
-(Currently only supported by L<Mojolicious::Plugin::AssetPack::Pipe::Sass>)
-
-Assets from web will be cached locally to prevent downloading new and untested
-assets on each application startup.
-
-=head3 Current Mojolicious application
-
-See L<Mojolicious::Plugin::Assets::Guides::Cookbook/DYNAMIC ASSETS>.
-
-=head2 Process assets
-
-Assets should be defined when you application starts. This can either be done
-using a L<definition file|Mojolicious::Plugin::AssetPack/process> or inside you
-application.
-
-=head3 Defining assets in the application
-
-Assets can be defined using the L<Mojolicious::Plugin::AssetPack/process>
-method:
-
-  $app->asset->process(
-    "app.css" => (
-      "sass/bar.scss",
-      "foo/bar.css",
-      
"https://github.com/Dogfalo/materialize/blob/master/sass/materialize.scss";,
-    )
-  );
-
-In the example above we have defined a topic named "app.css" which
-later can be included in L<templates|/Using assets>. The list of files
-following are the source files which will make up the final asset.
-
-=head3 Defining assets in a definition file
-
-Moving the definition to an external file can be useful for keeping the
-application code tidy. The definition file should be located in the
-L<assets|Mojolicious::Plugin::AssetPack::Store/paths> directory, or optionally
-defined it in the "DATA" section. The default file is called
-"assetpack.def" and will be looked up if
-L<Mojolicious::Plugin::AssetPack/process> is called without arguments. Example
-file:
-
-  ! app.css
-  < sass/bar.scss
-  << https://github.com/Dogfalo/materialize/blob/master/sass/materialize.scss
-  < sass/main.scss
-
-Empty lines and lines starting with "#" will be skipped. Each line starting
-with "!" will be used to define a topic (virtual asset name), and "E<lt>" will
-define a source file. This means that the file above will result in (almost)
-the same as in the L<example above|/Defining assets in the application>.
-
-The idea of the line starting with "<<" is to download an external (remote)
-file for your convenience, which can be imported in your SASS/LESS files. The
-downloaded file is not included in the output asset. For example, you have
-"sass/main.scss" which depends on "materialize.scss" (remote file) and you need
-this "materialize.scss" file locally available to be imported in
-"sass/main.scss".  If you want to include a remote file in your output asset,
-use '<' insteaf of '<<'.
-
-It is also possible to add conditions:
-
-  ! app.css
-  < development.css [mode==development] [minify==0]
-  < production.css  [mode!=development]
-
-"development.css" will be processed if L<Mojolicious/mode> is "development" and
-L<Mojolicious::Plugin::AssetPack/minify> is "0". "production.css" will be
-processed if L<Mojolicious/mode> is something else than "development". This is
-especially useful if you want to include a JavaScript with debug flags set
-while developing, but switch to a smaller version without debug in production.
-
-=head2 Using assets
-
-Any processed asset can be accessed by referring to a topic.
-
-=head3 Template
-
-An asset can be included in a template using the
-L<Mojolicious::Plugin::AssetPack/asset> helper:
-
-  <head>
-    %= asset "app.css"
-    %= asset "app.js"
-  </head>
-
-The L<Mojolicious::Plugin::AssetPack/asset> helper takes additional arguments
-which will be passed on directly to either the
-L<Mojolicious::Plugin::TagHelpers/javascript> helper or
-L<Mojolicious::Plugin::TagHelpers/stylesheet> helper. Example:
-
-    %= asset "app.css", media => "print"
-
-In production mode, the helper above will just result in one "link" tag. On the
-other hand, if you are in "development" mode, it will result in on "link" tag
-per source asset.
-
-=head3 Asset objects
-
-It is also possible to retrieve the processed asset objects. The example
-below will retrieve a L<Mojo::Collection> object holding zero or more
-L<Mojolicious::Plugin::AssetPack::Asset> objects:
-
-  my $collection = $app->asset->processed("app.css");
-  print $collection->map("checksum")->join(", ");
-
-This can also be used to inline assets in a template:
-
-  %= stylesheet sub { asset->processed('app.css')->map('content')->join }
-
-=head2 Application mode
-
-The application L<mode|Mojolicious/mode> will define if the assets should be
-combined and minified. The L<Mojolicious::Plugin::AssetPack/minify> attribute
-can also be set manually if you have special needs.
-
-=head3 Development
-
-The assets will be processed, but not minified/combined if L<MOJO_MODE> or
-L<Mojolicious/mode> is set to "development". This is to make it easier to
-map JavaScript or CSS bugs to a specific file and line. "development" is
-the default mode while running L<morbo|Mojo::Server::Morbo>:
-
-  $ morbo -w assets/ -w lib/ -w templates/ script/myapp
-
-=head3 Any other mode
-
-Any "production" mode will result in one combined and minified asset. This will
-save bandwidth and roundtrip time to the server.
-
-=head2 Caching
-
-Processed assets will be cached to disk when possible. The process step is run
-so if such a processed asset exists, the process step will not be run again.
-Again, the external tools (less, coffee, ...) and modules
-(L<JavaScript::Minifier::XS>, L<CSS::Sass>) will only be required while
-developing, but can be skipped when installing an already built application.
-
-=head2 Assets without topics
-
-One nifty feature is to use L<Mojolicious::Plugin::AssetPack> for assets which
-do not have any pipe to process them. The reason why this comes in handy is to
-avoid cache issues, since changing the file on disk will generate a new URL.
-
-These assets can also be defined directly in the templates, without having to
-be defined in the application startup process. Examples:
-
-  # <img src="/asset/52e98718f0/foo.gif">
-  %= asset "/image/foo.gif"
-
-  # <img src="/asset/87652910af/baz.svg">
-  %= asset "/image/baz.svg"
-
-  # <link rel="icon" href="/asset/65428718f1/bar.ico">
-  %= asset "/image/bar.ico"
-
-  # <source src="/asset/87652718f0/baz.mp3" type="audio/mpeg">
-  %= asset "/audio/baz.mp3"
-
-  # <source src="/asset/52e87652f0/foo.mp4" type="video/mp4">
-  %= asset "/video/foo.mp4"
-
-  # <source src="/asset/52eaz7613a/bar.ogg" type="audio/ogg">
-  %= asset "/audio/bar.ogg"
-
-  # <source src="/asset/baf72618f1/foo.ogv" type="audio/ogv">
-  %= asset "/video/foo.ogv"
-
-  # <source src="/asset/92118711f0/bar.webm" type="audio/webm">
-  %= asset "/video/bar.webm"
-
-=head1 SEE ALSO
-
-L<Mojolicious::Plugin::AssetPack>,
-L<Mojolicious::Plugin::AssetPack::Guides::Developing> and
-L<Mojolicious::Plugin::AssetPack::Guides::Cookbook>.
-
-=cut
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Mojolicious-Plugin-AssetPack-2.08/lib/Mojolicious/Plugin/AssetPack/Pipe/Sass.pm
 
new/Mojolicious-Plugin-AssetPack-2.09/lib/Mojolicious/Plugin/AssetPack/Pipe/Sass.pm
--- 
old/Mojolicious-Plugin-AssetPack-2.08/lib/Mojolicious/Plugin/AssetPack/Pipe/Sass.pm
 2018-11-01 02:31:50.000000000 +0100
+++ 
new/Mojolicious-Plugin-AssetPack-2.09/lib/Mojolicious/Plugin/AssetPack/Pipe/Sass.pm
 2020-09-07 01:46:05.000000000 +0200
@@ -12,13 +12,13 @@
 
 $SOURCE_MAP_PLACEHOLDER =~ s!::!_!g;
 
-has functions => sub { +{} };
+has functions           => sub { +{} };
 has generate_source_map => sub { shift->app->mode eq 'development' ? 1 : 0 };
 
 sub process {
   my ($self, $assets) = @_;
   my $store = $self->assetpack->store;
-  my %opts = (include_paths => [undef, @{$self->assetpack->store->paths}]);
+  my %opts  = (include_paths => [undef, @{$self->assetpack->store->paths}]);
   my $file;
 
   for my $name (keys %{$self->functions}) {
@@ -27,7 +27,7 @@
   }
 
   if ($self->generate_source_map) {
-    $opts{source_map_file} = $SOURCE_MAP_PLACEHOLDER;
+    $opts{source_map_file}      = $SOURCE_MAP_PLACEHOLDER;
     $opts{source_map_file_urls} = $self->app->mode eq 'development' ? 1 : 0;
   }
 
@@ -72,7 +72,7 @@
 
 sub _add_source_map_asset {
   my ($self, $asset, $css, $stats) = @_;
-  my $data = decode_json $stats->{source_map_string};
+  my $data       = decode_json $stats->{source_map_string};
   my $source_map = Mojolicious::Plugin::AssetPack::Asset->new(url => 
sprintf('%s.css.map', $asset->name));
 
   # override "stdin" with real file
@@ -134,7 +134,7 @@
 
 sub _include_path {
   my $asset = shift;
-  return $asset->url if $asset->url =~ m!^https?://!;
+  return $asset->url           if $asset->url =~ m!^https?://!;
   return $asset->path->dirname if $asset->path;
   return '';
 }
@@ -218,10 +218,6 @@
 L<https://robots.thoughtbot.com/sass-source-maps-chrome-magic> for more
 information about the usefulness.
 
-See also Mojolicious::Plugin::AssetPack::Guides::Developing/Faster development
-cycle> for how to reload the page when changes are done inside the browser's
-dev tools.
-
 =head1 METHODS
 
 =head2 process
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Mojolicious-Plugin-AssetPack-2.08/lib/Mojolicious/Plugin/AssetPack.pm 
new/Mojolicious-Plugin-AssetPack-2.09/lib/Mojolicious/Plugin/AssetPack.pm
--- old/Mojolicious-Plugin-AssetPack-2.08/lib/Mojolicious/Plugin/AssetPack.pm   
2019-05-07 16:16:40.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-2.09/lib/Mojolicious/Plugin/AssetPack.pm   
2020-09-07 01:56:50.000000000 +0200
@@ -1,12 +1,12 @@
 package Mojolicious::Plugin::AssetPack;
 use Mojo::Base 'Mojolicious::Plugin';
 
-use Mojo::Util qw(deprecated trim);
+use Mojo::Util qw(deprecated trim xml_escape);
 use Mojolicious::Plugin::AssetPack::Asset::Null;
 use Mojolicious::Plugin::AssetPack::Store;
 use Mojolicious::Plugin::AssetPack::Util qw(diag has_ro load_module DEBUG);
 
-our $VERSION = '2.08';
+our $VERSION = '2.09';
 
 has minify => sub { shift->_app->mode eq 'development' ? 0 : 1 };
 
@@ -33,7 +33,7 @@
 sub process {
   my ($self, $topic, @input) = @_;
 
-  $self->route unless $self->{route_added}++;
+  $self->route                            unless $self->{route_added}++;
   return $self->_process_from_def($topic) unless @input;
 
   # TODO: The idea with blessed($_) is that maybe the user can pass inn
@@ -187,12 +187,12 @@
   $self->_process($topic => $self->{input}{$topic}) if $self->{lazy};
 
   my $assets = $self->{by_topic}{$topic} ||= $self->_static_asset($topic);
-  my %args = (base_url => $route->pattern->defaults->{base_url} || '', topic 
=> $topic);
+  my %args   = (base_url => $route->pattern->defaults->{base_url} || '', topic 
=> $topic);
   $args{base_url} =~ s!/+$!!;
 
   return Mojo::ByteStream->new(
     join "\n",
-    map { $_->tag_for->($_, $c, \%args, @attrs) }
+    map    { $_->tag_for->($_, $c, \%args, @attrs) }
       grep { !$_->isa('Mojolicious::Plugin::AssetPack::Asset::Null') } @$assets
   );
 }
@@ -213,7 +213,7 @@
     return $self->store->serve_fallback_for_assets($c, $topic, $assets);
   }
 
-  $c->render(text => "// No such asset '$topic'\n", status => 404);
+  $c->render(text => sprintf("// No such asset '%s'\n", xml_escape $topic), 
status => 404);
 }
 
 sub _static_asset {
@@ -232,94 +232,27 @@
 
 Mojolicious::Plugin::AssetPack - Compress and convert css, less, sass, 
javascript and coffeescript files
 
-=head1 VERSION
-
-2.08
-
-=head1 SYNOPSIS
-
-=head2 Application
-
-  use Mojolicious::Lite;
-
-  # Load plugin and pipes in the right order
-  plugin AssetPack => {
-    pipes => [qw(Less Sass Css CoffeeScript Riotjs JavaScript Combine)]
-  };
-
-  # define asset
-  app->asset->process(
-    # virtual name of the asset
-    "app.css" => (
-
-      # source files used to create the asset
-      "sass/bar.scss",
-      
"https://github.com/Dogfalo/materialize/blob/master/sass/materialize.scss";,
-    )
-  );
-
-=head2 Template
-
-  <html>
-    <head>
-      %= asset "app.css"
-    </head>
-    <body><%= content %></body>
-  </html>
-
 =head1 DESCRIPTION
 
-L<Mojolicious::Plugin::AssetPack> is L<Mojolicious plugin|Mojolicious::Plugin>
-for processing static assets. The idea is that JavaScript and CSS files should
-be served as one minified file to save bandwidth and roundtrip time to the
-server.
-
-Note that the main author have moved on to using
-L<Mojolicious::Plugin::Webpack> instead, which uses
-L<https://webpack.js.org/> under the hood, but is just as convenient to use as
-this plugin. It is very easy to try out
-L<Mojolicious::Plugin::Webpack>, since it will detect your AssetPack
-based project automatically, and migrate them over to webpack once the plugin
-is loaded.
-
-There are many external tools for doing this, but integrating them with
-L<Mojolicious> can be a struggle: You want to serve the source files directly
-while developing, but a minified version in production. This assetpack plugin
-will handle all of that automatically for you.
-
-Your application creates and refers to an asset by its topic (virtual asset
-name).  The process of building actual assets from their components is
-delegated to "pipe objects". Please see
-L<Mojolicious::Plugin::AssetPack::Guides::Tutorial/Pipes> for a complete list.
-
-=head1 BREAKING CHANGES
-
-=head2 assetpack.db (v1.47)
-
-C<assetpack.db> no longer track files downloaded from the internet. It will
-mostly "just work", but in some cases version 1.47 might download assets that
-have already been downloaded with AssetPack version 1.46 and earlier.
+L<Mojolicious::Plugin::AssetPack> has a very limited feature set, especially
+when it comes to processing JavaScript. It is recommended that you switch to
+L<Mojolicious::Plugin::Webpack> if you want to write modern JavaScript code.
 
-The goal is to remove C<assetpack.db> completely.
+=head2 Existing user?
 
-=head1 GUIDES
+It is I<very> simple to migrate from L<Mojolicious::Plugin::AssetPack> to
+L<Mojolicious::Plugin::Webpack>. Just check out the one line change in
+L<Mojolicious::Plugin::Webpack/MIGRATING-FROM-ASSETPACK>.
 
-=over 2
-
-=item * L<Mojolicious::Plugin::AssetPack::Guides::Tutorial>
-
-The tutorial will give an introduction to how AssetPack can be used.
+=head2 Don't want to switch?
 
-=item * L<Mojolicious::Plugin::AssetPack::Guides::Developing>
+Your existing code will probably continue to work for a long time, but it will
+get more and more difficult to write I<new> working JavaScript with
+L<Mojolicious::Plugin::AssetPack> as time goes by.
 
-The "developing" guide will give insight on how to do effective development 
with
-AssetPack and more details about the internals in this plugin.
+=head2 New user?
 
-=item * L<Mojolicious::Plugin::AssetPack::Guides::Cookbook>
-
-The cookbook has various receipes on how to cook with AssetPack.
-
-=back
+Look no further. Just jump over to L<Mojolicious::Plugin::Webpack>.
 
 =head1 HELPERS
 
@@ -336,8 +269,6 @@
 The helper name "asset" can be customized by specifying "helper" when
 L<registering|/register> the plugin.
 
-See L<Mojolicious::Plugin::AssetPack::Guides::Tutorial> for more details.
-
 =head1 ATTRIBUTES
 
 =head2 minify
@@ -348,9 +279,6 @@
 Set this to true to combine and minify the assets. Defaults to false if
 L<Mojolicious/mode> is "development" and true otherwise.
 
-See L<Mojolicious::Plugin::AssetPack::Guides::Tutorial/Application mode>
-for more details.
-
 =head2 route
 
   $route = $self->route;
@@ -364,9 +292,6 @@
 The default route will be built and added to the L<application|Mojolicious>
 when L</process> is called the first time.
 
-See L<Mojolicious::Plugin::AssetPack::Guides::Cookbook/ASSETS FROM CUSTOM 
DOMAIN>
-for an example on how to customize this route.
-
 =head2 store
 
   $obj = $self->store;
@@ -401,9 +326,7 @@
   $self = $self->process($definition_file);
 
 Used to process assets. A C<$definition_file> can be used to define C<$topic>
-and C<@assets> in a separate file. See
-L<Mojolicious::Plugin::AssetPack::Guides::Tutorial/Process assets> for more
-details.
+and C<@assets> in a separate file.
 
 C<$definition_file> defaults to "assetpack.def".
 
@@ -434,9 +357,6 @@
 
   $app->plugin(AssetPack => {pipes => [qw(Sass Css Combine)]);
 
-See L<Mojolicious::Plugin::AssetPack::Guides::Tutorial/Pipes> for a complete
-list of available pipes.
-
 =item * proxy
 
 A hash of proxy settings. Set this to C<0> to disable proxy detection.
@@ -452,14 +372,9 @@
 
 L<Mojolicious::Plugin::Webpack>.
 
-L</GUIDES>,
-L<Mojolicious::Plugin::AssetPack::Asset>,
-L<Mojolicious::Plugin::AssetPack::Pipe> and
-L<Mojolicious::Plugin::AssetPack::Store>.
-
 =head1 COPYRIGHT AND LICENSE
 
-Copyright (C) 2014, Jan Henning Thorsen
+Copyright (C) 2020, Jan Henning Thorsen
 
 This program is free software, you can redistribute it and/or modify it under
 the terms of the Artistic License version 2.0.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-2.08/t/not-found.t 
new/Mojolicious-Plugin-AssetPack-2.09/t/not-found.t
--- old/Mojolicious-Plugin-AssetPack-2.08/t/not-found.t 2018-09-08 
16:18:41.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-2.09/t/not-found.t 2020-09-07 
01:41:24.000000000 +0200
@@ -25,6 +25,10 @@
 
$t->get_ok('/asset/aaaaaaaaaa/something.png')->status_is(302)->header_like(Location
 => qr{^/asset/\w+/something.png$});
 $t->get_ok($t->tx->res->headers->location)->status_is(200);
 
+# XSS attack
+$t->get_ok('/asset/aaaaaaaaaa/foo.xml%3Cscript%3Ealert(\'ouch\')%3C/script%3E')->status_is(404)
+  ->content_is("// No such asset 
'foo.xml&lt;script&gt;alert(&#39;ouch&#39;)&lt;/script&gt;'\n");
+
 done_testing;
 
 __DATA__


Reply via email to