Hello community,
here is the log from the commit of package perl-Mojolicious-Plugin-AssetPack
for openSUSE:Factory checked in at 2015-04-18 10:40:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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
2015-04-15 16:23:36.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Mojolicious-Plugin-AssetPack.new/perl-Mojolicious-Plugin-AssetPack.changes
2015-04-18 10:40:02.000000000 +0200
@@ -1,0 +2,6 @@
+Thu Apr 16 19:30:26 UTC 2015 - [email protected]
+
+- updated to 0.51
+ see /usr/share/doc/packages/perl-Mojolicious-Plugin-AssetPack/Changes
+
+-------------------------------------------------------------------
Old:
----
Mojolicious-Plugin-AssetPack-0.50.tar.gz
New:
----
Mojolicious-Plugin-AssetPack-0.51.tar.gz
cpanspec.yml
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Mojolicious-Plugin-AssetPack.spec ++++++
--- /var/tmp/diff_new_pack.NMnN4M/_old 2015-04-18 10:40:03.000000000 +0200
+++ /var/tmp/diff_new_pack.NMnN4M/_new 2015-04-18 10:40:03.000000000 +0200
@@ -17,14 +17,15 @@
Name: perl-Mojolicious-Plugin-AssetPack
-Version: 0.50
+Version: 0.51
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: http://search.cpan.org/dist/Mojolicious-Plugin-AssetPack/
-Source:
http://www.cpan.org/authors/id/J/JH/JHTHORSEN/%{cpan_name}-%{version}.tar.gz
+Source0:
http://www.cpan.org/authors/id/J/JH/JHTHORSEN/%{cpan_name}-%{version}.tar.gz
+Source1: cpanspec.yml
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
@@ -72,6 +73,6 @@
%files -f %{name}.files
%defattr(-,root,root,755)
-%doc Changes README
+%doc Changes examples README
%changelog
++++++ Mojolicious-Plugin-AssetPack-0.50.tar.gz ->
Mojolicious-Plugin-AssetPack-0.51.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-0.50/Changes
new/Mojolicious-Plugin-AssetPack-0.51/Changes
--- old/Mojolicious-Plugin-AssetPack-0.50/Changes 2015-04-13
11:37:08.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-0.51/Changes 2015-04-16
08:15:50.000000000 +0200
@@ -1,241 +1,249 @@
-Revision history for Mojolicious-Plugin-AssetPack
+Revision history for perl distribution Mojolicious-Plugin-AssetPack
+
+0.51 2015-04-16T08:15:50+0200
+
+ - Can reload assets on server reload (EXPERIMENTAL)
+
+0.50 2015-04-13T11:37:08Z +0200
+ - Need to start with a fresh asset to avoid adding duplicate processed
+ data to the same asset.
+
+0.49 2015-04-05T09:54:27Z
+ - Will not pack asset.ext.swp files
+
+0.48 2015-04-05T09:19:01Z
+ - Fix serving in memory assets with Content-Type
+ - Fix serving in memory assets with Last-Modified
+
+0.47 2015-04-04T13:53:32Z
+ - Fix Mojo::Base::tap() does not support arguments before 5.57
+
+0.4602 2015-04-02T18:44:01Z
+ - Improved cpantesters
+
+0.46 2015-04-01T15:09:35Z
+ - Remove "fallback" attribute #44 (experimental)
+ - Remove "process" method
+ - Will prevent AssetPack from registering twice
+ - Will not write assets to "mojo-assetpack-public" in TMPDIR #46
+ (experimental)
+ - Allow in-memory assets with out_dir(""), MOJO_ASSETPACK_DEBUG=1 or
+ read-only static dirs. #46 (experimental)
+
+0.45 2015-03-31T22:02:06Z
+ - Can also fetch remote assets from local $app #30
+ - Will calculate MD5 sum recursively for sass/scss #44
+ - Add Cookbook
+
+0.44 2015-03-23T13:00:45Z
+ - Add ".min.ext" to minified asset filename
+ - Change filename for assets with errors from "-with-error.ext" to
+ ".err.ext"
+ - Will look for existing assets even with MOJO_ASSETPACK_DEBUG=1
+ - Remove errmsg() from Mojolicious::Plugin::AssetPack::Preprocessor
+ - Remove detect() from Mojolicious::Plugin::AssetPack::Preprocessors
+
+0.43 2015-03-20T11:27:22Z
+ - Same CSS::Sass detection for Sass as for Scss preprocessor
+
+0.42 2015-03-16T19:31:36Z
+ - Fix "Unescaped left brace in regex is deprecated" warnings
+
+0.41 2015-03-16T13:47:17Z
+ - Will die on CSS::Sass errors
+
+0.40 2015-03-16T11:04:47Z
+ - Fix reading sass files from SASS_PATH, when using CSS::Sass
+
+0.39 2015-03-06T17:06:19Z
+ - Will default to CSS::Sass if installed
+ - Reversed production/development logic
+ - Fix spelling in documentation (berov)
+
+0.3801 2015-03-02T23:58:21Z
+ - Removed reference to "expand" #38
+
+0.38 2015-03-02T23:55:36Z
+ - Improved documentation.
+ - Less logging
+
+0.37 2015-02-04T16:59:36Z
+ - Will use CSS::Sass if ENABLE_LIBSASS_BINDINGS=1 is set This is candiate
+ to become the default in later releases
+
+0.36 2015-01-30T12:08:51Z
+ - Require JavaScript::Minifier::XS 0.11 which include many bugfixes, such
+ as: JavaScript::Minifier::XS::minify(q|function(s){return /^\s*[\w-"']+
+ *:/.test(s)}|);
+
+0.35 2015-01-29T21:20:25Z
+ - Include original error message when failing to fallback
+ - Will die() instead of return $err on process()
+ - Improved detection of minified JavaScript code #34
+
+0.34 2015-01-23T12:51:25Z
+ - Add preprocessor() method to AssetPack
+ - Add support for assets from __DATA__
+
+0.33 2015-01-06T20:00:42Z
+ - Can fallback to existing assets in production mode
+
+0.32 2014-12-18T12:23:58Z
+ - Add logging of JavaScript code to console on error
+ - Able to pass on attrs to script/link tag generator #33
+
+0.31 2014-10-09T13:19:44Z
+ - Fixed and wrote tests for external AssetPack plugins
+
+0.30 2014-10-08T21:55:37Z
+ - Processed assets can be other places than out_dir()
+
+0.29 2014-10-08T20:53:32Z
+ - Improved error message when unable to find external preprocessor
+ (regression)
+
+0.28 2014-10-07T23:58:45Z
+ - Add support for %= asset "foo.js", { inline => 1 }
+ - Will also generate asset files with md5 from single files
+ - Remove expand()
+ - Remove rebuild()
+
+0.27 2014-10-07T00:28:39Z
+ - Fix t/google-font.t
+
+0.26 2014-10-07T00:16:27Z
+ - Generate a different checksum when unable to process input files
+ - Replaced "/Mojolicious/Plugin/AssetPack/could/not/compile/..." with an
+ actual asset using Preprocessor::Fallback
+
+0.25 2014-10-06T16:28:59Z
+ - Preprocessors are added on the fly
+ - Deprecated "no_autodetect"
+ - Improved documentation
+
+0.24 2014-09-28T20:44:00Z
+ - Add preprocessor classes for every detected preprocessor
+ - Add Preprocessors->can_process method to detect if preprocessors exists
+ - Improved error message from sass preprocessor
+
+0.23 2014-09-07T18:20:35Z
+ - Add AssetPack->fetch() method #24
+ - Can calculate checksum with included .sass and .scss files #25
+ - Can load external assets with minify=0 #27
+ - Support printing sass error to web page #26
+ - Better error message when unable to find asset file
+ - Change to using objects for processing files
+
+0.22 2014-08-21T15:08:56Z
+ - Made compass test more robust
+
+0.21 2014-08-07T21:33:48Z
+ - Add support for more debug output with MOJO_ASSETPACK_DEBUG=1
+ - Add error message for missing "jsx" preprocessor
+ - Will render missing text for all types which is not detected.
+ - Remove map_type() from Mojolicious::Plugin::AssetPack::Preprocessors
+
+0.20 2014-08-01T09:55:12Z
+ - Catch exit code from external applications
+ - Improved error messages
+
+0.19 2014-07-27T20:26:45Z
+ - Fix failing test for "compass"
+
+0.18 2014-07-18T01:29:04Z
+ - Will not continue if asset failed to download
+
+0.17 2014-07-15T03:03:57Z
+ - Fix loading empty javascript file
+
+0.16 2014-07-07T22:39:30Z
+ - Fix CPAN testers error
+ http://www.cpantesters.org/cpan/report/caa7015a-050b-11e4-ae21-9a7d1ff27
+ 236
+
+0.15 2014-07-05T11:28:42Z
+ - Add JSX support.
+
+0.14 2014-06-14T12:33:10Z
+ - Add ::Preprocessors->map_type() method.
+ - Add support for .sass files
+ - Add support for sass+compass
+ - Add support for custom base_url for minified assets
+
+0.13 2014-06-09T16:11:57Z
+ - Fix including online assets without extension
+ - Fix Use of uninitialized value $_[3] in concatenation
+
+0.12 2014-05-22T21:39:43Z
+ - Allow asset moniker with same name as expanded packed filename.
+
+0.11 2014-05-08T19:13:41Z
+ - Add CoffeScript support. (Alexander Rymasheusky)
+ https://github.com/jhthorsen/mojolicious-plugin-assetpack/pull/7
+ - Add -I<path_to_dir> to sass command line (Per Edin)
+ https://github.com/jhthorsen/mojolicious-plugin-assetpack/pull/5
+ - Add support for MOJO_ASSETPACK_NO_CACHE=1 (Alexander Rymasheusky)
+ https://github.com/jhthorsen/mojolicious-plugin-assetpack/pull/9
+
+0.10 2014-05-08T19:09:00Z
+ - See 0.11
+
+0.09 2014-03-23T11:45:03Z
+ - Remove option for cleaning up old asset files
+
+0.08 2014-03-22T19:14:00Z
+ - Fix finding compiled files by MD5 sum
+
+0.07 2014-03-16T12:07:46Z
+ - Add support for fetching assets from web
+ - Improved support for finding a writeable out_dir
+
+0.0601 2013-12-30T17:01:20Z
+ - Fix bug when asset has the same moniker as one of the source files
+
+0.06 2013-12-17T20:16:24Z
+ - Will not die, but log with custom error message on missing preprocessor
+
+0.0502 2013-11-27T09:21:33Z
+ - Fix plan in t/expand.t when sass is missing
+
+0.0501 2013-11-26T09:43:06Z
+ - Cannot define assets when missing preprocessors
+
+0.05 2013-11-24T18:20:11Z
+ - Bundling JavaScript::Minifier::XS and CSS::Minifier::XS
+ - Will calculate md5_sum from input files
+ - Add support for getting assets for a moniker
+
+0.0402 2013-11-12T21:17:34Z
+ - Will select the latest processed file when preprocessor is missing
+
+0.0401 2013-10-31T21:09:56Z
+ - Fix cleanup of files without md5
+
+0.04 2013-10-31T18:57:22Z
+ - Add support for custom out_dir
+ - Fix cannot lookup preprocessor based on moniker extension
+
+0.03 2013-10-28T18:31:03Z
+ - Use md5sum instead of timestamp in filenames
+
+0.0201 2013-10-10T20:10:25Z
+ - Fix need to change back to previous working dir
+
+0.02 2013-09-24T09:17:43Z
+ - Will only write asset files if the preprocessors exists
+
+0.0102 2013-09-15T15:15:37Z
+ - Fix AssetPack in embedded apps
+
+0.0101 2013-09-15T14:26:29Z
+ - Fix t/compress.t
+
+0.01 2013-09-15T14:20:22Z
+ - Add "asset" helper
+ - Add support for chained preprocessors
+ - Add default preprocessors for js, css, scss and less
+ - Can expand from moniker to multiple script/link tags
+ - Can compress multiple files to one moniker asset
-0.50 2015-04-13T11:37:08+0200
- * Need to start with a fresh asset to avoid adding duplicate
- processed data to the same asset.
-
-0.49 Sun Apr 5 09:54:27 2015
- * Will not pack asset.ext.swp files
-
-0.48 Sun Apr 5 09:19:01 2015
- * Fix serving in memory assets with Content-Type
- * Fix serving in memory assets with Last-Modified
-
-0.47 Sat Apr 4 13:53:32 2015
- * Fix Mojo::Base::tap() does not support arguments before 5.57
-
-0.4602 Thu Apr 2 18:44:01 2015
- * Improved cpantesters
-
-0.46 Wed Apr 1 15:09:35 2015
- * Remove "fallback" attribute #44 (experimental)
- * Remove "process" method
- * Will prevent AssetPack from registering twice
- * Will not write assets to "mojo-assetpack-public" in TMPDIR #46
(experimental)
- * Allow in-memory assets with out_dir(""), MOJO_ASSETPACK_DEBUG=1 or
- read-only static dirs. #46 (experimental)
-
-0.45 Tue Mar 31 22:02:06 2015
- * Can also fetch remote assets from local $app #30
- * Will calculate MD5 sum recursively for sass/scss #44
- * Add Cookbook
-
-0.44 Mon Mar 23 13:00:45 2015
- * Add ".min.ext" to minified asset filename
- * Change filename for assets with errors from "-with-error.ext" to
".err.ext"
- * Will look for existing assets even with MOJO_ASSETPACK_DEBUG=1
- * Remove errmsg() from Mojolicious::Plugin::AssetPack::Preprocessor
- * Remove detect() from Mojolicious::Plugin::AssetPack::Preprocessors
-
-0.43 Fri Mar 20 11:27:22 2015
- * Same CSS::Sass detection for Sass as for Scss preprocessor
-
-0.42 Mon Mar 16 19:31:36 2015
- * Fix "Unescaped left brace in regex is deprecated" warnings
-
-0.41 Mon Mar 16 13:47:17 2015
- * Will die on CSS::Sass errors
-
-0.40 Mon Mar 16 11:04:47 2015
- * Fix reading sass files from SASS_PATH, when using CSS::Sass
-
-0.39 Fri Mar 6 17:06:19 2015
- * Will default to CSS::Sass if installed
- * Reversed production/development logic
- * Fix spelling in documentation (berov)
-
-0.3801 Mon Mar 2 23:58:21 2015
- * Removed reference to "expand" #38
-
-0.38 Mon Mar 2 23:55:36 2015
- * Improved documentation.
- * Less logging
-
-0.37 Wed Feb 4 16:59:36 2015
- * Will use CSS::Sass if ENABLE_LIBSASS_BINDINGS=1 is set
- This is candiate to become the default in later releases
-
-0.36 Fri Jan 30 12:08:51 2015
- * Require JavaScript::Minifier::XS 0.11 which include many bugfixes,
- such as:
- JavaScript::Minifier::XS::minify(q|function(s){return /^\s*[\w-"']+
*:/.test(s)}|);
-
-0.35 Thu Jan 29 21:20:25 2015
- * Include original error message when failing to fallback
- * Will die() instead of return $err on process()
- * Improved detection of minified JavaScript code #34
-
-0.34 Fri Jan 23 12:51:25 2015
- * Add preprocessor() method to AssetPack
- * Add support for assets from __DATA__
-
-0.33 Tue Jan 6 20:00:42 2015
- * Can fallback to existing assets in production mode
-
-0.32 Thu Dec 18 12:23:58 2014
- * Add logging of JavaScript code to console on error
- * Able to pass on attrs to script/link tag generator #33
-
-0.31 Thu Oct 9 13:19:44 2014
- * Fixed and wrote tests for external AssetPack plugins
-
-0.30 Wed Oct 8 21:55:37 2014
- * Processed assets can be other places than out_dir()
-
-0.29 Wed Oct 8 20:53:32 2014
- * Improved error message when unable to find external preprocessor
- (regression)
-
-0.28 Tue Oct 7 23:58:45 2014
- * Add support for %= asset "foo.js", { inline => 1 }
- * Will also generate asset files with md5 from single files
- * Remove expand()
- * Remove rebuild()
-
-0.27 Tue Oct 7 00:28:39 2014
- * Fix t/google-font.t
-
-0.26 Tue Oct 7 00:16:27 2014
- * Generate a different checksum when unable to process input files
- * Replaced "/Mojolicious/Plugin/AssetPack/could/not/compile/..."
- with an actual asset using Preprocessor::Fallback
-
-0.25 Mon Oct 6 16:28:59 2014
- * Preprocessors are added on the fly
- * Deprecated "no_autodetect"
- * Improved documentation
-
-0.24 Sun Sep 28 20:44:00 2014
- * Add preprocessor classes for every detected preprocessor
- * Add Preprocessors->can_process method to detect if preprocessors
exists
- * Improved error message from sass preprocessor
-
-0.23 Sun Sep 7 18:20:35 2014
- * Add AssetPack->fetch() method #24
- * Can calculate checksum with included .sass and .scss files #25
- * Can load external assets with minify=0 #27
- * Support printing sass error to web page #26
- * Better error message when unable to find asset file
- * Change to using objects for processing files
-
-0.22 Thu Aug 21 15:08:56 2014
- * Made compass test more robust
-
-0.21 Thu Aug 7 21:33:48 2014
- * Add support for more debug output with MOJO_ASSETPACK_DEBUG=1
- * Add error message for missing "jsx" preprocessor
- * Will render missing text for all types which is not detected.
- * Remove map_type() from Mojolicious::Plugin::AssetPack::Preprocessors
-
-0.20 Fri Aug 1 09:55:12 2014
- * Catch exit code from external applications
- * Improved error messages
-
-0.19 Sun Jul 27 20:26:45 2014
- * Fix failing test for "compass"
-
-0.18 Fri Jul 18 01:29:04 2014
- * Will not continue if asset failed to download
-
-0.17 Tue Jul 15 03:03:57 2014
- * Fix loading empty javascript file
-
-0.16 Mon Jul 7 22:39:30 2014
- * Fix CPAN testers error
-
http://www.cpantesters.org/cpan/report/caa7015a-050b-11e4-ae21-9a7d1ff27236
-
-0.15 Sat Jul 5 11:28:42 2014
- * Add JSX support.
-
-0.14 Sat Jun 14 12:33:10 2014
- * Add ::Preprocessors->map_type() method.
- * Add support for .sass files
- * Add support for sass+compass
- * Add support for custom base_url for minified assets
-
-0.13 Mon Jun 9 16:11:57 2014
- * Fix including online assets without extension
- * Fix Use of uninitialized value $_[3] in concatenation
-
-0.12 Thu May 22 21:39:43 2014
- * Allow asset moniker with same name as expanded packed filename.
-
-0.11 Thu May 8 19:13:41 2014
- * Add CoffeScript support. (Alexander Rymasheusky)
- https://github.com/jhthorsen/mojolicious-plugin-assetpack/pull/7
- * Add -I<path_to_dir> to sass command line (Per Edin)
- https://github.com/jhthorsen/mojolicious-plugin-assetpack/pull/5
- * Add support for MOJO_ASSETPACK_NO_CACHE=1 (Alexander Rymasheusky)
- https://github.com/jhthorsen/mojolicious-plugin-assetpack/pull/9
-
-0.10 Thu May 8 19:09:00 2014
- * See 0.11
-
-0.09 Sun Mar 23 11:45:03 2014
- * Remove option for cleaning up old asset files
-
-0.08 Sat Mar 22 19:14:00 2014
- * Fix finding compiled files by MD5 sum
-
-0.07 Sun Mar 16 12:07:46 2014
- * Add support for fetching assets from web
- * Improved support for finding a writeable out_dir
-
-0.0601 Mon Dec 30 17:01:20 2013
- * Fix bug when asset has the same moniker as one of the source files
-
-0.06 Tue Dec 17 20:16:24 2013
- * Will not die, but log with custom error message on missing
preprocessor
-
-0.0502 Wed Nov 27 09:21:33 2013
- * Fix plan in t/expand.t when sass is missing
-
-0.0501 Tue Nov 26 09:43:06 2013
- * Cannot define assets when missing preprocessors
-
-0.05 Sun Nov 24 18:20:11 2013
- * Bundling JavaScript::Minifier::XS and CSS::Minifier::XS
- * Will calculate md5_sum from input files
- * Add support for getting assets for a moniker
-
-0.0402 Tue Nov 12 21:17:34 2013
- * Will select the latest processed file when preprocessor is missing
-
-0.0401 Thu Oct 31 21:09:56 2013
- * Fix cleanup of files without md5
-
-0.04 Thu Oct 31 18:57:22 2013
- * Add support for custom out_dir
- * Fix cannot lookup preprocessor based on moniker extension
-
-0.03 Mon Oct 28 18:31:03 2013
- * Use md5sum instead of timestamp in filenames
-
-0.0201 Thu Oct 10 20:10:25 2013
- * Fix need to change back to previous working dir
-
-0.02 Tue Sep 24 09:17:43 2013
- * Will only write asset files if the preprocessors exists
-
-0.0102 Sun Sep 15 15:15:37 2013
- * Fix AssetPack in embedded apps
-
-0.0101 Sun Sep 15 14:26:29 2013
- * Fix t/compress.t
-
-0.01 Sun Sep 15 14:20:22 2013
- * Add "asset" helper
- * Add support for chained preprocessors
- * Add default preprocessors for js, css, scss and less
- * Can expand from moniker to multiple script/link tags
- * Can compress multiple files to one moniker asset
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-0.50/MANIFEST
new/Mojolicious-Plugin-AssetPack-0.51/MANIFEST
--- old/Mojolicious-Plugin-AssetPack-0.50/MANIFEST 2015-04-13
11:37:09.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-0.51/MANIFEST 2015-04-16
08:15:50.000000000 +0200
@@ -3,6 +3,7 @@
.travis.yml
Changes
cpanfile
+examples/reloader.pl
lib/Mojolicious/Plugin/AssetPack.pm
lib/Mojolicious/Plugin/AssetPack/Asset.pm
lib/Mojolicious/Plugin/AssetPack/Manual/Assets.pod
@@ -10,6 +11,7 @@
lib/Mojolicious/Plugin/AssetPack/Manual/CustomDomain.pod
lib/Mojolicious/Plugin/AssetPack/Manual/Include.pod
lib/Mojolicious/Plugin/AssetPack/Manual/Modes.pod
+lib/Mojolicious/Plugin/AssetPack/Manual/Reloader.pod
lib/Mojolicious/Plugin/AssetPack/Preprocessor.pm
lib/Mojolicious/Plugin/AssetPack/Preprocessor/CoffeeScript.pm
lib/Mojolicious/Plugin/AssetPack/Preprocessor/Css.pm
@@ -78,6 +80,7 @@
t/read-only-with-existing-assets/packed/my-plugin-existing-7c174b801d6fc968f1576055e88c18cb.css
t/read-only-with-source-assets/css/my-plugin-a.css
t/read-only-with-source-assets/css/my-plugin-b.css
+t/reloader.t
t/sass.t
t/scss.t
t/skip-minified.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-0.50/META.json
new/Mojolicious-Plugin-AssetPack-0.51/META.json
--- old/Mojolicious-Plugin-AssetPack-0.50/META.json 2015-04-13
11:37:09.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-0.51/META.json 2015-04-16
08:15:50.000000000 +0200
@@ -50,5 +50,5 @@
"url" :
"https://github.com/jhthorsen/mojolicious-plugin-assetpack.git"
}
},
- "version" : "0.50"
+ "version" : "0.51"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-0.50/META.yml
new/Mojolicious-Plugin-AssetPack-0.51/META.yml
--- old/Mojolicious-Plugin-AssetPack-0.50/META.yml 2015-04-13
11:37:09.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-0.51/META.yml 2015-04-16
08:15:50.000000000 +0200
@@ -27,4 +27,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: '0.50'
+version: '0.51'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-0.50/README
new/Mojolicious-Plugin-AssetPack-0.51/README
--- old/Mojolicious-Plugin-AssetPack-0.50/README 2015-04-13
11:37:09.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-0.51/README 2015-04-16
08:15:50.000000000 +0200
@@ -3,7 +3,7 @@
javascript and coffeescript files
VERSION
- 0.50
+ 0.51
SYNOPSIS
Application
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Mojolicious-Plugin-AssetPack-0.50/examples/reloader.pl
new/Mojolicious-Plugin-AssetPack-0.51/examples/reloader.pl
--- old/Mojolicious-Plugin-AssetPack-0.50/examples/reloader.pl 1970-01-01
01:00:00.000000000 +0100
+++ new/Mojolicious-Plugin-AssetPack-0.51/examples/reloader.pl 2015-04-16
08:15:48.000000000 +0200
@@ -0,0 +1,27 @@
+#!/usr/bin/env perl
+use Mojolicious::Lite;
+
+# need to specify to AssetPack that we want to enable "reloader"
+plugin AssetPack => {reloader => {}};
+
+# define our own assets, define some routes and start the app
+app->asset("app.css" => "/css/app.css");
+get "/" => "index";
+app->start;
+
+__DATA__
+@@ css/app.css
+body { background: #eee; }
+@@ index.html.ep
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Reloader demo</title>
+ %= asset "app.css"
+ %# Reloader is only available in development mode
+ %= asset "reloader.js" if app->mode eq "development"
+ </head>
+ <body>
+ Reloader demo. Try to change css/app.css and see this page auto-update.
+ </body>
+</html>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Mojolicious-Plugin-AssetPack-0.50/lib/Mojolicious/Plugin/AssetPack/Manual/Reloader.pod
new/Mojolicious-Plugin-AssetPack-0.51/lib/Mojolicious/Plugin/AssetPack/Manual/Reloader.pod
---
old/Mojolicious-Plugin-AssetPack-0.50/lib/Mojolicious/Plugin/AssetPack/Manual/Reloader.pod
1970-01-01 01:00:00.000000000 +0100
+++
new/Mojolicious-Plugin-AssetPack-0.51/lib/Mojolicious/Plugin/AssetPack/Manual/Reloader.pod
2015-04-16 08:15:48.000000000 +0200
@@ -0,0 +1,69 @@
+
+=encoding utf8
+
+=head1 NAME
+
+Mojolicious::Plugin::AssetPack::Manual::Reloader - Enable automatic reloading
of assets
+
+=head1 DESCRIPTION
+
+It is possible to reload assets in the browser, when they are changed on disk.
+
+This feature is EXPERIMENTAL, and should only be used while developing!
+
+=head2 Example application
+
+ use Mojolicious::Lite;
+
+ # need to specify to AssetPack that we want to enable "reloader"
+ plugin AssetPack => {reloader => {}};
+
+ # define our own assets, define some routes and start the app
+ app->asset("app.css" => "/css/app.css");
+ get "/" => "index";
+ app->start;
+
+ __DATA__
+ @@ css/app.css
+ body { background: #eee; }
+ @@ index.html.ep
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <title>Reloader demo</title>
+ %= asset "app.css"
+ %# Reloader is only available in development mode
+ %= asset "reloader.js" if app->mode eq "development"
+ </head>
+ <body>
+ Reloader demo. Try to change css/app.css and see this page auto-update.
+ </body>
+ </html>
+
+=head2 Running the application
+
+To make this work, we need to start L<morbo|Mojo::Server::Morbo> and manually
+make it watch our files:
+
+ $ morbo -w morbo examples/reloader.pl -w lib -w templates -w public/css
+
+=head2 How does it work?
+
+C<reloader.js> contains a JavaScript which connects to a WebSocket in our
+server. Every time the WebSocket connection is broken the JavaScript
+will trigger a refresh.
+
+There are two different refresh strategies available: "head" and "document".
+
+ plugin AssetPack => {
+ reloader => {strategy => "head"}
+ };
+
+Setting the C<strategy> to "head" will only replace the head-tag in your
+document, while the default ("document") will refresh the whole document.
+
+=head1 AUTHOR
+
+Jan Henning Thorsen - C<[email protected]>
+
+=cut
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Mojolicious-Plugin-AssetPack-0.50/lib/Mojolicious/Plugin/AssetPack.pm
new/Mojolicious-Plugin-AssetPack-0.51/lib/Mojolicious/Plugin/AssetPack.pm
--- old/Mojolicious-Plugin-AssetPack-0.50/lib/Mojolicious/Plugin/AssetPack.pm
2015-04-13 11:37:08.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-0.51/lib/Mojolicious/Plugin/AssetPack.pm
2015-04-16 08:15:50.000000000 +0200
@@ -12,7 +12,7 @@
use constant NO_CACHE => $ENV{MOJO_ASSETPACK_NO_CACHE} || 0;
use constant DEBUG => $ENV{MOJO_ASSETPACK_DEBUG} || 0;
-our $VERSION = '0.50';
+our $VERSION = '0.51';
my $MTIME = time;
@@ -75,14 +75,15 @@
return $app->log->debug("AssetPack: Helper $helper() is already
registered.");
}
+ $self->{assets} = {};
+ $self->{processed} = {};
+
$self->_app($app);
$self->_ua->server->app($app);
$self->minify($config->{minify} // $app->mode ne 'development');
$self->out_dir($self->_build_out_dir($config, $app));
$self->base_url($config->{base_url}) if $config->{base_url};
-
- $self->{assets} = {};
- $self->{processed} = {};
+ $self->_reloader($app, $config->{reloader}) if $config->{reloader};
if (NO_CACHE) {
$app->log->info('AssetPack Will rebuild assets on each request in memory');
@@ -122,9 +123,10 @@
my $c = shift;
my $path = $c->req->url->path;
- return if $c->res->code;
+ return if $c->req->is_handshake or $c->res->code;
return unless $path->[1] and 0 == index "$path", $self->base_url;
return unless my $asset = $c->asset->_asset($path->[1]);
+ return if $asset->{internal};
$c->res->headers->last_modified(Mojo::Date->new($MTIME))
->content_type($c->app->types->type($asset->url =~ /\.(\w+)$/ ? $1 :
'txt') || 'text/plain');
$c->reply->asset($asset);
@@ -289,6 +291,24 @@
map { my $name = _name($_); $self->_process("$name.$ext" => $_) } @files;
}
+sub _reloader {
+ my ($self, $app, $config) = @_;
+ my $reloader = $self->_asset('reloader.js');
+
+ return if !$config->{enabled} and $app->mode ne 'development';
+
+ warn "[ASSETPACK] Adding reloader asset and route\n" if DEBUG;
+ $reloader->url('reloader.js')->{internal} = 1;
+ $self->{assets}{'reloader.js'} = [$reloader];
+ push @{$app->renderer->classes}, __PACKAGE__;
+ $app->routes->get('/packed/reloader')->to(template => 'packed/reloader',
strategy => 'document', %$config);
+ $app->routes->websocket('/packed/reloader/ws')->to(
+ cb => sub {
+ shift->on(message => sub { shift->send('pong'); });
+ }
+ )->name('assetpack.ws');
+}
+
# utils
sub _ext { local $_ = File::Basename::basename($_[0]); /\.(\w+)$/ ? $1 :
'unknown'; }
@@ -309,7 +329,7 @@
=head1 VERSION
-0.50
+0.51
=head1 SYNOPSIS
@@ -522,3 +542,37 @@
Viktor Turskyi
=cut
+
+__DATA__
+@@ packed/reloader.js.ep
+;window.addEventListener('load', function(e) {
+ var xhr, socket, t, reloaded = 0;
+ var connect = function() {
+ socket = new WebSocket('<%=
url_for('assetpack.ws')->userinfo(undef)->to_abs %>'.replace(/^http/, 'ws'));
+ socket.onopen = function(e) {
+ if (reloaded++) {
+ xhr = new XMLHttpRequest();
+ xhr.responseType = 'document';
+ xhr.open('GET', window.location.href);
+ xhr.onreadystatechange = function() {
+ if (xhr.readyState != 4) return;
+ if (window.console) console.log('[AssetPack] Replacing
<head>...</head>');
+ document.head.innerHTML =
this.responseXML.getElementsByTagName('head')[0].innerHTML;
+ };
+ xhr.send(null);
+ }
+ t = setInterval(function() { socket.send('ping'); }, 5000);
+ }
+ socket.onclose = function() {
+ if (t) clearTimeout(t);
+ if (window.console) console.log('[AssetPack] Reloading with strategy
"<%= $strategy %>" (' + reloaded + ')');
+ if ('<%= $strategy %>' == 'document') {
+ return window.location = window.location.href;
+ }
+ else {
+ setTimeout(function() { connect() }, 500);
+ }
+ };
+ };
+ connect();
+});
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-0.50/t/00-basic.t
new/Mojolicious-Plugin-AssetPack-0.51/t/00-basic.t
--- old/Mojolicious-Plugin-AssetPack-0.50/t/00-basic.t 2015-03-02
23:33:48.000000000 +0100
+++ new/Mojolicious-Plugin-AssetPack-0.51/t/00-basic.t 2015-04-15
17:35:56.000000000 +0200
@@ -14,22 +14,24 @@
SKIP: { skip "pod_coverage_ok(@_) (Test::Pod::Coverage is required)", 1 }
};
}
+if (!eval 'use Test::CPAN::Changes; 1') {
+ *Test::CPAN::Changes::changes_file_ok = sub {
+ SKIP: { skip "changes_ok(@_) (Test::CPAN::Changes is required)", 4 }
+ };
+}
-find({wanted => sub { /\.(pm|pod)$/ and push @files, $File::Find::name },
no_chdir => 1}, -e 'blib' ? 'blib' : 'lib',);
+find({wanted => sub { /\.pm$/ and push @files, $File::Find::name }, no_chdir
=> 1}, -e 'blib' ? 'blib' : 'lib',);
-my $n = 0;
-$n += /\.pm$/ ? 3 : 1 for @files;
-plan tests => $n;
+plan tests => @files * 3 + 4;
for my $file (@files) {
my $module = $file;
+ $module =~ s,\.pm$,,;
$module =~ s,.*/?lib/,,;
$module =~ s,/,::,g;
-
+ ok eval "use $module; 1", "use $module" or diag $@;
Test::Pod::pod_file_ok($file);
-
- if ($module =~ s,\.pm$,,) {
- ok eval "use $module; 1", "use $module" or diag $@;
- Test::Pod::Coverage::pod_coverage_ok($module);
- }
+ Test::Pod::Coverage::pod_coverage_ok($module, {also_private =>
[qr/^[A-Z_]+$/],});
}
+
+Test::CPAN::Changes::changes_file_ok();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-0.50/t/reloader.t
new/Mojolicious-Plugin-AssetPack-0.51/t/reloader.t
--- old/Mojolicious-Plugin-AssetPack-0.50/t/reloader.t 1970-01-01
01:00:00.000000000 +0100
+++ new/Mojolicious-Plugin-AssetPack-0.51/t/reloader.t 2015-04-16
08:15:48.000000000 +0200
@@ -0,0 +1,14 @@
+use t::Helper;
+my $t = t::Helper->t({minify => 0, reloader => {}});
+
+$t->get_ok('/test1')->status_is(200)->element_exists('script[src="/packed/reloader.js"]');
+
+local $TODO = 'inline is not yet supported';
+$t->text_like('script', qr{new WebSocket});
+
+done_testing;
+
+__DATA__
+@@ test1.html.ep
+%= asset 'reloader.js', {inline => 1}
+%= asset 'reloader.js';
++++++ cpanspec.yml ++++++
---
#description_paragraphs: 3
#no_testing: broken upstream
#sources:
# - source1
# - source2
#patches:
# foo.patch: -p1
# bar.patch:
#preamble: |-
# BuildRequires: gcc-c++
#post_prep: |-
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
#post_install: |-
# sed on %{name}.files
#license: SUSE-NonFree
#skip_noarch: 1
#custom_build: -
#./Build build flags=%{?_smp_mflags} --myflag