Bugzilla – Attachment 45567 Details for
Bug 14939
OAI Server classes must be modularized
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14939: Remove the Capture::Tiny dependency
Bug-14939-Remove-the-CaptureTiny-dependency.patch (text/plain), 2.23 KB, created by
Jonathan Druart
on 2015-12-10 12:57:59 UTC
(
hide
)
Description:
Bug 14939: Remove the Capture::Tiny dependency
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-12-10 12:57:59 UTC
Size:
2.23 KB
patch
obsolete
>From 0ced78bd9084431d1ceed27b109507b5ae88cf3d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 10 Dec 2015 12:56:44 +0000 >Subject: [PATCH] Bug 14939: Remove the Capture::Tiny dependency > >It's possible to redirect the std output to a variable, it will avoid to >add this new dependency. >--- > C4/Installer/PerlDependencies.pm | 5 ----- > t/db_dependent/OAI/Server.t | 20 +++++++++++++++----- > 2 files changed, 15 insertions(+), 10 deletions(-) > >diff --git a/C4/Installer/PerlDependencies.pm b/C4/Installer/PerlDependencies.pm >index c2ed83a..c1d03c7 100644 >--- a/C4/Installer/PerlDependencies.pm >+++ b/C4/Installer/PerlDependencies.pm >@@ -782,11 +782,6 @@ our $PERL_DEPS = { > 'required' => '1', > 'min_ver' => '1.10', > }, >- 'Capture::Tiny' => { >- 'usage' => 'Core', >- 'required' => '0', >- 'min_ver' => '0.18', >- }, > }; > > 1; >diff --git a/t/db_dependent/OAI/Server.t b/t/db_dependent/OAI/Server.t >index 2147068..2c4abec 100644 >--- a/t/db_dependent/OAI/Server.t >+++ b/t/db_dependent/OAI/Server.t >@@ -25,7 +25,6 @@ use Test::More tests => 13; > use Test::MockModule; > use Test::Warn; > use DateTime; >-use Capture::Tiny ':all'; > use XML::Simple; > use t::lib::Mocks; > >@@ -74,8 +73,14 @@ t::lib::Mocks::mock_preference('OAI-PMH:MaxCount', 3); > t::lib::Mocks::mock_preference('OAI-PMH:DeletedRecord', 'persistent'); > > %param = ( verb => 'ListMetadataFormats' ); >-my ($response) = capture { Koha::OAI::Server::Repository->new(); }; >-$response = XMLin($response); >+my $response; >+{ >+ my $stdout; >+ local *STDOUT; >+ open STDOUT, '>', \$stdout; >+ Koha::OAI::Server::Repository->new(); >+ $response = XMLin($stdout); >+} > my $now = DateTime->now . 'Z'; > my $expected = { > request => 'http://localhost', >@@ -101,8 +106,13 @@ my $expected = { > is_deeply($response, $expected, "ListMetadataFormats"); > > %param = ( verb => 'ListIdentifiers' ); >-($response) = capture { Koha::OAI::Server::Repository->new(); }; >-$response = XMLin($response); >+{ >+ my $stdout; >+ local *STDOUT; >+ open STDOUT, '>', \$stdout; >+ Koha::OAI::Server::Repository->new(); >+ $response = XMLin($stdout); >+} > $now = DateTime->now . 'Z'; > $expected = { > request => 'http://localhost', >-- >2.1.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14939
:
43045
|
43072
|
44355
|
44371
|
44438
|
44866
|
44875
|
44904
|
44913
|
44914
|
44915
|
45320
|
45386
|
45567
|
45577
|
45602
|
45603