From b3e694ccc4bc226697afbbdc64e9a543c44c152b Mon Sep 17 00:00:00 2001 From: CEdwardsBlasikiewicz Date: Thu, 12 Dec 2024 09:08:37 +1100 Subject: [PATCH 01/10] added something --- app/services/catalogue_services_client.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/catalogue_services_client.rb b/app/services/catalogue_services_client.rb index f051b5d2..e1a18276 100644 --- a/app/services/catalogue_services_client.rb +++ b/app/services/catalogue_services_client.rb @@ -25,7 +25,7 @@ class CatalogueServicesClient def get_request_summary(folio_id:) conn = setup_connection - + # This is a change! res = conn.get("/catalogue-services/folio/user/#{folio_id}/myRequests") if res.status == 200 res.body.presence || DEFAULT_REQUEST_SUMMARY From 1171d1b767e86e44cebb1b904586cac278a0c79a Mon Sep 17 00:00:00 2001 From: CEdwardsBlasikiewicz Date: Thu, 12 Dec 2024 09:13:44 +1100 Subject: [PATCH 02/10] added something --- .env.staging | 2 +- .env.test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.staging b/.env.staging index e42ee871..b58b0b33 100644 --- a/.env.staging +++ b/.env.staging @@ -50,7 +50,7 @@ EDS_CACHE_DIR=tmp/cache EBSCO_SEARCH_URL="define EBSCO_SEARCH_URL" FINDING_AIDS_SEARCH_URL="define FINDING_AIDS_SEARCH_URL" -GLOBAL_MESSAGE_URL=https://www.library.gov.au/catalogue-message +GLOBAL_MESSAGE_URL= NATIONAL_LIBRARY_CARD_URL="https://www.library.gov.au/research/join-library" ASK_LIBRARIAN_URL=https://www.library.gov.au/services/ask-librarian diff --git a/.env.test b/.env.test index 9f0f7b7b..9d64bbd5 100644 --- a/.env.test +++ b/.env.test @@ -29,7 +29,7 @@ CATALOGUE_SEARCH_URL=http://test.host/catalog.json FINDING_AIDS_SEARCH_URL=http://test.host/finding-aids/catalog.json EBSCO_SEARCH_URL=https://search.ebscohost.com/login.aspx?authtype=ip,guest&groupid=main&profile=eds&direct=true -GLOBAL_MESSAGE_URL=https://www.library.gov.au/catalogue-message +GLOBAL_MESSAGE_URL= NATIONAL_LIBRARY_CARD_URL="https://www.library.gov.au/research/join-library" ASK_LIBRARIAN_URL=https://www.library.gov.au/services/ask-librarian From be5a2969b2d3fe521d3563d97a166bcc15c9ccd1 Mon Sep 17 00:00:00 2001 From: CEdwardsBlasikiewicz Date: Thu, 12 Dec 2024 09:23:03 +1100 Subject: [PATCH 03/10] test point global message to catalogue --- .env.staging | 2 +- .env.test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.staging b/.env.staging index b58b0b33..95a6db33 100644 --- a/.env.staging +++ b/.env.staging @@ -50,7 +50,7 @@ EDS_CACHE_DIR=tmp/cache EBSCO_SEARCH_URL="define EBSCO_SEARCH_URL" FINDING_AIDS_SEARCH_URL="define FINDING_AIDS_SEARCH_URL" -GLOBAL_MESSAGE_URL= +GLOBAL_MESSAGE_URL=https://catalogue.nla.gov.au/ NATIONAL_LIBRARY_CARD_URL="https://www.library.gov.au/research/join-library" ASK_LIBRARIAN_URL=https://www.library.gov.au/services/ask-librarian diff --git a/.env.test b/.env.test index 9d64bbd5..50d3fe80 100644 --- a/.env.test +++ b/.env.test @@ -29,7 +29,7 @@ CATALOGUE_SEARCH_URL=http://test.host/catalog.json FINDING_AIDS_SEARCH_URL=http://test.host/finding-aids/catalog.json EBSCO_SEARCH_URL=https://search.ebscohost.com/login.aspx?authtype=ip,guest&groupid=main&profile=eds&direct=true -GLOBAL_MESSAGE_URL= +GLOBAL_MESSAGE_URL=https://catalogue.nla.gov.au/ NATIONAL_LIBRARY_CARD_URL="https://www.library.gov.au/research/join-library" ASK_LIBRARIAN_URL=https://www.library.gov.au/services/ask-librarian From c28a3d925bcf3ef0ef6a182e927b53d2792a58fa Mon Sep 17 00:00:00 2001 From: CEdwardsBlasikiewicz Date: Thu, 12 Dec 2024 09:33:15 +1100 Subject: [PATCH 04/10] test point global message to DLC --- .env.staging | 2 +- .env.test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.staging b/.env.staging index 95a6db33..d82a5f97 100644 --- a/.env.staging +++ b/.env.staging @@ -50,7 +50,7 @@ EDS_CACHE_DIR=tmp/cache EBSCO_SEARCH_URL="define EBSCO_SEARCH_URL" FINDING_AIDS_SEARCH_URL="define FINDING_AIDS_SEARCH_URL" -GLOBAL_MESSAGE_URL=https://catalogue.nla.gov.au/ +GLOBAL_MESSAGE_URL=https://dl-devel.nla.gov.au/banjo/jobs/6363 NATIONAL_LIBRARY_CARD_URL="https://www.library.gov.au/research/join-library" ASK_LIBRARIAN_URL=https://www.library.gov.au/services/ask-librarian diff --git a/.env.test b/.env.test index 50d3fe80..b259ae32 100644 --- a/.env.test +++ b/.env.test @@ -29,7 +29,7 @@ CATALOGUE_SEARCH_URL=http://test.host/catalog.json FINDING_AIDS_SEARCH_URL=http://test.host/finding-aids/catalog.json EBSCO_SEARCH_URL=https://search.ebscohost.com/login.aspx?authtype=ip,guest&groupid=main&profile=eds&direct=true -GLOBAL_MESSAGE_URL=https://catalogue.nla.gov.au/ +GLOBAL_MESSAGE_URL=https://dl-devel.nla.gov.au/banjo/jobs/6363 NATIONAL_LIBRARY_CARD_URL="https://www.library.gov.au/research/join-library" ASK_LIBRARIAN_URL=https://www.library.gov.au/services/ask-librarian From b81da8a88aed2bb003df09d61af2d4660de12bee Mon Sep 17 00:00:00 2001 From: CEdwardsBlasikiewicz Date: Thu, 12 Dec 2024 10:03:39 +1100 Subject: [PATCH 05/10] test mock url --- spec/files/global_messages/global_message.json | 6 ++++++ spec/support/webmock.rb | 11 +++++++++++ 2 files changed, 17 insertions(+) create mode 100644 spec/files/global_messages/global_message.json diff --git a/spec/files/global_messages/global_message.json b/spec/files/global_messages/global_message.json new file mode 100644 index 00000000..1d55a3ff --- /dev/null +++ b/spec/files/global_messages/global_message.json @@ -0,0 +1,6 @@ +[ + { + "Title": "\u003Ca href=\"/node/1607\" hreflang=\"en\"\u003ECatalogue Message\u003C/a\u003E", + "body": "\u003Cp\u003EThe Library's summer opening hours are in place from Monday 23 December 2024 until Wednesday 1 January 2025 (inclusive). Before planning your visit, check our \u003Ca href=\"https://www.library.gov.au/visit/opening-hours\"\u003Eopening hours\u003C/a\u003E and \u003Ca href=\"https://www.library.gov.au/research/access-collection/temporary-changes-collection-access\"\u003Etemporary changes to collection access\u003C/a\u003E.\u003C/p\u003E" + } +] \ No newline at end of file diff --git a/spec/support/webmock.rb b/spec/support/webmock.rb index 4d55c829..6acdf957 100644 --- a/spec/support/webmock.rb +++ b/spec/support/webmock.rb @@ -279,5 +279,16 @@ } ) .to_return(status: 200, body: email_2fa, headers: {}) + + global_message = IO.read("spec/files/global_message.json") + + WebMock.stub_request(:get, "https://www.library.gov.au/catalogue-message") + .with( + headers: { + "Accept" => "application/json", + "Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + } + ) + .to_return(status: 200, body: global_message, headers: {}) end end From bf6ec59313241316877da965473161127ddb2e6f Mon Sep 17 00:00:00 2001 From: CEdwardsBlasikiewicz Date: Thu, 12 Dec 2024 10:04:43 +1100 Subject: [PATCH 06/10] change env urls back to library --- .env.staging | 2 +- .env.test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.staging b/.env.staging index d82a5f97..e42ee871 100644 --- a/.env.staging +++ b/.env.staging @@ -50,7 +50,7 @@ EDS_CACHE_DIR=tmp/cache EBSCO_SEARCH_URL="define EBSCO_SEARCH_URL" FINDING_AIDS_SEARCH_URL="define FINDING_AIDS_SEARCH_URL" -GLOBAL_MESSAGE_URL=https://dl-devel.nla.gov.au/banjo/jobs/6363 +GLOBAL_MESSAGE_URL=https://www.library.gov.au/catalogue-message NATIONAL_LIBRARY_CARD_URL="https://www.library.gov.au/research/join-library" ASK_LIBRARIAN_URL=https://www.library.gov.au/services/ask-librarian diff --git a/.env.test b/.env.test index b259ae32..9f0f7b7b 100644 --- a/.env.test +++ b/.env.test @@ -29,7 +29,7 @@ CATALOGUE_SEARCH_URL=http://test.host/catalog.json FINDING_AIDS_SEARCH_URL=http://test.host/finding-aids/catalog.json EBSCO_SEARCH_URL=https://search.ebscohost.com/login.aspx?authtype=ip,guest&groupid=main&profile=eds&direct=true -GLOBAL_MESSAGE_URL=https://dl-devel.nla.gov.au/banjo/jobs/6363 +GLOBAL_MESSAGE_URL=https://www.library.gov.au/catalogue-message NATIONAL_LIBRARY_CARD_URL="https://www.library.gov.au/research/join-library" ASK_LIBRARIAN_URL=https://www.library.gov.au/services/ask-librarian From 582f76a1eddf8a598bfaca3114ad8a1bb6603c52 Mon Sep 17 00:00:00 2001 From: CEdwardsBlasikiewicz Date: Thu, 12 Dec 2024 10:24:35 +1100 Subject: [PATCH 07/10] change env urls back to library --- spec/support/webmock.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/spec/support/webmock.rb b/spec/support/webmock.rb index 6acdf957..3219c99d 100644 --- a/spec/support/webmock.rb +++ b/spec/support/webmock.rb @@ -282,13 +282,13 @@ global_message = IO.read("spec/files/global_message.json") - WebMock.stub_request(:get, "https://www.library.gov.au/catalogue-message") - .with( - headers: { - "Accept" => "application/json", - "Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" - } - ) - .to_return(status: 200, body: global_message, headers: {}) + # WebMock.stub_request(:get, "https://www.library.gov.au/catalogue-message") + # .with( + # headers: { + # "Accept" => "application/json", + # "Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + # } + # ) + # .to_return(status: 200, body: global_message, headers: {}) end end From 7296814169a6e72b7c16eee0e3abebb09cb7b348 Mon Sep 17 00:00:00 2001 From: CEdwardsBlasikiewicz Date: Thu, 12 Dec 2024 10:26:57 +1100 Subject: [PATCH 08/10] change env urls back to library --- spec/support/webmock.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/support/webmock.rb b/spec/support/webmock.rb index 3219c99d..c900a85c 100644 --- a/spec/support/webmock.rb +++ b/spec/support/webmock.rb @@ -280,7 +280,7 @@ ) .to_return(status: 200, body: email_2fa, headers: {}) - global_message = IO.read("spec/files/global_message.json") + # global_message = IO.read("spec/files/global_message.json") # WebMock.stub_request(:get, "https://www.library.gov.au/catalogue-message") # .with( From 0b0ab729c6b0711d0f38df4a4a4f6fbbcde5e4d3 Mon Sep 17 00:00:00 2001 From: CEdwardsBlasikiewicz Date: Thu, 12 Dec 2024 10:33:54 +1100 Subject: [PATCH 09/10] change env urls back to library --- .env.development | 2 +- .env.staging | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.development b/.env.development index 0b8d8643..1b20e32e 100644 --- a/.env.development +++ b/.env.development @@ -53,7 +53,7 @@ EDS_CACHE_DIR=tmp/cache EBSCO_SEARCH_URL="define EBSCO_SEARCH_URL" FINDING_AIDS_SEARCH_URL="define FINDING_AIDS_SEARCH_URL" -GLOBAL_MESSAGE_URL=https://www.library.gov.au/catalogue-message +GLOBAL_MESSAGE_URL="define FINDING_AIDS_SEARCH_URL" NATIONAL_LIBRARY_CARD_URL="https://www.library.gov.au/research/join-library" ASK_LIBRARIAN_URL=https://www.library.gov.au/services/ask-librarian diff --git a/.env.staging b/.env.staging index e42ee871..a24d22e0 100644 --- a/.env.staging +++ b/.env.staging @@ -50,7 +50,7 @@ EDS_CACHE_DIR=tmp/cache EBSCO_SEARCH_URL="define EBSCO_SEARCH_URL" FINDING_AIDS_SEARCH_URL="define FINDING_AIDS_SEARCH_URL" -GLOBAL_MESSAGE_URL=https://www.library.gov.au/catalogue-message +GLOBAL_MESSAGE_URL="define FINDING_AIDS_SEARCH_URL" NATIONAL_LIBRARY_CARD_URL="https://www.library.gov.au/research/join-library" ASK_LIBRARIAN_URL=https://www.library.gov.au/services/ask-librarian From aafab841fd22fa6c808471ae1267fddbb2cd5638 Mon Sep 17 00:00:00 2001 From: CEdwardsBlasikiewicz Date: Thu, 12 Dec 2024 10:37:01 +1100 Subject: [PATCH 10/10] change env urls back to library --- .env.development | 2 +- .env.staging | 2 +- .env.test | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.env.development b/.env.development index 1b20e32e..480c21f3 100644 --- a/.env.development +++ b/.env.development @@ -53,7 +53,7 @@ EDS_CACHE_DIR=tmp/cache EBSCO_SEARCH_URL="define EBSCO_SEARCH_URL" FINDING_AIDS_SEARCH_URL="define FINDING_AIDS_SEARCH_URL" -GLOBAL_MESSAGE_URL="define FINDING_AIDS_SEARCH_URL" +GLOBAL_MESSAGE_URL="define GLOBAL_MESSAGE_URL" NATIONAL_LIBRARY_CARD_URL="https://www.library.gov.au/research/join-library" ASK_LIBRARIAN_URL=https://www.library.gov.au/services/ask-librarian diff --git a/.env.staging b/.env.staging index a24d22e0..84d50506 100644 --- a/.env.staging +++ b/.env.staging @@ -50,7 +50,7 @@ EDS_CACHE_DIR=tmp/cache EBSCO_SEARCH_URL="define EBSCO_SEARCH_URL" FINDING_AIDS_SEARCH_URL="define FINDING_AIDS_SEARCH_URL" -GLOBAL_MESSAGE_URL="define FINDING_AIDS_SEARCH_URL" +GLOBAL_MESSAGE_URL="define GLOBAL_MESSAGE_URL" NATIONAL_LIBRARY_CARD_URL="https://www.library.gov.au/research/join-library" ASK_LIBRARIAN_URL=https://www.library.gov.au/services/ask-librarian diff --git a/.env.test b/.env.test index 9f0f7b7b..79eeb70f 100644 --- a/.env.test +++ b/.env.test @@ -29,8 +29,7 @@ CATALOGUE_SEARCH_URL=http://test.host/catalog.json FINDING_AIDS_SEARCH_URL=http://test.host/finding-aids/catalog.json EBSCO_SEARCH_URL=https://search.ebscohost.com/login.aspx?authtype=ip,guest&groupid=main&profile=eds&direct=true -GLOBAL_MESSAGE_URL=https://www.library.gov.au/catalogue-message - +GLOBAL_MESSAGE_URL="define GLOBAL_MESSAGE_URL" NATIONAL_LIBRARY_CARD_URL="https://www.library.gov.au/research/join-library" ASK_LIBRARIAN_URL=https://www.library.gov.au/services/ask-librarian