Bugzilla – Attachment 45577 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.33 KB, created by
Frédéric Demians
on 2015-12-10 14:48:43 UTC
(
hide
)
Description:
Bug 14939: Remove the Capture::Tiny dependency
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2015-12-10 14:48:43 UTC
Size:
2.33 KB
patch
obsolete
>From 092a56fa4f08130067307e99edd5d050bf165959 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 >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >It's possible to redirect the std output to a variable, it will avoid to >add this new dependency. > >Signed-off-by: Frédéric Demians <f.demians@tamil.fr> > OK. + code factorisation with a function call. >--- > C4/Installer/PerlDependencies.pm | 5 ----- > t/db_dependent/OAI/Server.t | 15 ++++++++++----- > 2 files changed, 10 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..4e2d626 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,15 @@ 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 $get_response = sub { >+ my $stdout; >+ local *STDOUT; >+ open STDOUT, '>', \$stdout; >+ Koha::OAI::Server::Repository->new(); >+ $response = XMLin($stdout); >+}; >+$get_response->(); > my $now = DateTime->now . 'Z'; > my $expected = { > request => 'http://localhost', >@@ -101,8 +107,7 @@ my $expected = { > is_deeply($response, $expected, "ListMetadataFormats"); > > %param = ( verb => 'ListIdentifiers' ); >-($response) = capture { Koha::OAI::Server::Repository->new(); }; >-$response = XMLin($response); >+$get_response->(); > $now = DateTime->now . 'Z'; > $expected = { > request => 'http://localhost', >-- >2.6.2
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