Hello community,
here is the log from the commit of package perl-Test-MockObject for
openSUSE:Factory checked in at 2015-04-15 16:27:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Test-MockObject (Old)
and /work/SRC/openSUSE:Factory/.perl-Test-MockObject.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Test-MockObject"
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-Test-MockObject/perl-Test-MockObject.changes
2014-03-21 12:15:21.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.perl-Test-MockObject.new/perl-Test-MockObject.changes
2015-04-15 16:27:11.000000000 +0200
@@ -1,0 +2,13 @@
+Tue Apr 14 20:27:58 UTC 2015 - [email protected]
+
+- updated to 1.20140408
+ see /usr/share/doc/packages/perl-Test-MockObject/Changes
+
+ 1.20140408 2014-04-07 17:38:44-07:00 America/Los_Angeles
+ - enabled Travis CI (no user-visible changes)
+ - improved fields-based object support (Olivier Mengué, Maxime Soulé)
+
+ 1.20140328 2014-03-28 16:17:59-07:00 America/Los_Angeles
+ - support added for fields-based objects (Gavin Mogan, RT #84535)
+
+-------------------------------------------------------------------
Old:
----
Test-MockObject-1.20120301.tar.gz
New:
----
Test-MockObject-1.20140408.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Test-MockObject.spec ++++++
--- /var/tmp/diff_new_pack.s6qa7D/_old 2015-04-15 16:27:11.000000000 +0200
+++ /var/tmp/diff_new_pack.s6qa7D/_new 2015-04-15 16:27:11.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-Test-MockObject
#
-# 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,7 +17,7 @@
Name: perl-Test-MockObject
-Version: 1.20120301
+Version: 1.20140408
Release: 0
%define cpan_name Test-MockObject
Summary: Perl extension for emulating troublesome interfaces
++++++ Test-MockObject-1.20120301.tar.gz -> Test-MockObject-1.20140408.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-MockObject-1.20120301/Changes
new/Test-MockObject-1.20140408/Changes
--- old/Test-MockObject-1.20120301/Changes 2012-03-01 22:17:21.000000000
+0100
+++ new/Test-MockObject-1.20140408/Changes 2014-04-08 02:38:47.000000000
+0200
@@ -1,5 +1,12 @@
Revision history for Perl extension Test::MockObject.
+1.20140408 2014-04-07 17:38:44-07:00 America/Los_Angeles
+ - enabled Travis CI (no user-visible changes)
+ - improved fields-based object support (Olivier Mengué, Maxime Soulé)
+
+1.20140328 2014-03-28 16:17:59-07:00 America/Los_Angeles
+ - support added for fields-based objects (Gavin Mogan, RT #84535)
+
1.20120301 2012-03-01 13:17:20 America/Los_Angeles
- updated dependencies to latest versions of UNIVERSAL::isa and
UNIVERSAL::can
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-MockObject-1.20120301/LICENSE
new/Test-MockObject-1.20140408/LICENSE
--- old/Test-MockObject-1.20120301/LICENSE 2012-03-01 22:17:21.000000000
+0100
+++ new/Test-MockObject-1.20140408/LICENSE 2014-04-08 02:38:47.000000000
+0200
@@ -22,7 +22,7 @@
Version 1, February 1989
Copyright (C) 1989 Free Software Foundation, Inc.
- 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-MockObject-1.20120301/MANIFEST
new/Test-MockObject-1.20140408/MANIFEST
--- old/Test-MockObject-1.20120301/MANIFEST 2012-03-01 22:17:21.000000000
+0100
+++ new/Test-MockObject-1.20140408/MANIFEST 2014-04-08 02:38:47.000000000
+0200
@@ -1,3 +1,4 @@
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest
v5.013.
Changes
LICENSE
MANIFEST
@@ -13,6 +14,7 @@
t/debuggingwarnings.t
t/debuggingwarningsextends.t
t/extends-bugs.t
+t/extends-fields.t
t/extends.t
t/ignore.t
t/isa.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-MockObject-1.20120301/META.yml
new/Test-MockObject-1.20140408/META.yml
--- old/Test-MockObject-1.20120301/META.yml 2012-03-01 22:17:21.000000000
+0100
+++ new/Test-MockObject-1.20140408/META.yml 2014-04-08 02:38:47.000000000
+0200
@@ -3,35 +3,37 @@
author:
- chromatic
build_requires:
- Test::Exception: 0
- Test::More: 0.98
- Test::Warn: 0.23
- base: 0
- overload: 0
- vars: 0
+ Test::Exception: '0.31'
+ Test::More: '0.98'
+ Test::Warn: '0.23'
+ base: '0'
+ fields: '0'
+ overload: '0'
+ vars: '0'
configure_requires:
- ExtUtils::MakeMaker: 6.30
+ ExtUtils::MakeMaker: '6.30'
dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.300009, CPAN::Meta::Converter version
2.120530'
+generated_by: 'Dist::Zilla version 5.013, CPAN::Meta::Converter version
2.133380'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ version: '1.4'
name: Test-MockObject
requires:
- CGI: 0
- Carp: 0
- Devel::Peek: 0
- Scalar::Util: 0
- Test::Builder: 0
- Test::Exception: 0.31
- Test::More: 0.98
- Test::Warn: 0.23
- UNIVERSAL::can: 1.20110617
- UNIVERSAL::isa: 1.20110614
- strict: 0
- warnings: 0
+ CGI: '0'
+ Carp: '0'
+ Devel::Peek: '0'
+ Scalar::Util: '0'
+ Test::Builder: '0'
+ Test::Exception: '0.31'
+ Test::More: '0.98'
+ Test::Warn: '0.23'
+ UNIVERSAL::can: '1.20110617'
+ UNIVERSAL::isa: '1.20110614'
+ constant: '0'
+ strict: '0'
+ warnings: '0'
resources:
bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-MockObject
repository: https://github.com/chromatic/Test-MockObject.git
-version: 1.20120301
+version: '1.20140408'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-MockObject-1.20120301/Makefile.PL
new/Test-MockObject-1.20140408/Makefile.PL
--- old/Test-MockObject-1.20120301/Makefile.PL 2012-03-01 22:17:21.000000000
+0100
+++ new/Test-MockObject-1.20140408/Makefile.PL 2014-04-08 02:38:47.000000000
+0200
@@ -1,4 +1,5 @@
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker
v5.013.
use strict;
use warnings;
@@ -11,14 +12,7 @@
my %WriteMakefileArgs = (
"ABSTRACT" => "Perl extension for emulating troublesome interfaces",
"AUTHOR" => "chromatic",
- "BUILD_REQUIRES" => {
- "Test::Exception" => 0,
- "Test::More" => "0.98",
- "Test::Warn" => "0.23",
- "base" => 0,
- "overload" => 0,
- "vars" => 0
- },
+ "BUILD_REQUIRES" => {},
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => "6.30"
},
@@ -37,27 +31,51 @@
"Test::Warn" => "0.23",
"UNIVERSAL::can" => "1.20110617",
"UNIVERSAL::isa" => "1.20110614",
+ "constant" => 0,
"strict" => 0,
"warnings" => 0
},
- "VERSION" => "1.20120301",
+ "TEST_REQUIRES" => {
+ "Test::Exception" => "0.31",
+ "Test::More" => "0.98",
+ "Test::Warn" => "0.23",
+ "base" => 0,
+ "fields" => 0,
+ "overload" => 0,
+ "vars" => 0
+ },
+ "VERSION" => "1.20140408",
"test" => {
"TESTS" => "t/*.t"
}
);
-unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
- my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
- my $pp = $WriteMakefileArgs{PREREQ_PM};
- for my $mod ( keys %$br ) {
- if ( exists $pp->{$mod} ) {
- $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
- }
- else {
- $pp->{$mod} = $br->{$mod};
- }
- }
+my %FallbackPrereqs = (
+ "CGI" => 0,
+ "Carp" => 0,
+ "Devel::Peek" => 0,
+ "Scalar::Util" => 0,
+ "Test::Builder" => 0,
+ "Test::Exception" => "0.31",
+ "Test::More" => "0.98",
+ "Test::Warn" => "0.23",
+ "UNIVERSAL::can" => "1.20110617",
+ "UNIVERSAL::isa" => "1.20110614",
+ "base" => 0,
+ "constant" => 0,
+ "fields" => 0,
+ "overload" => 0,
+ "strict" => 0,
+ "vars" => 0,
+ "warnings" => 0
+);
+
+
+unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
+ delete $WriteMakefileArgs{TEST_REQUIRES};
+ delete $WriteMakefileArgs{BUILD_REQUIRES};
+ $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
}
delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-MockObject-1.20120301/README
new/Test-MockObject-1.20140408/README
--- old/Test-MockObject-1.20120301/README 2012-03-01 22:17:21.000000000
+0100
+++ new/Test-MockObject-1.20140408/README 2014-04-08 02:38:47.000000000
+0200
@@ -1,7 +1,7 @@
This archive contains the distribution Test-MockObject,
-version 1.20120301:
+version 1.20140408:
Perl extension for emulating troublesome interfaces
@@ -11,3 +11,5 @@
the same terms as the Perl 5 programming language system itself.
+This README file was generated by Dist::Zilla::Plugin::Readme v5.013.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Test-MockObject-1.20120301/lib/Test/MockObject/Extends.pm
new/Test-MockObject-1.20140408/lib/Test/MockObject/Extends.pm
--- old/Test-MockObject-1.20120301/lib/Test/MockObject/Extends.pm
2012-03-01 22:17:21.000000000 +0100
+++ new/Test-MockObject-1.20140408/lib/Test/MockObject/Extends.pm
2014-04-08 02:38:47.000000000 +0200
@@ -1,8 +1,5 @@
package Test::MockObject::Extends;
-{
- $Test::MockObject::Extends::VERSION = '1.20120301';
-}
-
+$Test::MockObject::Extends::VERSION = '1.20140408';
use strict;
use warnings;
@@ -18,6 +15,8 @@
use Devel::Peek 'CvGV';
use Scalar::Util 'blessed';
+use constant PERL_5_9 => $^V gt v5.9.0;
+
sub new
{
my ($class, $fake_class) = @_;
@@ -28,7 +27,23 @@
$class->check_class_loaded( $parent_class );
my $self = blessed( $fake_class ) ? $fake_class : {};
- bless $self, $class->gen_package( $parent_class );
+ # Fields now locks the hash as of 5.9.0 - #84535
+ if (PERL_5_9 && blessed( $fake_class ) && do {
+ no strict 'refs';
+ exists ${$parent_class . '::'}{FIELDS} # uses fields
+ }) {
+ # bypass prototypes
+ &Hash::Util::unlock_hash(\%$fake_class);
+ bless $self, $class->gen_package( $parent_class );
+ &Hash::Util::lock_keys(\%$fake_class,
+ fields::_accessible_keys($parent_class));
+ }
+ else
+ {
+ bless $self, $class->gen_package( $parent_class );
+ }
+
+ return $self;
}
sub check_class_loaded
@@ -205,8 +220,8 @@
=head1 DESCRIPTION
Test::MockObject::Extends lets you mock one or more methods of an existing
-object or class. This can be very handy when you're testing a well-factored
-module that does almost exactly what you want. Wouldn't it be handy to take
+object or class. This can be very handy when you're testing a well-factored
+module that does almost exactly what you want. Wouldn't it be handy to take
control of a method or two to make sure you receive testable results? Now you
can.
@@ -216,9 +231,9 @@
=item C<new( $object | $class )>
-C<new()> takes one optional argument, the object or class to mock. If you're
+C<new()> takes one optional argument, the object or class to mock. If you're
mocking a method for an object that holds internal state, create an appropriate
-object, then pass it to this constructor. B<NOTE:> this will modify the object
+object, then pass it to this constructor. B<NOTE:> this will modify the object
in place.
If you're mocking an object that does not need state, as in the cases where
@@ -238,14 +253,14 @@
=item C<mock( $methodname, $sub_ref )>
See the documentation for Test::MockObject for all of the ways to mock methods
-and to retrieve method logging information. These methods return the invocant,
+and to retrieve method logging information. These methods return the invocant,
so you can chain them.
=item C<unmock( $methodname )>
-Removes any active mocking of the named method. This means any calls to that
+Removes any active mocking of the named method. This means any calls to that
method will hit the method of that name in the class being mocked, if it
-exists. This method returns the invocant, you can chain it.
+exists. This method returns the invocant, you can chain it.
=item C<isa( $class )>
@@ -262,7 +277,7 @@
=item * C<check_class_loaded( $parent_class )>
-This verifies that you have the mockee defined. If not, it attempts to load
+This verifies that you have the mockee defined. If not, it attempts to load
the corresponding module for you.
=item * C<gen_autoload( $extended )>
@@ -270,7 +285,7 @@
Returns an AUTOLOAD subroutine for the mock object that checks that the
extended object (or class) can perform the requested method, that
L<Test::MockObject> can perform it, or that the parent has an appropriate
-AUTOLOAD of its own. (It should have its own C<can()> in that case too
+AUTOLOAD of its own. (It should have its own C<can()> in that case too
though.)
=item * C<gen_can( $extended )>
@@ -302,7 +317,7 @@
=head1 CAVEATS
There may be some weird corner cases with dynamically generated methods in the
-mocked class. You really should use subroutine declarations though, or at
+mocked class. You really should use subroutine declarations though, or at
least set C<can()> appropriately.
There are also potential name collisions with methods in this module or
@@ -312,9 +327,9 @@
chromatic, E<lt>chromatic at wgz dot orgE<gt>
-Documentation bug fixed by Stevan Little. Additional AUTOLOAD approach
-suggested by Adam Kennedy. Other bugs reported by Paul the Nomad and Praveen
-Ray. Thank you all!
+Documentation bug fixed by Stevan Little. Additional AUTOLOAD approach
+suggested by Adam Kennedy. Field-based objects supported by Gavin Mogan. Other
+bugs reported by Paul the Nomad and Praveen Ray. Thank you all!
=head1 BUGS
@@ -322,5 +337,5 @@
=head1 COPYRIGHT
-Copyright (c) 2004 - 2011, chromatic. All rights reserved. You may use,
+Copyright (c) 2004 - 2014, chromatic. All rights reserved. You may use,
modify, and distribute this module under the same terms as Perl 5.10
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-MockObject-1.20120301/lib/Test/MockObject.pm
new/Test-MockObject-1.20140408/lib/Test/MockObject.pm
--- old/Test-MockObject-1.20120301/lib/Test/MockObject.pm 2012-03-01
22:17:21.000000000 +0100
+++ new/Test-MockObject-1.20140408/lib/Test/MockObject.pm 2014-04-08
02:38:47.000000000 +0200
@@ -1,8 +1,5 @@
package Test::MockObject;
-{
- $Test::MockObject::VERSION = '1.20120301';
-}
-
+$Test::MockObject::VERSION = '1.20140408';
use strict;
use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-MockObject-1.20120301/t/extends-fields.t
new/Test-MockObject-1.20140408/t/extends-fields.t
--- old/Test-MockObject-1.20120301/t/extends-fields.t 1970-01-01
01:00:00.000000000 +0100
+++ new/Test-MockObject-1.20140408/t/extends-fields.t 2014-04-08
02:38:47.000000000 +0200
@@ -0,0 +1,32 @@
+#!/usr/bin/env perl
+
+use Test::More;
+use Test::Exception;
+use Test::MockObject::Extends;
+
+package MyModule;
+
+use strict;
+use warnings;
+
+use fields qw(field1 field2);
+
+sub new
+{
+ my $self = shift;
+ $self = fields::new($self) unless ref $self;
+ return $self;
+}
+
+package main;
+
+use Test::MockObject::Extends;
+my $fieldy = MyModule->new;
+isa_ok $fieldy, 'MyModule';
+
+my $mocky;
+lives_ok { $mocky = Test::MockObject::Extends->new( $fieldy ) }
+ 'fields-based object should be mockstensible';
+isa_ok $mocky, 'MyModule';
+
+done_testing;