Bugzilla – Attachment 160422 Details for
Bug 35581
ILL Koha classes are not consistent
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35581: Illbackend.pm -> ILL/Backend.pm
Bug-35581-Illbackendpm---ILLBackendpm.patch (text/plain), 4.77 KB, created by
David Nind
on 2024-01-02 19:10:34 UTC
(
hide
)
Description:
Bug 35581: Illbackend.pm -> ILL/Backend.pm
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-01-02 19:10:34 UTC
Size:
4.77 KB
patch
obsolete
>From d9f338cdb5c15d7c7d3812f0bd1b5a5b15c8ca83 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Thu, 14 Dec 2023 14:16:01 +0000 >Subject: [PATCH] Bug 35581: Illbackend.pm -> ILL/Backend.pm > >Signed-off-by: David Nind <david@davidnind.com> >--- > Koha/{Illbackend.pm => ILL/Backend.pm} | 8 ++++---- > Koha/REST/V1/{Illbackends.pm => ILL/Backends.pm} | 12 ++++++------ > api/v1/swagger/paths/ill_backends.yaml | 8 ++++---- > t/db_dependent/Koha/{Illbackend.t => ILL/Backend.t} | 6 +++--- > 4 files changed, 17 insertions(+), 17 deletions(-) > rename Koha/{Illbackend.pm => ILL/Backend.pm} (96%) > rename Koha/REST/V1/{Illbackends.pm => ILL/Backends.pm} (89%) > rename t/db_dependent/Koha/{Illbackend.t => ILL/Backend.t} (97%) > >diff --git a/Koha/Illbackend.pm b/Koha/ILL/Backend.pm >similarity index 96% >rename from Koha/Illbackend.pm >rename to Koha/ILL/Backend.pm >index ab31d05495..de6746af99 100644 >--- a/Koha/Illbackend.pm >+++ b/Koha/ILL/Backend.pm >@@ -1,4 +1,4 @@ >-package Koha::Illbackend; >+package Koha::ILL::Backend; > > # Copyright PTFS Europe 2023 > # >@@ -23,13 +23,13 @@ use base qw(Koha::Object); > > =head1 NAME > >-Koha::Illbackend - Koha Illbackend Object class >+Koha::ILL::Backend - Koha Illbackend Object class > > =head2 Class methods > > =head3 new > >-New illbackend >+New ILL Backend > > =cut > >@@ -127,7 +127,7 @@ sub embed { > > =head3 _type > >- my $type = Koha::Illbackend->_type; >+ my $type = Koha::ILL::Backend->_type; > > Return this object's type > >diff --git a/Koha/REST/V1/Illbackends.pm b/Koha/REST/V1/ILL/Backends.pm >similarity index 89% >rename from Koha/REST/V1/Illbackends.pm >rename to Koha/REST/V1/ILL/Backends.pm >index 8b70d9368e..302e0c8edb 100644 >--- a/Koha/REST/V1/Illbackends.pm >+++ b/Koha/REST/V1/ILL/Backends.pm >@@ -1,4 +1,4 @@ >-package Koha::REST::V1::Illbackends; >+package Koha::REST::V1::ILL::Backends; > > # This file is part of Koha. > # >@@ -21,11 +21,11 @@ use Mojo::Base 'Mojolicious::Controller'; > > use Koha::Illrequest::Config; > use Koha::Illrequests; >-use Koha::Illbackend; >+use Koha::ILL::Backend; > > =head1 NAME > >-Koha::REST::V1::Illbackends >+Koha::REST::V1::ILL::Backends > > =head2 Operations > >@@ -66,18 +66,18 @@ sub get { > > return try { > >- #FIXME: Should we move load_backend into Koha::Illbackend... >+ #FIXME: Should we move load_backend into Koha::ILL::Backend... > # or maybe make Koha::Ill::Backend a base class for all > # backends? > my $backend = Koha::Illrequest->new->load_backend($backend_id); > >- my $backend_module = Koha::Illbackend->new; >+ my $backend_module = Koha::ILL::Backend->new; > > my $embed = > $backend_module->embed( $backend_id, > $c->req->headers->header('x-koha-embed') ); > >- #TODO: We need a to_api method in Koha::Illbackend >+ #TODO: We need a to_api method in Koha::ILL::Backend > my $return = { > ill_backend_id => $backend_id, > capabilities => $backend->capabilities, >diff --git a/api/v1/swagger/paths/ill_backends.yaml b/api/v1/swagger/paths/ill_backends.yaml >index 874481a5ec..cc5f2247a8 100644 >--- a/api/v1/swagger/paths/ill_backends.yaml >+++ b/api/v1/swagger/paths/ill_backends.yaml >@@ -1,8 +1,8 @@ > --- > /ill/backends: > get: >- x-mojo-to: Illbackends#list >- operationId: listIllbackends >+ x-mojo-to: ILL::Backends#list >+ operationId: listIllBackends > tags: > - ill_backends > summary: List ILL backends >@@ -42,8 +42,8 @@ > ill: "1" > "/ill/backends/{ill_backend_id}": > get: >- x-mojo-to: Illbackends#get >- operationId: getIllbackends >+ x-mojo-to: ILL::Backends#get >+ operationId: getIllBackends > tags: > - ill_backends > summary: Get ILL backend >diff --git a/t/db_dependent/Koha/Illbackend.t b/t/db_dependent/Koha/ILL/Backend.t >similarity index 97% >rename from t/db_dependent/Koha/Illbackend.t >rename to t/db_dependent/Koha/ILL/Backend.t >index 79d9477b3a..aef6b0c310 100755 >--- a/t/db_dependent/Koha/Illbackend.t >+++ b/t/db_dependent/Koha/ILL/Backend.t >@@ -21,7 +21,7 @@ use Modern::Perl; > > use Test::More tests => 1; > >-use Koha::Illbackend; >+use Koha::ILL::Backend; > > use t::lib::TestBuilder; > use t::lib::Mocks; >@@ -36,7 +36,7 @@ subtest 'existing_statuses() tests' => sub { > $schema->storage->txn_begin; > Koha::Illrequests->search->delete; > >- # Mock ILLBackend (as object) >+ # Mock external ILLBackend (as object) > my $backend = Test::MockObject->new; > $backend->set_isa('Koha::Illbackends::Mock'); > $backend->set_always( 'name', 'Mock' ); >@@ -133,7 +133,7 @@ subtest 'existing_statuses() tests' => sub { > } > ); > >- my $backend_module = Koha::Illbackend->new; >+ my $backend_module = Koha::ILL::Backend->new; > > my $existing_statuses = $backend_module->existing_statuses('Mock'); > >-- >2.30.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 35581
:
159863
|
159864
|
159865
|
159866
|
159867
|
159868
|
159869
|
159870
|
159871
|
159872
|
159873
|
160422
|
160423
|
160424
|
160425
|
160426
|
160427
|
160428
|
160429
|
160430
|
160431
|
160432
|
160620
|
160622
|
162020
|
162021
|
162022
|
162023
|
162024
|
162025
|
162026
|
162027
|
162028
|
162029
|
162030
|
162031
|
162032
|
162817
|
162818
|
162819
|
162820
|
162821
|
162822
|
162823
|
162824
|
162825
|
162826
|
162827
|
162828
|
162829
|
162880
|
162881
|
162882
|
162883
|
162884
|
162885
|
162886
|
162887
|
162888
|
162889
|
162890
|
162891
|
162892
|
163803
|
163804
|
163805
|
163806
|
163807
|
163808
|
163809
|
163810
|
163811
|
163812
|
163813
|
163814
|
163815
|
163816
|
164069
|
164070
|
164071
|
164072
|
164073
|
164074
|
164075
|
164076
|
164077
|
164078
|
164079
|
164080
|
164081
|
164082
|
165448