Hello community,

here is the log from the commit of package perl-Mojolicious-Plugin-AssetPack 
for openSUSE:Factory checked in at 2016-07-12 23:51:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Mojolicious-Plugin-AssetPack (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Mojolicious-Plugin-AssetPack.new 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Mojolicious-Plugin-AssetPack"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-Mojolicious-Plugin-AssetPack/perl-Mojolicious-Plugin-AssetPack.changes
      2016-06-25 02:24:21.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-Mojolicious-Plugin-AssetPack.new/perl-Mojolicious-Plugin-AssetPack.changes
 2016-07-12 23:51:20.000000000 +0200
@@ -1,0 +2,18 @@
+Mon Jul  4 12:54:35 UTC 2016 - [email protected]
+
+- updated to 1.16
+   see /usr/share/doc/packages/perl-Mojolicious-Plugin-AssetPack/Changes
+
+  1.16 2016-06-29T19:05:43+0200
+   - Improved documentation for store() #101
+
+-------------------------------------------------------------------
+Fri Jun 24 06:03:56 UTC 2016 - [email protected]
+
+- updated to 1.15
+   see /usr/share/doc/packages/perl-Mojolicious-Plugin-AssetPack/Changes
+
+  1.15 2016-06-23T10:50:26+0200
+   - Fix Fetch pipe will skip downloading "data:..." urls #100
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ perl-Mojolicious-Plugin-AssetPack.spec ++++++
--- /var/tmp/diff_new_pack.tmVkvT/_old  2016-07-12 23:51:21.000000000 +0200
+++ /var/tmp/diff_new_pack.tmVkvT/_new  2016-07-12 23:51:21.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Mojolicious-Plugin-AssetPack
-Version:        1.14
+Version:        1.16
 Release:        0
 %define cpan_name Mojolicious-Plugin-AssetPack
 Summary:        Compress and convert css, less, sass, javascript and 
coffeescript files

++++++ Mojolicious-Plugin-AssetPack-1.14.tar.gz -> 
Mojolicious-Plugin-AssetPack-1.16.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.14/Changes 
new/Mojolicious-Plugin-AssetPack-1.16/Changes
--- old/Mojolicious-Plugin-AssetPack-1.14/Changes       2016-06-21 
13:33:41.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.16/Changes       2016-06-29 
19:05:43.000000000 +0200
@@ -1,5 +1,11 @@
 Revision history for perl distribution Mojolicious-Plugin-AssetPack
 
+1.16 2016-06-29T19:05:43+0200
+ - Improved documentation for store() #101
+
+1.15 2016-06-23T10:50:26+0200
+ - Fix Fetch pipe will skip downloading "data:..." urls #100
+
 1.14 2016-06-21T13:33:41+0200
  - Fix Fetch::URL_RE for url(...) without quotes #91 #99
  - Fix trimming whitespace for topics in .def file, closes #93
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.14/MANIFEST 
new/Mojolicious-Plugin-AssetPack-1.16/MANIFEST
--- old/Mojolicious-Plugin-AssetPack-1.14/MANIFEST      2016-06-21 
13:33:41.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.16/MANIFEST      2016-06-29 
19:05:44.000000000 +0200
@@ -67,6 +67,7 @@
 t/google-font.t
 t/Helper.pm
 t/jpeg.t
+t/jquery-mobile.t
 t/js.t
 t/less.t
 t/mode.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.14/META.json 
new/Mojolicious-Plugin-AssetPack-1.16/META.json
--- old/Mojolicious-Plugin-AssetPack-1.14/META.json     2016-06-21 
13:33:41.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.16/META.json     2016-06-29 
19:05:44.000000000 +0200
@@ -4,7 +4,7 @@
       "Jan Henning Thorsen <[email protected]>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter 
version 2.150005",
+   "generated_by" : "ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter 
version 2.150001",
    "license" : [
       "artistic_2"
    ],
@@ -48,6 +48,5 @@
          "url" : 
"https://github.com/jhthorsen/mojolicious-plugin-assetpack.git";
       }
    },
-   "version" : "1.14",
-   "x_serialization_backend" : "JSON::PP version 2.27300"
+   "version" : "1.16"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.14/META.yml 
new/Mojolicious-Plugin-AssetPack-1.16/META.yml
--- old/Mojolicious-Plugin-AssetPack-1.14/META.yml      2016-06-21 
13:33:41.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.16/META.yml      2016-06-29 
19:05:44.000000000 +0200
@@ -7,7 +7,7 @@
 configure_requires:
   ExtUtils::MakeMaker: '0'
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter 
version 2.150005'
+generated_by: 'ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter 
version 2.150001'
 license: artistic_2
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -25,5 +25,4 @@
   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: '1.14'
-x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
+version: '1.16'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.14/README 
new/Mojolicious-Plugin-AssetPack-1.16/README
--- old/Mojolicious-Plugin-AssetPack-1.14/README        2016-06-21 
13:33:41.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.16/README        2016-06-29 
19:05:43.000000000 +0200
@@ -3,7 +3,7 @@
     javascript and coffeescript files
 
 VERSION
-    1.14
+    1.16
 
 SYNOPSIS
   Application
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Mojolicious-Plugin-AssetPack-1.14/lib/Mojolicious/Plugin/AssetPack/Guides/Tutorial.pod
 
new/Mojolicious-Plugin-AssetPack-1.16/lib/Mojolicious/Plugin/AssetPack/Guides/Tutorial.pod
--- 
old/Mojolicious-Plugin-AssetPack-1.14/lib/Mojolicious/Plugin/AssetPack/Guides/Tutorial.pod
  2016-06-21 12:36:10.000000000 +0200
+++ 
new/Mojolicious-Plugin-AssetPack-1.16/lib/Mojolicious/Plugin/AssetPack/Guides/Tutorial.pod
  2016-06-29 18:48:26.000000000 +0200
@@ -110,7 +110,10 @@
 
 L<Mojolicious::Plugin::AssetPack::Store> is a sub class of
 L<Mojolicious::Static>, allowing it to find files relative to
-L<Mojolicious::Static/paths>.
+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
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Mojolicious-Plugin-AssetPack-1.14/lib/Mojolicious/Plugin/AssetPack/Pipe/Fetch.pm
 
new/Mojolicious-Plugin-AssetPack-1.16/lib/Mojolicious/Plugin/AssetPack/Pipe/Fetch.pm
--- 
old/Mojolicious-Plugin-AssetPack-1.14/lib/Mojolicious/Plugin/AssetPack/Pipe/Fetch.pm
        2016-06-21 13:01:20.000000000 +0200
+++ 
new/Mojolicious-Plugin-AssetPack-1.16/lib/Mojolicious/Plugin/AssetPack/Pipe/Fetch.pm
        2016-06-23 10:46:04.000000000 +0200
@@ -4,7 +4,7 @@
 use Mojo::URL;
 
 # Only made public for quick fixes. Subject for change
-our $URL_RE = qr{url\((['"]{0,1})((?:http?|).*?)\1\)};
+our $URL_RE = qr{url\((['"]{0,1})(.*?)\1\)};
 
 sub process {
   my ($self, $assets) = @_;
@@ -22,14 +22,19 @@
       my %related;
 
       while ($content =~ /$URL_RE/g) {
-        my $url   = Mojo::URL->new($2);
-        my $len   = length $2;
-        my $start = pos($content) - length($1) - $len - 1;
+        my ($pre, $url) = ($1, $2);
+        my $len   = length $url;
+        my $start = pos($content) - length($pre) - $len - 1;
+
+        next if $url =~ /^data:/;    # Avoid "data:image/svg+xml..."
+
+        $url = Mojo::URL->new($url);
         $url = $url->base($base)->to_abs unless $url->is_abs;
 
         unless ($related{$url}) {
           diag "Fetch resource $url" if DEBUG;
-          my $related = $store->asset($url);
+          my $related = $store->asset($url)
+            or die "AssetPack was unable to fetch related asset $url";
           $self->assetpack->process($related->name, $related);
           my $path = $route->render($related->TO_JSON);
           $path =~ s!^/!!;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Mojolicious-Plugin-AssetPack-1.14/lib/Mojolicious/Plugin/AssetPack/Store.pm 
new/Mojolicious-Plugin-AssetPack-1.16/lib/Mojolicious/Plugin/AssetPack/Store.pm
--- 
old/Mojolicious-Plugin-AssetPack-1.14/lib/Mojolicious/Plugin/AssetPack/Store.pm 
    2016-06-21 12:51:03.000000000 +0200
+++ 
new/Mojolicious-Plugin-AssetPack-1.16/lib/Mojolicious/Plugin/AssetPack/Store.pm 
    2016-06-29 18:48:26.000000000 +0200
@@ -178,7 +178,8 @@
   my $h  = $tx->res->headers;
 
   if ($tx->error) {
-    diag 'Unable to download "%s": %s', $req_url, $tx->error->{message};
+    $self->ua->server->app->log->warn(
+      "[AssetPack] Unable to download $req_url: @{[$tx->error->{message}]}");
     return undef;
   }
 
@@ -223,6 +224,28 @@
 
 Mojolicious::Plugin::AssetPack::Store - Storage for assets
 
+=head1 SYNOPSIS
+
+  use Mojolicious::Lite;
+
+  # Load plugin and pipes in the right order
+  plugin AssetPack => {pipes => \@pipes};
+
+  # Change where assets can be found
+  app->asset->store->paths([
+    app->home->rel_dir("some/directory"),
+    "/some/other/directory",
+  ]);
+
+  # Change where assets are stored
+  app->asset->store->paths->[0] = app->home->rel_dir("some/directory");
+
+  # Define asset
+  app->asset->process($moniker => @assets);
+
+  # Retrieve a Mojolicious::Plugin::AssetPack::Asset object
+  my $asset = app->asset->store->asset("some/file.js");
+
 =head1 DESCRIPTION
 
 L<Mojolicious::Plugin::AssetPack::Store> is an object to manage cached
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Mojolicious-Plugin-AssetPack-1.14/lib/Mojolicious/Plugin/AssetPack.pm 
new/Mojolicious-Plugin-AssetPack-1.16/lib/Mojolicious/Plugin/AssetPack.pm
--- old/Mojolicious-Plugin-AssetPack-1.14/lib/Mojolicious/Plugin/AssetPack.pm   
2016-06-21 13:33:41.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.16/lib/Mojolicious/Plugin/AssetPack.pm   
2016-06-29 19:05:43.000000000 +0200
@@ -6,7 +6,7 @@
 use Mojolicious::Plugin::AssetPack::Store;
 use Mojolicious::Plugin::AssetPack::Util qw(diag has_ro load_module DEBUG);
 
-our $VERSION = '1.14';
+our $VERSION = '1.16';
 
 has minify => sub { shift->_app->mode eq 'development' ? 0 : 1 };
 
@@ -222,7 +222,7 @@
 
 =head1 VERSION
 
-1.14
+1.16
 
 =head1 SYNOPSIS
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.14/t/google-font.t 
new/Mojolicious-Plugin-AssetPack-1.16/t/google-font.t
--- old/Mojolicious-Plugin-AssetPack-1.14/t/google-font.t       2016-06-21 
12:46:14.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.16/t/google-font.t       2016-06-22 
07:35:35.000000000 +0200
@@ -4,7 +4,7 @@
 
 my $t = t::Helper->t(pipes => [qw(Css Fetch)]);
 $t->app->asset->process(
-  'app.css' => 'http://fonts.googleapis.com/css?family=Roboto:400,700');
+  'app.css' => 'https://fonts.googleapis.com/css?family=Roboto:400,700');
 $t->get_ok('/')->status_is(200);
 
 # comment from 
https://github.com/hugeinc/flexboxgrid-sass/blob/master/demo/sass/_code.scss
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.14/t/jquery-mobile.t 
new/Mojolicious-Plugin-AssetPack-1.16/t/jquery-mobile.t
--- old/Mojolicious-Plugin-AssetPack-1.14/t/jquery-mobile.t     1970-01-01 
01:00:00.000000000 +0100
+++ new/Mojolicious-Plugin-AssetPack-1.16/t/jquery-mobile.t     2016-06-23 
10:44:57.000000000 +0200
@@ -0,0 +1,17 @@
+use t::Helper;
+
+plan skip_all => 'TEST_ONLINE=1' unless $ENV{TEST_ONLINE};
+
+my $t = t::Helper->t(pipes => [qw(Css Fetch)]);
+$t->app->asset->process(
+  'app.css' => 'http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.css');
+$t->get_ok('/')->status_is(200);
+
+$t->get_ok($t->tx->res->dom->at('link')->{href})->status_is(200)
+  ->content_like(qr{\Qurl(../../asset/2edfb2ffe3/ajax-loader.gif)\E});
+
+done_testing;
+
+__DATA__
+@@ index.html.ep
+%= asset 'app.css'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.14/t/register.t 
new/Mojolicious-Plugin-AssetPack-1.16/t/register.t
--- old/Mojolicious-Plugin-AssetPack-1.14/t/register.t  2016-06-21 
12:36:10.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.16/t/register.t  2016-06-23 
10:50:13.000000000 +0200
@@ -14,7 +14,7 @@
 is $t->app->foo->ua->proxy->http, 'example.com', 'proxy http';
 
 {
-  local $TODO = $^O eq 'Win32' ? 'Proxy test fail on windows' : undef;
+  local $TODO = $^O eq 'MSWin32' ? 'Proxy test fail on windows' : undef;
   is_deeply $t->app->foo->ua->proxy->not, [qw(mojolicious.org 127.0.0.1 ::1 
localhost)],
     'proxy not';
 }


Reply via email to