Hello community, here is the log from the commit of package perl-Mock-Quick for openSUSE:Factory checked in at 2016-05-30 09:57:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Mock-Quick (Old) and /work/SRC/openSUSE:Factory/.perl-Mock-Quick.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Mock-Quick" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Mock-Quick/perl-Mock-Quick.changes 2015-08-29 20:04:42.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Mock-Quick.new/perl-Mock-Quick.changes 2016-05-30 09:57:54.000000000 +0200 @@ -1,0 +2,10 @@ +Sat May 28 10:09:52 UTC 2016 - [email protected] + +- updated to 1.111 + see /usr/share/doc/packages/perl-Mock-Quick/Changes + + 1.111 2016-05-26 07:24:22-07:00 America/Los_Angeles + + - Documentation fixes + +------------------------------------------------------------------- Old: ---- Mock-Quick-1.110.tar.gz New: ---- Mock-Quick-1.111.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Mock-Quick.spec ++++++ --- /var/tmp/diff_new_pack.jVktza/_old 2016-05-30 09:57:55.000000000 +0200 +++ /var/tmp/diff_new_pack.jVktza/_new 2016-05-30 09:57:55.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-Mock-Quick # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 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,7 +17,7 @@ Name: perl-Mock-Quick -Version: 1.110 +Version: 1.111 Release: 0 %define cpan_name Mock-Quick Summary: Quickly mock objects and classes, even temporarily replace them, @@ -47,18 +47,17 @@ and will unload it then redefine it. This is particularly a problem if you only want to override a class on a lexical level. -Mock-Object provides a declarative mocking interface that results in a very +Mock-Quick provides a declarative mocking interface that results in a very concise, but clear syntax. There are separate facilities for mocking object instances, and classes. You can quickly create an instance of an object with custom attributes and methods. You can also quickly create an anonymous class, optionally inheriting from another, with whatever methods you desire. -Mock-Object also provides a tool that provides an OO interface to -overriding methods in existing classes. This tool also allows for the -restoration of the original class methods. Best of all this is a localized -tool, when your control object falls out of scope the original class is -restored. +Mock-Quick also provides a tool that provides an OO interface to overriding +methods in existing classes. This tool also allows for the restoration of +the original class methods. Best of all this is a localized tool, when your +control object falls out of scope the original class is restored. %prep %setup -q -n %{cpan_name}-%{version} ++++++ Mock-Quick-1.110.tar.gz -> Mock-Quick-1.111.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mock-Quick-1.110/Changes new/Mock-Quick-1.111/Changes --- old/Mock-Quick-1.110/Changes 2015-08-26 19:03:38.000000000 +0200 +++ new/Mock-Quick-1.111/Changes 2016-05-26 16:25:17.000000000 +0200 @@ -1,3 +1,7 @@ +1.111 2016-05-26 07:24:22-07:00 America/Los_Angeles + + - Documentation fixes + 1.110 2015-08-26 10:02:22-07:00 America/Los_Angeles - Fix Test from 1.109 to skip when required module is missing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mock-Quick-1.110/MANIFEST new/Mock-Quick-1.111/MANIFEST --- old/Mock-Quick-1.110/MANIFEST 2015-08-26 19:03:38.000000000 +0200 +++ new/Mock-Quick-1.111/MANIFEST 2016-05-26 16:25:17.000000000 +0200 @@ -9,6 +9,8 @@ lib/Object/Quick.pm MANIFEST This list of files MANIFEST.SKIP +META.json +META.yml README t/Class.t t/clear_warn.t @@ -20,5 +22,3 @@ t/Object.t t/object_control.t t/Util.t -META.yml -META.json diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mock-Quick-1.110/META.json new/Mock-Quick-1.111/META.json --- old/Mock-Quick-1.110/META.json 2015-08-26 19:03:38.000000000 +0200 +++ new/Mock-Quick-1.111/META.json 2016-05-26 16:25:17.000000000 +0200 @@ -4,7 +4,7 @@ "Chad Granum <[email protected]>" ], "dynamic_config" : 1, - "generated_by" : "Module::Build version 0.4214", + "generated_by" : "Module::Build version 0.4218", "license" : [ "perl_5" ], @@ -37,7 +37,7 @@ "provides" : { "Mock::Quick" : { "file" : "lib/Mock/Quick.pm", - "version" : "1.110" + "version" : "1.111" }, "Mock::Quick::Class" : { "file" : "lib/Mock/Quick/Class.pm" @@ -70,5 +70,5 @@ "url" : "http://github.com/exodist/Mock-Quick" } }, - "version" : "1.110" + "version" : "1.111" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mock-Quick-1.110/META.yml new/Mock-Quick-1.111/META.yml --- old/Mock-Quick-1.110/META.yml 2015-08-26 19:03:38.000000000 +0200 +++ new/Mock-Quick-1.111/META.yml 2016-05-26 16:25:17.000000000 +0200 @@ -9,7 +9,7 @@ configure_requires: Module::Build: '0.42' dynamic_config: 1 -generated_by: 'Module::Build version 0.4214, CPAN::Meta::Converter version 2.150001' +generated_by: 'Module::Build version 0.4218, CPAN::Meta::Converter version 2.150001' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -18,7 +18,7 @@ provides: Mock::Quick: file: lib/Mock/Quick.pm - version: '1.110' + version: '1.111' Mock::Quick::Class: file: lib/Mock/Quick/Class.pm Mock::Quick::Method: @@ -39,4 +39,4 @@ bugtracker: http://github.com/exodist/Mock-Quick/issues license: http://dev.perl.org/licenses/ repository: http://github.com/exodist/Mock-Quick -version: '1.110' +version: '1.111' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mock-Quick-1.110/README new/Mock-Quick-1.111/README --- old/Mock-Quick-1.110/README 2015-08-26 19:03:38.000000000 +0200 +++ new/Mock-Quick-1.111/README 2016-05-26 16:25:17.000000000 +0200 @@ -1,70 +1,76 @@ NAME - Mock::Quick - Quickly mock objects and classes, even temporarily replace - them, side-effect free. + + Mock::Quick - Quickly mock objects and classes, even temporarily + replace them, side-effect free. DESCRIPTION - Mock-Quick is here to solve the current problems with Mocking libraries. + + Mock-Quick is here to solve the current problems with Mocking + libraries. There are a couple Mocking libraries available on CPAN. The primary problems with these libraries include verbose syntax, and most importantly side-effects. Some Mocking libraries expect you to mock a specific class, and will unload it then redefine it. This is - particularly a problem if you only want to override a class on a lexical - level. + particularly a problem if you only want to override a class on a + lexical level. - Mock-Object provides a declarative mocking interface that results in a + Mock-Quick provides a declarative mocking interface that results in a very concise, but clear syntax. There are separate facilities for mocking object instances, and classes. You can quickly create an instance of an object with custom attributes and methods. You can also quickly create an anonymous class, optionally inheriting from another, with whatever methods you desire. - Mock-Object also provides a tool that provides an OO interface to + Mock-Quick also provides a tool that provides an OO interface to overriding methods in existing classes. This tool also allows for the restoration of the original class methods. Best of all this is a - localized tool, when your control object falls out of scope the original - class is restored. + localized tool, when your control object falls out of scope the + original class is restored. SYNOPSIS - MOCKING OBJECTS - use Mock::Quick; + MOCKING OBJECTS + + use Mock::Quick; + my $obj = qobj( foo => 'bar', # define attribute do_it => qmeth { ... }, # define method ... ); - + is( $obj->foo, 'bar' ); $obj->foo( 'baz' ); is( $obj->foo, 'baz' ); - + $obj->do_it(); - + # define the new attribute automatically $obj->bar( 'xxx' ); - + # define a new method on the fly $obj->baz( qmeth { ... }); - + # remove an attribute or method $obj->baz( qclear() ); - STRICTER MOCK - use Mock::Quick; + STRICTER MOCK + use Mock::Quick; + my $obj = qstrict( foo => 'bar', # define attribute do_it => qmeth { ... }, # define method ... ); - + is( $obj->foo, 'bar' ); $obj->foo( 'baz' ); is( $obj->foo, 'baz' ); - + $obj->do_it(); - + # remove an attribute or method $obj->baz( qclear() ); @@ -72,89 +78,98 @@ # Cannot define the new attribute automatically dies_ok { $obj->bar( 'xxx' ) }; - + # Cannot define a new method on the fly dies_ok { $obj->baz( qmeth { ... }) }; In order to add methods/accessors you need to create a control object. - CONTROL OBJECTS - Control objects are objects that let you interface a mocked object. They - let you add attributes and methods, or even clear them. This is + CONTROL OBJECTS + + Control objects are objects that let you interface a mocked object. + They let you add attributes and methods, or even clear them. This is unnecessary unless you use strict mocking, or choose not to import qmeth() and qclear(). Take Control - my $control = qcontrol( $obj ); + + my $control = qcontrol( $obj ); Add Attributes - $control->set_attributes( - foo => 'bar', - ... - ); + + $control->set_attributes( + foo => 'bar', + ... + ); Add Methods - $control->set_methods( - do_it => sub { ... }, # No need to use qmeth() - ... - ); + + $control->set_methods( + do_it => sub { ... }, # No need to use qmeth() + ... + ); Clear Attributes/Methods - $control->clear( qw/foo do_it .../ ); + + $control->clear( qw/foo do_it .../ ); Toggle strict - $control->strict( $BOOL ); + + $control->strict( $BOOL ); Create With Control - my $obj = qobj ...; - my $obj = qstrict ...; - my ( $obj, $control ) = qobjc ...; - my ( $sobj, $scontrol ) = qstrictc ...; - MOCKING CLASSES + my $obj = qobj ...; + my $obj = qstrict ...; + my ( $obj, $control ) = qobjc ...; + my ( $sobj, $scontrol ) = qstrictc ...; + + MOCKING CLASSES + Note: the control object returned here is of type Mock::Quick::Class, whereas control objects for qobj style objects are of Mock::Quick::Object::Control. - IMPLEMENT A CLASS - This will implement a class at the namespace provided via the -implement - argument. The class must not already be loaded. Once complete the real - class will be prevented from loading until you call undefine() on the - control object. + IMPLEMENT A CLASS - use Mock::Quick; + This will implement a class at the namespace provided via the + -implement argument. The class must not already be loaded. Once + complete the real class will be prevented from loading until you call + undefine() on the control object. + use Mock::Quick; + my $control = qclass( -implement => 'My::Package', - + # Insert a generic new() method (blessed hash) -with_new => 1, - + # Inheritance -subclass => 'Some::Class', # Can also do -subclass => [ 'Class::A', 'Class::B' ], - + # generic get/set attribute methods. -attributes => [ qw/a b c d/ ], - + # Method that simply returns a value. simple => 'value', - + # Custom method. method => sub { ... }, ); - + my $obj = $control->package->new; # OR my $obj = My::Package->new; - + # Override a method $control->override( foo => sub { ... }); - + # Restore it to the original $control->restore( 'foo' ); - + # Remove the namespace we created, which would allow the real thing to load # in a require or use statement. $control->undefine(); @@ -162,57 +177,59 @@ You can also use the qimplement() method instead of qclass: use Mock::Quick; - + my $control = qimplement 'Some::Package' => ( %args ); - ANONYMOUS MOCKED CLASS - This is if you just need to generate a class where the package name does - not matter. This is done when the -takeover and -implement arguments are - both omitted. + ANONYMOUS MOCKED CLASS - use Mock::Quick; + This is if you just need to generate a class where the package name + does not matter. This is done when the -takeover and -implement + arguments are both omitted. + use Mock::Quick; + my $control = qclass( # Insert a generic new() method (blessed hash) -with_new => 1, - + # Inheritance -subclass => 'Some::Class', # Can also do -subclass => [ 'Class::A', 'Class::B' ], - + # generic get/set attribute methods. -attributes => [ qw/a b c d/ ], - + # Method that simply returns a value. simple => 'value', - + # Custom method. method => sub { ... }, ); - + my $obj = $control->package->new; - + # Override a method $control->override( foo => sub { ... }); - + # Restore it to the original $control->restore( 'foo' ); - + # Remove the anonymous namespace we created. $control->undefine(); - TAKING OVER EXISTING/LOADED CLASSES - use Mock::Quick; + TAKING OVER EXISTING/LOADED CLASSES + use Mock::Quick; + my $control = qtakeover 'Some::Package' => ( %overrides ); - + # Override a method $control->override( foo => sub { ... }); - + # Restore it to the original $control->restore( 'foo' ); - + # Destroy the control object and completely restore the original class # Some::Package. $control = undef; @@ -220,13 +237,14 @@ You can also do this through qclass(): use Mock::Quick; - + my $control = qclass( -takeover => 'Some::Package', %overrides ); METRICS + All control objects have a 'metrics' method. The metrics method returns a hash where keys are method names, and values are the number of times the method has been called. When a method is altered or removed the key @@ -236,71 +254,87 @@ loaded class metrics will only track overridden methods. EXPORTS + Mock-Quick uses Exporter::Declare. This allows for exports to be prefixed or renamed. See "RENAMING IMPORTED ITEMS" in Exporter::Declare for more information. $obj = qobj( attribute => value, ... ) + ( $obj, $control ) = qobjc( attribute => value, ... ) - Create an object. Every possible attribute works fine as a get/set - accessor. You can define other methods using qmeth {...} and - assigning that to an attribute. You can clear a method using - qclear() as an argument. - See Mock::Quick::Object for more. + Create an object. Every possible attribute works fine as a get/set + accessor. You can define other methods using qmeth {...} and + assigning that to an attribute. You can clear a method using qclear() + as an argument. + + See Mock::Quick::Object for more. $obj = qstrict( attribute => value, ... ) + ( $obj, $control ) = qstrictc( attribute => value, ... ) - Create a stricter object, get/set accessors will not autovivify into - existence for undefined attributes. + + Create a stricter object, get/set accessors will not autovivify into + existence for undefined attributes. $control = qclass( -config => ..., name => $value || sub { ... }, ... ) - Define an anonymous package with the desired methods and - specifications. - See Mock::Quick::Class for more. + Define an anonymous package with the desired methods and + specifications. + + See Mock::Quick::Class for more. $control = qclass( -takeover => $package, %overrides ) + $control = qtakeover( $package, %overrides ); - Take over an existing class. - See Mock::Quick::Class for more. + Take over an existing class. + + See Mock::Quick::Class for more. + + $control = qimplement( $package, -config => ..., name => $value || sub + { ... }, ... ) - $control = qimplement( $package, -config => ..., name => $value || sub { - ... }, ... ) $control = qclass( -implement => $package, ... ) - Implement the given package to specifications, altering %INC so that - the real class will not load. Destroying the control object will - once again allow the original to load. + + Implement the given package to specifications, altering %INC so that + the real class will not load. Destroying the control object will once + again allow the original to load. qclear() - Returns a special reference that when used as an argument, will - cause Mock::Quick::Object methods to be cleared. + + Returns a special reference that when used as an argument, will cause + Mock::Quick::Object methods to be cleared. qmeth { my $self = shift; ... } - Define a method for an Mock::Quick::Object instance. - default_export qcontrol => sub { Mock::Quick::Object::Control->new( - @_ ) }; + Define a method for an Mock::Quick::Object instance. + + default_export qcontrol => sub { Mock::Quick::Object::Control->new( + @_ ) }; AUTHORS + Chad Granum [email protected] Ben Hengst [email protected] CONTRIBUTORS + Contributors are listed as authors in modules they have touched. Ben Hengst [email protected] + Glen Hinkle [email protected] COPYRIGHT + Copyright (C) 2011 Chad Granum Mock-Quick is free software; Standard perl licence. Mock-Quick is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for - more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license + for more details. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mock-Quick-1.110/lib/Mock/Quick.pm new/Mock-Quick-1.111/lib/Mock/Quick.pm --- old/Mock-Quick-1.110/lib/Mock/Quick.pm 2015-08-26 19:03:38.000000000 +0200 +++ new/Mock-Quick-1.111/lib/Mock/Quick.pm 2016-05-26 16:25:17.000000000 +0200 @@ -9,7 +9,7 @@ use Mock::Quick::Util; use Carp qw/carp/; -our $VERSION = '1.110'; +our $VERSION = '1.111'; import_arguments qw/intercept/; @@ -103,13 +103,13 @@ then redefine it. This is particularly a problem if you only want to override a class on a lexical level. -Mock-Object provides a declarative mocking interface that results in a very +Mock-Quick provides a declarative mocking interface that results in a very concise, but clear syntax. There are separate facilities for mocking object instances, and classes. You can quickly create an instance of an object with custom attributes and methods. You can also quickly create an anonymous class, optionally inheriting from another, with whatever methods you desire. -Mock-Object also provides a tool that provides an OO interface to overriding +Mock-Quick also provides a tool that provides an OO interface to overriding methods in existing classes. This tool also allows for the restoration of the original class methods. Best of all this is a localized tool, when your control object falls out of scope the original class is restored.
