Update to 0.110

- New upstream release 0.110
  - Allow methods() and listmethods() to work again on class methods
    (CPAN RT#77804)
- Drop redundant BR: perl(Data::Dumper)
- Drop arrayeach patch - similar change introduced upstream
- Drop %defattr, redundant since rpm 4.4
- Don't need to remove empty directories from the buildroot
- Don't use macros for commands
- Use DESTDIR rather than PERL_INSTALL_ROOT
- Make %files list more explicit
This commit is contained in:
Paul Howarth 2013-02-20 10:53:11 +00:00
parent 8a3d96afc4
commit e561843bd0
4 changed files with 24 additions and 88 deletions

3
.gitignore vendored
View File

@ -1,2 +1 @@
Test-Deep-0.106.tar.gz
/Test-Deep-0.108.tar.gz
/Test-Deep-[0-9.]*.tar.gz

View File

@ -1,68 +0,0 @@
Fix comparison against stuff other than ARRAY references with array_each().
Patch by Tomas Heran <tomas.heran@gooddata.com>,
Test by Lubomir Rintel <lubo.rintel@gooddata.com>
Submitted upstream by mail on 2008-10-22.
diff -up Test-Deep-0.103/lib/Test/Deep/ArrayEach.pm.arrayeach Test-Deep-0.103/lib/Test/Deep/ArrayEach.pm
--- Test-Deep-0.103/lib/Test/Deep/ArrayEach.pm.arrayeach 2005-11-30 15:09:02.000000000 +0100
+++ Test-Deep-0.103/lib/Test/Deep/ArrayEach.pm 2008-10-22 18:40:22.000000000 +0200
@@ -3,7 +3,7 @@ use warnings;
package Test::Deep::ArrayEach;
-use Test::Deep::Cmp;
+use Test::Deep::Ref;
sub init
{
@@ -19,6 +19,8 @@ sub descend
my $self = shift;
my $got = shift;
+ return 0 unless $self->test_reftype($got, "ARRAY");
+
my $exp = [ ($self->{val}) x @$got ];
return Test::Deep::descend($got, $exp);
diff -up Test-Deep-0.103/lib/Test/Deep/ArrayElementsOnly.pm.arrayeach Test-Deep-0.103/lib/Test/Deep/ArrayElementsOnly.pm
--- Test-Deep-0.103/lib/Test/Deep/ArrayElementsOnly.pm.arrayeach 2005-11-30 15:09:21.000000000 +0100
+++ Test-Deep-0.103/lib/Test/Deep/ArrayElementsOnly.pm 2008-10-22 18:40:22.000000000 +0200
@@ -22,6 +22,8 @@ sub descend
my $exp = $self->{val};
my $data = $self->data;
+
+ return 0 unless $self->test_reftype($got, "ARRAY");
for my $i (0..$#{$exp})
{
@@ -41,7 +43,9 @@ sub render_stack
my $self = shift;
my ($var, $data) = @_;
$var .= "->" unless $Test::Deep::Stack->incArrow;
- $var .= "[$data->{index}]";
+ if (exists($data->{index})) {
+ $var .= "[$data->{index}]";
+ }
return $var;
}
diff -up Test-Deep-0.103/t/array_each.t.arrayeach Test-Deep-0.103/t/array_each.t
--- Test-Deep-0.103/t/array_each.t.arrayeach 2005-11-30 15:08:22.000000000 +0100
+++ Test-Deep-0.103/t/array_each.t 2008-10-22 18:40:22.000000000 +0200
@@ -30,4 +30,14 @@ EOM
},
"array_each not eq"
);
+
+ check_test(
+ sub {
+ cmp_deeply({}, array_each( ignore() ));
+ },
+ {
+ actual_ok => 0,
+ },
+ "array_each not ARRAY reference"
+ );
}

View File

@ -1,26 +1,24 @@
Name: perl-Test-Deep
Version: 0.108
Release: 8%{?dist}
Version: 0.110
Release: 1%{?dist}
Summary: Extremely flexible deep comparison
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/Test-Deep/
Source0: http://www.cpan.org/authors/id/R/RJ/RJBS/Test-Deep-%{version}.tar.gz
Patch0: perl-Test-Deep-0.103-arrayeach.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildArch: noarch
BuildRequires: perl(ExtUtils::MakeMaker)
# Run-time
BuildRequires: perl(base)
BuildRequires: perl(Carp)
BuildRequires: perl(Data::Dumper)
BuildRequires: perl(Exporter)
BuildRequires: perl(Scalar::Util) >= 1.09
# Tests
BuildRequires: perl(Test::More)
BuildRequires: perl(Test::NoWarnings) >= 0.02
BuildRequires: perl(Test::Tester) >= 0.04
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
%description
Test::Deep gives you very flexible ways to check that the result you
@ -32,21 +30,16 @@ circular data structures without getting caught in an infinite loop.
%prep
%setup -q -n Test-Deep-%{version}
%patch0 -p1 -b .arrayeach
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
make pure_install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
%{_fixperms} $RPM_BUILD_ROOT/*
%{_fixperms} $RPM_BUILD_ROOT
%check
make test
@ -55,12 +48,24 @@ make test
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc CHANGES README TODO
%{perl_vendorlib}/*
%{_mandir}/man3/*
%{perl_vendorlib}/Test/
%{_mandir}/man3/Test::Deep.3pm*
%{_mandir}/man3/Test::Deep::NoTest.3pm*
%changelog
* Wed Feb 20 2013 Paul Howarth <paul@city-fan.org> - 0.110-1
- Update to 0.110
- Allow methods() and listmethods() to work again on class methods
(CPAN RT#77804)
- Drop redundant BR: perl(Data::Dumper)
- Drop arrayeach patch - similar change introduced upstream
- Drop %%defattr, redundant since rpm 4.4
- Don't need to remove empty directories from the buildroot
- Don't use macros for commands
- Use DESTDIR rather than PERL_INSTALL_ROOT
- Make %%files list more explicit
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.108-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

View File

@ -1 +1 @@
df17efafc31acb927cc1d950115f4178 Test-Deep-0.108.tar.gz
a5daeaaffcd8cf94a12594ff76970045 Test-Deep-0.110.tar.gz