Hello community,
here is the log from the commit of package perl-Mojolicious-Plugin-AssetPack
for openSUSE:Factory checked in at 2016-06-25 02:24:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-05 14:20:44.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Mojolicious-Plugin-AssetPack.new/perl-Mojolicious-Plugin-AssetPack.changes
2016-06-25 02:24:21.000000000 +0200
@@ -1,0 +2,12 @@
+Thu Jun 23 06:41:58 UTC 2016 - [email protected]
+
+- updated to 1.14
+ see /usr/share/doc/packages/perl-Mojolicious-Plugin-AssetPack/Changes
+
+ 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
+ - Fix replacing all fetched files #94
+ - Will show download error message #96
+
+-------------------------------------------------------------------
Old:
----
Mojolicious-Plugin-AssetPack-1.13.tar.gz
New:
----
Mojolicious-Plugin-AssetPack-1.14.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Mojolicious-Plugin-AssetPack.spec ++++++
--- /var/tmp/diff_new_pack.KZYOa8/_old 2016-06-25 02:24:22.000000000 +0200
+++ /var/tmp/diff_new_pack.KZYOa8/_new 2016-06-25 02:24:22.000000000 +0200
@@ -17,7 +17,7 @@
Name: perl-Mojolicious-Plugin-AssetPack
-Version: 1.13
+Version: 1.14
Release: 0
%define cpan_name Mojolicious-Plugin-AssetPack
Summary: Compress and convert css, less, sass, javascript and
coffeescript files
++++++ Mojolicious-Plugin-AssetPack-1.13.tar.gz ->
Mojolicious-Plugin-AssetPack-1.14.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.13/.travis.yml
new/Mojolicious-Plugin-AssetPack-1.14/.travis.yml
--- old/Mojolicious-Plugin-AssetPack-1.13/.travis.yml 2016-04-02
21:25:40.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.14/.travis.yml 2016-06-21
13:26:33.000000000 +0200
@@ -11,7 +11,7 @@
- 'HARNESS_OPTIONS=j1 TEST_ONLINE=1'
install:
- 'cpanm -n Test::Pod Test::Pod::Coverage IO::Socket::SSL'
- - 'cpanm -n CSS::Minifier::XS CSS::Sass Imager::File::PNG
JavaScript::Minifier::XS'
+ - 'cpanm -n CSS::Minifier::XS Imager::File::PNG JavaScript::Minifier::XS'
- 'cpanm -n --installdeps .'
notifications:
email: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.13/Changes
new/Mojolicious-Plugin-AssetPack-1.14/Changes
--- old/Mojolicious-Plugin-AssetPack-1.13/Changes 2016-05-21
08:11:27.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.14/Changes 2016-06-21
13:33:41.000000000 +0200
@@ -1,5 +1,11 @@
Revision history for perl distribution Mojolicious-Plugin-AssetPack
+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
+ - Fix replacing all fetched files #94
+ - Will show download error message #96
+
1.13 2016-05-21T08:11:27+0200
- Fix sass-current-app.t after 1.12
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.13/MANIFEST
new/Mojolicious-Plugin-AssetPack-1.14/MANIFEST
--- old/Mojolicious-Plugin-AssetPack-1.13/MANIFEST 2016-05-21
08:11:29.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.14/MANIFEST 2016-06-21
13:33:41.000000000 +0200
@@ -62,6 +62,7 @@
t/coffee.t
t/css.t
t/Dynamic.pm
+t/fetch-all.t
t/font-awesome.t
t/google-font.t
t/Helper.pm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.13/META.json
new/Mojolicious-Plugin-AssetPack-1.14/META.json
--- old/Mojolicious-Plugin-AssetPack-1.13/META.json 2016-05-21
08:11:29.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.14/META.json 2016-06-21
13:33:41.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.150001",
+ "generated_by" : "ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter
version 2.150005",
"license" : [
"artistic_2"
],
@@ -48,5 +48,6 @@
"url" :
"https://github.com/jhthorsen/mojolicious-plugin-assetpack.git"
}
},
- "version" : "1.13"
+ "version" : "1.14",
+ "x_serialization_backend" : "JSON::PP version 2.27300"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.13/META.yml
new/Mojolicious-Plugin-AssetPack-1.14/META.yml
--- old/Mojolicious-Plugin-AssetPack-1.13/META.yml 2016-05-21
08:11:28.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.14/META.yml 2016-06-21
13:33:41.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.150001'
+generated_by: 'ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter
version 2.150005'
license: artistic_2
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -25,4 +25,5 @@
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.13'
+version: '1.14'
+x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.13/README
new/Mojolicious-Plugin-AssetPack-1.14/README
--- old/Mojolicious-Plugin-AssetPack-1.13/README 2016-05-21
08:11:27.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.14/README 2016-06-21
13:33:41.000000000 +0200
@@ -3,7 +3,7 @@
javascript and coffeescript files
VERSION
- 1.13
+ 1.14
SYNOPSIS
Application
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Mojolicious-Plugin-AssetPack-1.13/lib/Mojolicious/Plugin/AssetPack/Guides/Cookbook.pod
new/Mojolicious-Plugin-AssetPack-1.14/lib/Mojolicious/Plugin/AssetPack/Guides/Cookbook.pod
---
old/Mojolicious-Plugin-AssetPack-1.13/lib/Mojolicious/Plugin/AssetPack/Guides/Cookbook.pod
2016-04-16 22:14:47.000000000 +0200
+++
new/Mojolicious-Plugin-AssetPack-1.14/lib/Mojolicious/Plugin/AssetPack/Guides/Cookbook.pod
2016-06-21 12:36:10.000000000 +0200
@@ -62,13 +62,33 @@
=head2 Bootstrap
-The SASS version of L<http://getbootstrap.com> can easily be included:
+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:
- $app->asset->process(
- "app.css" => (
-
"https://github.com/twbs/bootstrap-sass/raw/master/assets/stylesheets/_bootstrap.scss"
- )
- );
+ $ 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
@@ -121,15 +141,37 @@
=head2 Materialize CSS
-L<http://materializecss.com/> can be included with the same code below.
-L<Mojolicious::Plugin::AssetPack::Pipe::Sass> will also discover all the
-"@import" files and download those recusively as well.
+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";
+ ...
- $app->asset->process(
- "app.css" => (
-
"https://github.com/Dogfalo/materialize/blob/master/sass/materialize.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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Mojolicious-Plugin-AssetPack-1.13/lib/Mojolicious/Plugin/AssetPack/Pipe/Fetch.pm
new/Mojolicious-Plugin-AssetPack-1.14/lib/Mojolicious/Plugin/AssetPack/Pipe/Fetch.pm
---
old/Mojolicious-Plugin-AssetPack-1.13/lib/Mojolicious/Plugin/AssetPack/Pipe/Fetch.pm
2016-04-16 22:14:47.000000000 +0200
+++
new/Mojolicious-Plugin-AssetPack-1.14/lib/Mojolicious/Plugin/AssetPack/Pipe/Fetch.pm
2016-06-21 13:01:20.000000000 +0200
@@ -4,7 +4,7 @@
use Mojo::URL;
# Only made public for quick fixes. Subject for change
-our $URL_RE = qr{url\((['"])(.*?)\1\)};
+our $URL_RE = qr{url\((['"]{0,1})((?:http?|).*?)\1\)};
sub process {
my ($self, $assets) = @_;
@@ -19,22 +19,26 @@
my $base = Mojo::URL->new($asset->url);
my $content = $asset->content;
- my %seen;
+ 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;
$url = $url->base($base)->to_abs unless $url->is_abs;
- next if $seen{$url}++;
- diag "Fetch resource $url" if DEBUG;
- my $related = $store->asset($url);
- $self->assetpack->process($related->name, $related);
- my $path = $route->render($related->TO_JSON);
- $path =~ s!^/!!;
- my $up = join '', map {'../'} $path =~ m!\/!g;
+
+ unless ($related{$url}) {
+ diag "Fetch resource $url" if DEBUG;
+ my $related = $store->asset($url);
+ $self->assetpack->process($related->name, $related);
+ my $path = $route->render($related->TO_JSON);
+ $path =~ s!^/!!;
+ my $up = join '', map {'../'} $path =~ m!\/!g;
+ $related{$url} = "$up$path";
+ }
+
substr $content, $start, $len,
- Mojo::URL->new("$up$path")->query(Mojo::Parameters->new);
+ Mojo::URL->new($related{$url})->query(Mojo::Parameters->new);
pos($content) = $start + $len;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Mojolicious-Plugin-AssetPack-1.13/lib/Mojolicious/Plugin/AssetPack/Pipe/Less.pm
new/Mojolicious-Plugin-AssetPack-1.14/lib/Mojolicious/Plugin/AssetPack/Pipe/Less.pm
---
old/Mojolicious-Plugin-AssetPack-1.13/lib/Mojolicious/Plugin/AssetPack/Pipe/Less.pm
2016-04-08 22:38:57.000000000 +0200
+++
new/Mojolicious-Plugin-AssetPack-1.14/lib/Mojolicious/Plugin/AssetPack/Pipe/Less.pm
2016-06-21 12:36:10.000000000 +0200
@@ -1,6 +1,7 @@
package Mojolicious::Plugin::AssetPack::Pipe::Less;
use Mojo::Base 'Mojolicious::Plugin::AssetPack::Pipe';
use Mojolicious::Plugin::AssetPack::Util qw(diag $CWD DEBUG);
+use File::Basename 'dirname';
sub process {
my ($self, $assets) = @_;
@@ -18,7 +19,7 @@
my @args = qw(lessc --no-color);
my $file
= $asset->path ? $asset :
Mojo::Asset::File->new->add_chunk($asset->content);
- push @args, '--include-path' => dirname $asset->path if $asset->path;
+ push @args, '--include-path='.dirname($asset->path) if $asset->path;
push @args, $file->path;
$self->run(\@args, undef, \my $css);
$asset->content($store->save(\$css, $attrs))->FROM_JSON($attrs);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Mojolicious-Plugin-AssetPack-1.13/lib/Mojolicious/Plugin/AssetPack/Store.pm
new/Mojolicious-Plugin-AssetPack-1.14/lib/Mojolicious/Plugin/AssetPack/Store.pm
---
old/Mojolicious-Plugin-AssetPack-1.13/lib/Mojolicious/Plugin/AssetPack/Store.pm
2016-04-17 10:25:32.000000000 +0200
+++
new/Mojolicious-Plugin-AssetPack-1.14/lib/Mojolicious/Plugin/AssetPack/Store.pm
2016-06-21 12:51:03.000000000 +0200
@@ -178,7 +178,7 @@
my $h = $tx->res->headers;
if ($tx->error) {
- diag 'Unable to download "%s": %s', $req_url, $tx->error->{message} if
DEBUG;
+ diag 'Unable to download "%s": %s', $req_url, $tx->error->{message};
return undef;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Mojolicious-Plugin-AssetPack-1.13/lib/Mojolicious/Plugin/AssetPack.pm
new/Mojolicious-Plugin-AssetPack-1.14/lib/Mojolicious/Plugin/AssetPack.pm
--- old/Mojolicious-Plugin-AssetPack-1.13/lib/Mojolicious/Plugin/AssetPack.pm
2016-05-21 08:11:27.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.14/lib/Mojolicious/Plugin/AssetPack.pm
2016-06-21 13:33:41.000000000 +0200
@@ -1,10 +1,12 @@
package Mojolicious::Plugin::AssetPack;
use Mojo::Base 'Mojolicious::Plugin';
+
+use Mojo::Util 'trim';
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 = '1.13';
+our $VERSION = '1.14';
has minify => sub { shift->_app->mode eq 'development' ? 0 : 1 };
@@ -152,7 +154,7 @@
bless $asset, 'Mojolicious::Plugin::AssetPack::Asset::Null' if $class eq
'<';
push @{$process{$topic}}, $asset;
}
- elsif (/^\!\s*(.+)/) { $topic = $1; }
+ elsif (/^\!\s*(.+)/) { $topic = trim $1; }
}
$self->process($_ => @{$process{$_}}) for keys %process;
@@ -220,7 +222,7 @@
=head1 VERSION
-1.13
+1.14
=head1 SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.13/t/fetch-all.t
new/Mojolicious-Plugin-AssetPack-1.14/t/fetch-all.t
--- old/Mojolicious-Plugin-AssetPack-1.13/t/fetch-all.t 1970-01-01
01:00:00.000000000 +0100
+++ new/Mojolicious-Plugin-AssetPack-1.14/t/fetch-all.t 2016-06-21
13:29:41.000000000 +0200
@@ -0,0 +1,19 @@
+use t::Helper;
+
+plan skip_all => 'TEST_ONLINE=1' unless $ENV{TEST_ONLINE} or -e
'.test-everything';
+
+my $t = t::Helper->t(pipes => [qw(Css Fetch)]);
+$t->app->asset->process('app.css' =>
'http://harvesthq.github.io/chosen/chosen.css');
+
+$t->get_ok('/')->status_is(200);
+$t->get_ok($t->tx->res->dom->at('link')->{href})->status_is(200)
+ ->content_like(qr{\Q../../\Easset/\w+/chosen-sprite\.png'?\)})
+ ->content_like(qr{\Q../../\Easset/\w+/chosen-sprite\@2x\.png'?\)})
+ ->content_unlike(qr{\Qurl('chosen-sprite.png')\E});
+
+done_testing;
+
+__DATA__
+@@ index.html.ep
+%= asset 'app.css'
+Hello world
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.13/t/google-font.t
new/Mojolicious-Plugin-AssetPack-1.14/t/google-font.t
--- old/Mojolicious-Plugin-AssetPack-1.13/t/google-font.t 2016-04-08
15:33:40.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.14/t/google-font.t 2016-06-21
12:46:14.000000000 +0200
@@ -2,21 +2,22 @@
plan skip_all => 'TEST_ONLINE=1' unless $ENV{TEST_ONLINE} or -e
'.test-everything';
-my $t = t::Helper->t(pipes => ['Css']);
+my $t = t::Helper->t(pipes => [qw(Css Fetch)]);
$t->app->asset->process(
'app.css' => 'http://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
$t->get_ok($t->tx->res->dom->at('link')->{href})->status_is(200)
- ->header_is('Content-Type',
'text/css')->content_like(qr{font-family:\W*Roboto});
+ ->header_is('Content-Type',
'text/css')->content_like(qr{font-family:\W*Roboto})
+ ->content_like(qr{\Qurl(../../asset/7520cea9d1/\E.*\.ttf\)});
my $cache_file = File::Spec->catfile(
qw(t assets cache fonts.googleapis.com css_family_Roboto_400_700));
ok -e $cache_file, 'cache file does not contain weird characters';
# make sure we are able to load from cache
-my $t2 = t::Helper->t(pipes => ['Css']);
+my $t2 = t::Helper->t(pipes => [qw(Css Fetch)]);
$t2->app->asset->process(
'app.css' => 'http://fonts.googleapis.com/css?family=Roboto:400,700');
$t2->get_ok('/');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.13/t/mode.t
new/Mojolicious-Plugin-AssetPack-1.14/t/mode.t
--- old/Mojolicious-Plugin-AssetPack-1.13/t/mode.t 2016-04-25
10:28:51.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.14/t/mode.t 2016-06-21
13:26:12.000000000 +0200
@@ -24,7 +24,9 @@
@@ index.html.ep
%= asset 'app.css'
@@ assetpack.def
-! app.css
+# there should be a whitespace after "! app.css"
+# https://github.com/jhthorsen/mojolicious-plugin-assetpack/issues/93
+! app.css
< development.css [mode==development] [minify==0]
< production.css [mode==production]
< foo.css [mode!=development]