@ -1,34 +1,43 @@
Name: perl-Test-Perl-Critic
Summary: Use Perl::Critic in test programs
Version: 1.02
Release: 14 %{?dist}
Version: 1.03
Release: 1%{?dist}
Group: Development/Libraries
License: GPL+ or Artistic
URL: http://search.cpan.org/dist/Test-Perl-Critic/
Source0: http://search.cpan.org/CPAN/authors/id/T/TH/THALJEF/Test-Perl-Critic-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildArch: noarch
# Module Build
BuildRequires: perl
BuildRequires: perl(Module::Build)
# Module Runtime
BuildRequires: perl(Carp)
BuildRequires: perl(English)
BuildRequires: perl(Module::Build) >= 0.35
BuildRequires: perl(MCE::Grep)
BuildRequires: perl(Perl::Critic) >= 1.105
BuildRequires: perl(Perl::Critic::Utils) >= 1.105
BuildRequires: perl(Perl::Critic::Violation) >= 1.105
BuildRequires: perl(Test::Builder)
BuildRequires: perl(strict)
BuildRequires: perl(Test::Builder) >= 0.88
BuildRequires: perl(warnings)
# Test Suite
BuildRequires: perl(Test::More)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Pod::Coverage)
# Runtime
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires: perl(Perl::Critic) >= 1.105
Requires: perl(Perl::Critic::Utils) >= 1.105
Requires: perl(Perl::Critic::Violation) >= 1.105
Requires: perl(Test::Builder) >= 0.88
# Avoid doc-file dependencies from tests
%{?perl_default_filter}
# Obsolete/provide old -tests subpackage (can be removed in F19 development cycle)
Obsoletes: %{name}-tests < %{version}-%{release}
Provides: %{name}-tests = %{version}-%{release}
# Remove underspecified dependencies
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Perl::Critic\\)$
%global __requires_exclude %{__requires_exclude}|^perl\\(Perl::Critic::Utils\\)$
%global __requires_exclude %{__requires_exclude}|^perl\\(Perl::Critic::Violation\\)$
%global __requires_exclude %{__requires_exclude}|^perl\\(Test::Builder\\)$
%description
Test::Perl::Critic wraps the Perl::Critic engine in a convenient
@ -41,26 +50,43 @@ flexibility), see the criticism pragma.
%setup -q -n Test-Perl-Critic-%{version}
%build
perl Build.PL installdirs=vendor
perl Build.PL -- installdirs=vendor
./Build
%install
rm -rf %{buildroot}
./Build install destdir=%{buildroot} create_packlist=0
./Build install --destdir=%{buildroot} --create_packlist=0
%{_fixperms} %{buildroot}
%check
TEST_AUTHOR=1 ./Build test
%clean
rm -rf %{buildroot}
./Build test
%files
%doc Changes LICENSE README %{?perl_default_filter:t/ xt/}
%if 0%{?_licensedir:1}
%license LICENSE
%else
%doc LICENSE
%endif
%doc Changes README t/ xt/
%{perl_vendorlib}/Test/
%{_mandir}/man3/Test::Perl::Critic.3pm*
%{_mandir}/man3/Test::Perl::Critic.3*
%changelog
* Wed Feb 4 2015 Paul Howarth <paul@city-fan.org> - 1.03-1
- Update to 1.03
- all_critic_ok() will now run tests in parallel over multiple cores. So if
you have 8 cores, your Perl::Critic tests could run 8x faster. However,
the actual performance depends on the size and shape of your code base and
your Perl::Critic configuration.
- If you're using the critic_ok() function directly (perhaps because you want
more control over which files are tested) then you won't see any
performance boost. I recommend gathering your list of files first, and then
passing the list to all_critic_ok().
- The deprecated function all_code_files() has now been removed from
Test::Perl::Critic. Use Perl::Critic::Utils::all_perl_files() instead.
- Classify buildreqs by usage
- Drop obsoletes/provides for old -tests package
- Use %%license where possible
* Fri Aug 29 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1.02-14
- Perl 5.20 rebuild