Hello community, here is the log from the commit of package perl-Mojolicious-Plugin-AssetPack for openSUSE:Factory checked in at 2017-02-15 10:07:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2017-02-12 00:49:10.963835471 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Mojolicious-Plugin-AssetPack.new/perl-Mojolicious-Plugin-AssetPack.changes 2017-02-15 10:07:15.932929319 +0100 @@ -1,0 +2,11 @@ +Wed Feb 8 06:07:57 UTC 2017 - co...@suse.com + +- updated to 1.40 + see /usr/share/doc/packages/perl-Mojolicious-Plugin-AssetPack/Changes + + 1.40 2017-02-05T15:10:58-0800 + - Fix skipping @import in comments #121 + - Improved documentation for assetpack.def and paths #110 + - Can disable Pipe::Reloader from the browser + +------------------------------------------------------------------- Old: ---- Mojolicious-Plugin-AssetPack-1.39.tar.gz New: ---- Mojolicious-Plugin-AssetPack-1.40.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Mojolicious-Plugin-AssetPack.spec ++++++ --- /var/tmp/diff_new_pack.fOujFa/_old 2017-02-15 10:07:16.476852703 +0100 +++ /var/tmp/diff_new_pack.fOujFa/_new 2017-02-15 10:07:16.480852140 +0100 @@ -17,7 +17,7 @@ Name: perl-Mojolicious-Plugin-AssetPack -Version: 1.39 +Version: 1.40 Release: 0 %define cpan_name Mojolicious-Plugin-AssetPack Summary: Compress and convert css, less, sass, javascript and coffeescript files ++++++ Mojolicious-Plugin-AssetPack-1.39.tar.gz -> Mojolicious-Plugin-AssetPack-1.40.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.39/Changes new/Mojolicious-Plugin-AssetPack-1.40/Changes --- old/Mojolicious-Plugin-AssetPack-1.39/Changes 2017-01-25 22:39:45.000000000 +0100 +++ new/Mojolicious-Plugin-AssetPack-1.40/Changes 2017-02-06 00:10:58.000000000 +0100 @@ -1,7 +1,12 @@ Revision history for perl distribution Mojolicious-Plugin-AssetPack +1.40 2017-02-05T15:10:58-0800 + - Fix skipping @import in comments #121 + - Improved documentation for assetpack.def and paths #110 + - Can disable Pipe::Reloader from the browser + 1.39 2017-01-25T22:39:45+0100 - - Skipping t/sass-source-map.t for now + - Skipping t/sass-source-map.t for now #115 http://cpantesters.org/cpan/report/c59d94d4-e16e-11e6-ab5a-96809f28caea 1.38 2017-01-23T14:12:31+0100 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.39/META.json new/Mojolicious-Plugin-AssetPack-1.40/META.json --- old/Mojolicious-Plugin-AssetPack-1.39/META.json 2017-01-25 22:39:46.000000000 +0100 +++ new/Mojolicious-Plugin-AssetPack-1.40/META.json 2017-02-06 00:10:59.000000000 +0100 @@ -48,6 +48,6 @@ "url" : "https://github.com/jhthorsen/mojolicious-plugin-assetpack.git" } }, - "version" : "1.39", + "version" : "1.40", "x_serialization_backend" : "JSON::PP version 2.27300" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.39/META.yml new/Mojolicious-Plugin-AssetPack-1.40/META.yml --- old/Mojolicious-Plugin-AssetPack-1.39/META.yml 2017-01-25 22:39:46.000000000 +0100 +++ new/Mojolicious-Plugin-AssetPack-1.40/META.yml 2017-02-06 00:10:59.000000000 +0100 @@ -25,5 +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.39' +version: '1.40' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.39/README new/Mojolicious-Plugin-AssetPack-1.40/README --- old/Mojolicious-Plugin-AssetPack-1.39/README 2017-01-25 22:39:45.000000000 +0100 +++ new/Mojolicious-Plugin-AssetPack-1.40/README 2017-02-06 00:10:58.000000000 +0100 @@ -3,7 +3,7 @@ javascript and coffeescript files VERSION - 1.39 + 1.40 SYNOPSIS Application diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.39/lib/Mojolicious/Plugin/AssetPack/Guides/Tutorial.pod new/Mojolicious-Plugin-AssetPack-1.40/lib/Mojolicious/Plugin/AssetPack/Guides/Tutorial.pod --- old/Mojolicious-Plugin-AssetPack-1.39/lib/Mojolicious/Plugin/AssetPack/Guides/Tutorial.pod 2016-09-11 16:38:41.000000000 +0200 +++ new/Mojolicious-Plugin-AssetPack-1.40/lib/Mojolicious/Plugin/AssetPack/Guides/Tutorial.pod 2017-02-06 00:07:17.000000000 +0100 @@ -187,8 +187,10 @@ =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 can also be defined in the "DATA" -section. The default file is called "assetpack.def" and will be looked up if +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. 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: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.39/lib/Mojolicious/Plugin/AssetPack/Pipe/Reloader.pm new/Mojolicious-Plugin-AssetPack-1.40/lib/Mojolicious/Plugin/AssetPack/Pipe/Reloader.pm --- old/Mojolicious-Plugin-AssetPack-1.39/lib/Mojolicious/Plugin/AssetPack/Pipe/Reloader.pm 2017-01-12 20:44:21.000000000 +0100 +++ new/Mojolicious-Plugin-AssetPack-1.40/lib/Mojolicious/Plugin/AssetPack/Pipe/Reloader.pm 2017-01-27 15:27:24.000000000 +0100 @@ -94,6 +94,12 @@ %= asset "reloader.js" if app->mode eq "development" +=head2 Browser + +The reloader can be disabled by adding the query parameter +"_assetpack_reload=false" to the url, or by setting +C<window.ASSETPACK_RELOAD = false;> in JavaScript. + =head1 DESCRIPTION L<Mojolicious::Plugin::AssetPack::Pipe::Reloader> is a pipe which will create @@ -147,11 +153,17 @@ __DATA__ @@ reloader.js window.addEventListener("load", function(e) { - var script = document.querySelector('script[src$="/reloader.js"]'); + if (typeof ASSETPACK_RELOAD == "undefined") { + ASSETPACK_RELOAD = location.href.indexOf("_assetpack_reload=false") == -1 ? true : false; + } + var script = document.querySelector('script[src$="/reloader.js"]'); var reloader = function() { var socket = new WebSocket(script.src.replace(/^http/, "ws").replace(/\basset.*/, "mojo-assetpack-reloader-ws")); socket.onopen = function() { console.log("[AssetPack] Reloader is active."); }; - socket.onclose = function() { return location = location.href; }; + socket.onclose = function() { + if (ASSETPACK_RELOAD) return location = location.href; + console.log("[AssetPack] Reloader was disabled with window.ASSETPACK_RELOAD = true."); + }; }; reloader(); }); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.39/lib/Mojolicious/Plugin/AssetPack/Pipe/Sass.pm new/Mojolicious-Plugin-AssetPack-1.40/lib/Mojolicious/Plugin/AssetPack/Pipe/Sass.pm --- old/Mojolicious-Plugin-AssetPack-1.39/lib/Mojolicious/Plugin/AssetPack/Pipe/Sass.pm 2017-01-23 11:37:00.000000000 +0100 +++ new/Mojolicious-Plugin-AssetPack-1.40/lib/Mojolicious/Plugin/AssetPack/Pipe/Sass.pm 2017-02-05 23:54:12.000000000 +0100 @@ -6,8 +6,8 @@ use Mojo::JSON qw(decode_json encode_json); use Mojo::Util; -my $FORMAT_RE = qr{^s[ac]ss$}; -my $IMPORT_RE = qr{( \@import \s+ (["']) (.*?) \2 \s* ; )}x; +my $FORMAT_RE = qr{^s[ac]ss$}; +my $IMPORT_RE = qr{ (^|[\n\r]+) ([^\@]*) (\@import \s+ (["']) (.*?) \4 \s* ;)}sx; my $SOURCE_MAP_PLACEHOLDER = sprintf '__%s__', __PACKAGE__; $SOURCE_MAP_PLACEHOLDER =~ s!::!_!g; @@ -100,14 +100,17 @@ SEARCH: while ($$ref =~ /$IMPORT_RE/gs) { - my $rel_path = $3; + my $pre = $2; + my $rel_path = $5; + my $mlen = length $3; my @rel = split '/', $rel_path; my $name = pop @rel; - my $mlen = length $1; my $start = pos($$ref) - $mlen; my $dynamic = $rel_path =~ m!http://local/!; my @basename = ("_$name", $name); + next if $pre =~ m{^\s*//}; + # Follow sass rules for skipping, # ...with exception for special assetpack handling for dynamic sass include next if $rel_path =~ /\.css$/; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.39/lib/Mojolicious/Plugin/AssetPack/Store.pm new/Mojolicious-Plugin-AssetPack-1.40/lib/Mojolicious/Plugin/AssetPack/Store.pm --- old/Mojolicious-Plugin-AssetPack-1.39/lib/Mojolicious/Plugin/AssetPack/Store.pm 2017-01-12 20:34:40.000000000 +0100 +++ new/Mojolicious-Plugin-AssetPack-1.40/lib/Mojolicious/Plugin/AssetPack/Store.pm 2017-02-06 00:07:17.000000000 +0100 @@ -296,6 +296,13 @@ Used to set default headers used by L</serve_asset>. +=head2 paths + + $paths = $self->paths; + $self = $self->paths([$app->home->rel_file("assets")]); + +See L<Mojolicious::Static/paths> for details. + =head2 ua $ua = $self->ua; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.39/lib/Mojolicious/Plugin/AssetPack.pm new/Mojolicious-Plugin-AssetPack-1.40/lib/Mojolicious/Plugin/AssetPack.pm --- old/Mojolicious-Plugin-AssetPack-1.39/lib/Mojolicious/Plugin/AssetPack.pm 2017-01-25 22:39:45.000000000 +0100 +++ new/Mojolicious-Plugin-AssetPack-1.40/lib/Mojolicious/Plugin/AssetPack.pm 2017-02-06 00:10:58.000000000 +0100 @@ -6,7 +6,7 @@ use Mojolicious::Plugin::AssetPack::Store; use Mojolicious::Plugin::AssetPack::Util qw(diag has_ro load_module DEBUG); -our $VERSION = '1.39'; +our $VERSION = '1.40'; my %TAG_TEMPLATE; $TAG_TEMPLATE{css} = [qw(link rel stylesheet href)]; @@ -277,7 +277,7 @@ =head1 VERSION -1.39 +1.40 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.39/t/sass.t new/Mojolicious-Plugin-AssetPack-1.40/t/sass.t --- old/Mojolicious-Plugin-AssetPack-1.39/t/sass.t 2017-01-12 17:37:54.000000000 +0100 +++ new/Mojolicious-Plugin-AssetPack-1.40/t/sass.t 2017-02-05 23:56:19.000000000 +0100 @@ -6,7 +6,7 @@ $t->app->asset->process('app.css' => ('sass-one.sass', 'sass-two.scss')); $t->get_ok('/')->status_is(200) ->element_exists(qq(link[href="/asset/5660087922/sass-one.css"])) - ->element_exists(qq(link[href="/asset/9f0d8f784a/sass-two.css"])); + ->element_exists(qq(link[href="/asset/a2245cadf4/sass-two.css"])); my $html = $t->tx->res->dom; $t->get_ok($html->at('link:nth-of-child(1)')->{href})->status_is(200) @@ -20,7 +20,7 @@ $t = t::Helper->t(pipes => [qw(Sass Css Combine)]); $t->app->asset->process('app.css' => ('sass-one.sass', 'sass-two.scss')); $t->get_ok('/')->status_is(200) - ->element_exists(qq(link[href="/asset/e035274e04/app.css"])); + ->element_exists(qq(link[href="/asset/08eb78e42a/app.css"])); $t->get_ok($t->tx->res->dom->at('link')->{href})->status_is(200) ->content_like(qr/\nbody\{background:#fff\}/); @@ -64,6 +64,7 @@ .sass color: $color; @@ sass-two.scss +// .foo { @import "sass-two.scss"; }`). @import "sass-0-include"; $color: #aaa; .scss {