Hello community, here is the log from the commit of package perl-Mojolicious-Plugin-CHI for openSUSE:Factory checked in at 2016-09-13 22:24:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Mojolicious-Plugin-CHI (Old) and /work/SRC/openSUSE:Factory/.perl-Mojolicious-Plugin-CHI.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Mojolicious-Plugin-CHI" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Mojolicious-Plugin-CHI/perl-Mojolicious-Plugin-CHI.changes 2016-08-31 14:31:55.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Mojolicious-Plugin-CHI.new/perl-Mojolicious-Plugin-CHI.changes 2016-09-13 22:25:44.000000000 +0200 @@ -1,0 +2,9 @@ +Sat Sep 10 05:45:15 UTC 2016 - co...@suse.com + +- updated to 0.15 + see /usr/share/doc/packages/perl-Mojolicious-Plugin-CHI/Changes + + 0.15 2016-09-09 + - Fixed command namespace pushing to be limited. + +------------------------------------------------------------------- Old: ---- Mojolicious-Plugin-CHI-0.14.tar.gz New: ---- Mojolicious-Plugin-CHI-0.15.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Mojolicious-Plugin-CHI.spec ++++++ --- /var/tmp/diff_new_pack.R6qGXu/_old 2016-09-13 22:25:45.000000000 +0200 +++ /var/tmp/diff_new_pack.R6qGXu/_new 2016-09-13 22:25:45.000000000 +0200 @@ -17,7 +17,7 @@ Name: perl-Mojolicious-Plugin-CHI -Version: 0.14 +Version: 0.15 Release: 0 %define cpan_name Mojolicious-Plugin-CHI Summary: Use CHI Caches in Mojolicious ++++++ Mojolicious-Plugin-CHI-0.14.tar.gz -> Mojolicious-Plugin-CHI-0.15.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-CHI-0.14/Changes new/Mojolicious-Plugin-CHI-0.15/Changes --- old/Mojolicious-Plugin-CHI-0.14/Changes 2016-08-30 19:59:20.000000000 +0200 +++ new/Mojolicious-Plugin-CHI-0.15/Changes 2016-09-09 10:07:25.000000000 +0200 @@ -1,3 +1,6 @@ +0.15 2016-09-09 + - Fixed command namespace pushing to be limited. + 0.14 2016-08-30 - Fixed META_MERGE in Makefile. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-CHI-0.14/META.json new/Mojolicious-Plugin-CHI-0.15/META.json --- old/Mojolicious-Plugin-CHI-0.14/META.json 2016-08-30 21:29:18.000000000 +0200 +++ new/Mojolicious-Plugin-CHI-0.15/META.json 2016-09-09 10:07:56.000000000 +0200 @@ -54,6 +54,6 @@ "web" : "https://github.com/Akron/Mojolicious-Plugin-CHI" } }, - "version" : "0.14", + "version" : "0.15", "x_serialization_backend" : "JSON::PP version 2.27300" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-CHI-0.14/META.yml new/Mojolicious-Plugin-CHI-0.15/META.yml --- old/Mojolicious-Plugin-CHI-0.14/META.yml 2016-08-30 21:29:17.000000000 +0200 +++ new/Mojolicious-Plugin-CHI-0.15/META.yml 2016-09-09 10:07:56.000000000 +0200 @@ -27,5 +27,5 @@ bugtracker: https://github.com/Akron/Mojolicious-Plugin-CHI/issues license: http://www.opensource.org/licenses/artistic-license-2.0 repository: https://github.com/Akron/Mojolicious-Plugin-CHI.git -version: '0.14' +version: '0.15' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-CHI-0.14/lib/Mojolicious/Plugin/CHI/chi.pm new/Mojolicious-Plugin-CHI-0.15/lib/Mojolicious/Plugin/CHI/chi.pm --- old/Mojolicious-Plugin-CHI-0.14/lib/Mojolicious/Plugin/CHI/chi.pm 2016-08-30 20:01:07.000000000 +0200 +++ new/Mojolicious-Plugin-CHI-0.15/lib/Mojolicious/Plugin/CHI/chi.pm 2016-09-09 10:07:25.000000000 +0200 @@ -4,7 +4,7 @@ use Getopt::Long qw/GetOptions :config no_auto_abbrev no_ignore_case/; -has description => 'Interact with CHI caches.'; +has description => 'Interact with CHI caches'; has usage => sub { shift->extract_usage }; sub _unknown { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-CHI-0.14/lib/Mojolicious/Plugin/CHI.pm new/Mojolicious-Plugin-CHI-0.15/lib/Mojolicious/Plugin/CHI.pm --- old/Mojolicious-Plugin-CHI-0.14/lib/Mojolicious/Plugin/CHI.pm 2016-08-30 20:00:29.000000000 +0200 +++ new/Mojolicious-Plugin-CHI-0.15/lib/Mojolicious/Plugin/CHI.pm 2016-09-09 10:07:25.000000000 +0200 @@ -3,7 +3,7 @@ use Scalar::Util 'weaken'; use CHI; -our $VERSION = '0.14'; +our $VERSION = '0.15'; # Register Plugin sub register { @@ -77,25 +77,28 @@ $caches->{$name} = $cache; }; - # Add 'chi' command - push @{$mojo->commands->namespaces}, __PACKAGE__; + # Only establish once + unless (exists $mojo->renderer->helpers->{chi}) { + # Add 'chi' command + push @{$mojo->commands->namespaces}, __PACKAGE__; - # Add 'chi' helper - $mojo->helper( - chi => sub { - my $c = shift; - my $name = shift // 'default'; + # Add 'chi' helper + $mojo->helper( + chi => sub { + my $c = shift; + my $name = shift // 'default'; - my $cache = $caches->{$name}; + my $cache = $caches->{$name}; - # Cache unknown - $c->app->log->warn(qq{Unknown cache handle "$name"}) unless $cache; + # Cache unknown + $c->app->log->warn(qq{Unknown cache handle "$name"}) unless $cache; - # Return cache - return $cache; - } - ); + # Return cache + return $cache; + } + ); + }; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-Plugin-CHI-0.14/t/CHI-Command.t new/Mojolicious-Plugin-CHI-0.15/t/CHI-Command.t --- old/Mojolicious-Plugin-CHI-0.14/t/CHI-Command.t 2015-01-16 04:07:25.000000000 +0100 +++ new/Mojolicious-Plugin-CHI-0.15/t/CHI-Command.t 2016-09-09 10:07:25.000000000 +0200 @@ -2,7 +2,8 @@ use Mojolicious::Lite; use Test::More; use Test::Mojo; -use Test::Output; +use Data::Dumper; +use Test::Output qw/:stdout :stderr :functions/; use File::Temp qw/:POSIX tempdir/; use lib 'lib'; @@ -33,6 +34,25 @@ $app->plugin('CHI'); +my $cmds = $app->commands; + +ok(grep/::CHI/, @{$cmds->namespaces}, 'Namespace is set'); +is_deeply( + $cmds->namespaces, + [qw/Mojolicious::Command Mojolicious::Plugin::CHI/], + 'Namespace is set' +); + +stdout_like( + sub { + local $ENV{HARNESS_ACTIVE} = 0; + $cmds->run; + }, + qr/chi.+?Interact with CHI caches/, + 'Command established' +); + + { no warnings; $Time::Duration::MILLISECOND = 1; @@ -43,7 +63,7 @@ my $chi = Mojolicious::Plugin::CHI::chi->new; $chi->app($app); -is($chi->description, "Interact with CHI caches.", 'Description line'); +is($chi->description, "Interact with CHI caches", 'Description line'); stdout_like( sub { $chi->run }, @@ -75,6 +95,14 @@ } }); +$cmds = $app->commands; +is_deeply( + $cmds->namespaces, + [qw/Mojolicious::Command Mojolicious::Plugin::CHI/], + 'Namespace is set only once' +); + + stdout_like( sub { $chi->run('list') }, qr/first\s+Memory\s+MyFlatFile\s+File\s+MySecondCache\s+Memory/,