Hello community,

here is the log from the commit of package perl-Mojolicious-Plugin-CHI for 
openSUSE:Factory checked in at 2015-04-27 22:08:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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
  2014-04-25 16:11:44.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-Mojolicious-Plugin-CHI.new/perl-Mojolicious-Plugin-CHI.changes
     2015-04-27 22:09:07.000000000 +0200
@@ -1,0 +2,15 @@
+Sat Apr 25 07:24:15 UTC 2015 - co...@suse.com
+
+- updated to 0.11
+   see /usr/share/doc/packages/perl-Mojolicious-Plugin-CHI/Changes
+
+  0.11 2015-01-16
+          - Improve error handling in commands.
+  
+  0.10 2015-01-16
+          - Improve documentation regarding precedence of configuration.
+       - Improve config check.
+       - Improve license information in M::P::CHI::chi.
+       - Update year.
+
+-------------------------------------------------------------------

Old:
----
  Mojolicious-Plugin-CHI-0.09.tar.gz

New:
----
  Mojolicious-Plugin-CHI-0.11.tar.gz
  cpanspec.yml

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

Other differences:
------------------
++++++ perl-Mojolicious-Plugin-CHI.spec ++++++
--- /var/tmp/diff_new_pack.GfgXXe/_old  2015-04-27 22:09:07.000000000 +0200
+++ /var/tmp/diff_new_pack.GfgXXe/_new  2015-04-27 22:09:07.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Mojolicious-Plugin-CHI
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,31 +17,33 @@
 
 
 Name:           perl-Mojolicious-Plugin-CHI
-Version:        0.09
+Version:        0.11
 Release:        0
 %define cpan_name Mojolicious-Plugin-CHI
-Summary:        Use CHI caches in Mojolicious
+Summary:        Use CHI Caches in Mojolicious
 License:        Artistic-2.0
 Group:          Development/Libraries/Perl
 Url:            http://search.cpan.org/dist/Mojolicious-Plugin-CHI/
-Source:         
http://www.cpan.org/authors/id/A/AK/AKRON/%{cpan_name}-%{version}.tar.gz
+Source0:        
http://www.cpan.org/authors/id/A/AK/AKRON/%{cpan_name}-%{version}.tar.gz
+Source1:        cpanspec.yml
 BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  perl
 BuildRequires:  perl-macros
 BuildRequires:  perl(CHI)
 BuildRequires:  perl(Mojolicious) >= 4.77
-BuildRequires:  perl(Test::More)
-BuildRequires:  perl(Test::Output) >= 1.0
+BuildRequires:  perl(Test::Output) >= 1
 Requires:       perl(CHI)
 Requires:       perl(Mojolicious) >= 4.77
 %{perl_requires}
 
 %description
-Mojolicious::Plugin::CHI is a simple plugin to work with CHI caches within 
Mojolicious.
+the Mojolicious::Plugin::CHI manpage is a simple plugin to work with the
+CHI manpage caches within Mojolicious.
 
 %prep
 %setup -q -n %{cpan_name}-%{version}
+find . -type f -print0 | xargs -0 chmod 644
 
 %build
 %{__perl} Makefile.PL INSTALLDIRS=vendor

++++++ Mojolicious-Plugin-CHI-0.09.tar.gz -> Mojolicious-Plugin-CHI-0.11.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-Plugin-CHI-0.09/Changes 
new/Mojolicious-Plugin-CHI-0.11/Changes
--- old/Mojolicious-Plugin-CHI-0.09/Changes     2014-04-20 20:27:56.000000000 
+0200
+++ new/Mojolicious-Plugin-CHI-0.11/Changes     2015-01-16 03:34:16.000000000 
+0100
@@ -1,3 +1,12 @@
+0.11 2015-01-16
+        - Improve error handling in commands.
+
+0.10 2015-01-16
+        - Improve documentation regarding precedence of configuration.
+       - Improve config check.
+       - Improve license information in M::P::CHI::chi.
+       - Update year.
+
 0.09 2014-04-20
         - Bugfix test suite.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-Plugin-CHI-0.09/META.json 
new/Mojolicious-Plugin-CHI-0.11/META.json
--- old/Mojolicious-Plugin-CHI-0.09/META.json   2014-04-20 20:31:41.000000000 
+0200
+++ new/Mojolicious-Plugin-CHI-0.11/META.json   2015-01-16 04:08:36.000000000 
+0100
@@ -4,7 +4,7 @@
       "Nils Diewald"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 6.82, CPAN::Meta::Converter 
version 2.120351",
+   "generated_by" : "ExtUtils::MakeMaker version 6.82, CPAN::Meta::Converter 
version 2.141170",
    "license" : [
       "artistic_2"
    ],
@@ -48,5 +48,5 @@
          "url" : "https://github.com/Akron/Mojolicious-Plugin-CHI";
       }
    },
-   "version" : "0.09"
+   "version" : "0.11"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-Plugin-CHI-0.09/META.yml 
new/Mojolicious-Plugin-CHI-0.11/META.yml
--- old/Mojolicious-Plugin-CHI-0.09/META.yml    2014-04-20 20:31:41.000000000 
+0200
+++ new/Mojolicious-Plugin-CHI-0.11/META.yml    2015-01-16 04:08:36.000000000 
+0100
@@ -8,7 +8,7 @@
 configure_requires:
   ExtUtils::MakeMaker: '0'
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.82, CPAN::Meta::Converter version 
2.120351'
+generated_by: 'ExtUtils::MakeMaker version 6.82, CPAN::Meta::Converter version 
2.141170'
 license: artistic_2
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -25,4 +25,4 @@
 resources:
   license: http://www.opensource.org/licenses/artistic-license-2.0
   repository: https://github.com/Akron/Mojolicious-Plugin-CHI
-version: '0.09'
+version: '0.11'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Mojolicious-Plugin-CHI-0.09/lib/Mojolicious/Plugin/CHI/chi.pm 
new/Mojolicious-Plugin-CHI-0.11/lib/Mojolicious/Plugin/CHI/chi.pm
--- old/Mojolicious-Plugin-CHI-0.09/lib/Mojolicious/Plugin/CHI/chi.pm   
2014-04-17 17:39:45.000000000 +0200
+++ new/Mojolicious-Plugin-CHI-0.11/lib/Mojolicious/Plugin/CHI/chi.pm   
2015-01-16 04:05:20.000000000 +0100
@@ -1,12 +1,16 @@
 package Mojolicious::Plugin::CHI::chi;
 use Mojo::Base 'Mojolicious::Command';
-use Mojo::Util 'tablify';
+use Mojo::Util qw/tablify quote/;
 
 use Getopt::Long qw/GetOptions :config no_auto_abbrev no_ignore_case/;
 
 has description => 'Interact with CHI caches.';
 has usage       => sub { shift->extract_usage };
 
+sub _unknown {
+  return 'Unknown cache handle ' . quote($_[0]) . ".\n\n"
+};
+
 # Run chi
 sub run {
   my $self = shift;
@@ -36,6 +40,9 @@
 
     my $chi = $app->chi($cache);
 
+    # Cache is unknown
+    print _unknown($cache) and return unless $chi;
+
     # Do not modify non-persistant in-process caches!
     if ($chi->short_driver_name =~ /^(?:Raw)?Memory$/) {
       $log->warn("You are trying to $command a ".
@@ -61,6 +68,9 @@
 
       my $chi = $app->chi($cache);
 
+      # Cache is unknown
+      print _unknown($cache) and return unless $chi;;
+
       # Do not modify non-persistant in-process caches!
       if ($chi->short_driver_name =~ /^(?:Raw)?Memory$/) {
        $log->warn("You are trying to $command " .
@@ -194,10 +204,10 @@
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright (C) 2013-2014, L<Nils Diewald||http://nils-diewald.de>.
+Copyright (C) 2013-2015, L<Nils Diewald||http://nils-diewald.de>.
 
 This program is free software, you can redistribute it
-and/or modify it under the same terms as Perl.
+and/or modify it under the terms of the Artistic License version 2.0.
 
 The documentation is based on L<Mojolicious::Command::eval>,
 written by Sebastian Riedel.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Mojolicious-Plugin-CHI-0.09/lib/Mojolicious/Plugin/CHI.pm 
new/Mojolicious-Plugin-CHI-0.11/lib/Mojolicious/Plugin/CHI.pm
--- old/Mojolicious-Plugin-CHI-0.09/lib/Mojolicious/Plugin/CHI.pm       
2014-04-20 20:23:47.000000000 +0200
+++ new/Mojolicious-Plugin-CHI-0.11/lib/Mojolicious/Plugin/CHI.pm       
2015-01-16 03:33:02.000000000 +0100
@@ -3,7 +3,7 @@
 use Scalar::Util 'weaken';
 use CHI;
 
-our $VERSION = '0.09';
+our $VERSION = '0.11';
 
 # Register Plugin
 sub register {
@@ -11,7 +11,7 @@
 
   # Load parameter from config file
   if (my $config_param = $mojo->config('CHI')) {
-    $param = { %$config_param, %$param };
+    $param = { %$param, %$config_param };
   };
 
   # Hash of cache handles
@@ -47,6 +47,8 @@
   foreach my $name (keys %$param) {
     my $cache_param = $param->{$name};
 
+    next unless ref $cache_param && ref $cache_param eq 'HASH';
+
     # Already exists
     if (exists $caches->{$name}) {
       $mojo->log->warn(qq{Multiple attempts to establish cache "$name"});
@@ -191,8 +193,9 @@
 overridden using L<on_get_error|CHI/CONSTRUCTOR> and
 L<on_set_error|CHI/CONSTRUCTOR>.
 
-All parameters can be set either on registration or
-as part of the configuration file with the key C<CHI>.
+All parameters can be set as part of the configuration
+file with the key C<CHI> or on registration
+(that can be overwritten by configuration).
 
 
 =head1 HELPERS
@@ -280,7 +283,7 @@
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright (C) 2012-2014, L<Nils Diewald|http://nils-diewald.de/>.
+Copyright (C) 2012-2015, L<Nils Diewald|http://nils-diewald.de/>.
 
 This program is free software, you can redistribute it
 and/or modify it under the terms of the Artistic License version 2.0.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojolicious-Plugin-CHI-0.09/t/CHI-Command.t 
new/Mojolicious-Plugin-CHI-0.11/t/CHI-Command.t
--- old/Mojolicious-Plugin-CHI-0.09/t/CHI-Command.t     2014-04-18 
15:03:26.000000000 +0200
+++ new/Mojolicious-Plugin-CHI-0.11/t/CHI-Command.t     2015-01-16 
04:07:25.000000000 +0100
@@ -92,6 +92,12 @@
 ok($flat_file->get_object('key_2')->is_expired, 'Key is expired');
 
 stdout_is(
+  sub { $chi->run('purge', 'Unknown') },
+  "Unknown cache handle \"Unknown\".\n\n",
+  'Purge cache'
+);
+
+stdout_is(
   sub { $chi->run('purge', 'MyFlatFile') },
   "Cache \"MyFlatFile\" was purged.\n\n",
   'Purge cache'
@@ -101,6 +107,12 @@
 is($flat_file->get('key_1'), 'value_1', 'Get key');
 
 stdout_is(
+  sub { $chi->run('clear', 'Unknown') },
+  "Unknown cache handle \"Unknown\".\n\n",
+  'Clear cache'
+);
+
+stdout_is(
   sub { $chi->run('clear', 'MyFlatFile') },
   "Cache \"MyFlatFile\" was cleared.\n\n",
   'Clear cache'
@@ -114,6 +126,12 @@
 is($flat_file->get('key_4'), 'value_4', 'Get key');
 
 stdout_is(
+  sub { $chi->run('remove', 'Unknown', 'key') },
+  "Unknown cache handle \"Unknown\".\n\n",
+  'Remove key'
+);
+
+stdout_is(
   sub { $chi->run('remove', 'MyFlatFile', 'key_3') },
   "Key \"key_3\" from cache \"MyFlatFile\" was removed.\n\n",
   'Remove key'
@@ -123,6 +141,12 @@
 is($flat_file->get('key_4'), 'value_4', 'Get key');
 
 stdout_is(
+  sub { $chi->run('expire', 'Unknown', 'key') },
+  "Unknown cache handle \"Unknown\".\n\n",
+  'Expire key'
+);
+
+stdout_is(
   sub { $chi->run('expire', 'MyFlatFile', 'key_4') },
   "Key \"key_4\" from cache \"MyFlatFile\" was expired.\n\n",
   'Expire key'

++++++ 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
#custom_test: |-
#startserver && make test
#ignore_requires: Bizarre::Module

Reply via email to