From 67a13c99bd082d3e677d1eff705bc2fdd9a338a2 Mon Sep 17 00:00:00 2001 From: CEdwardsBlasikiewicz Date: Tue, 17 Dec 2024 13:57:05 +1100 Subject: [PATCH 1/8] update text on page --- config/initializers/bento_search.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/initializers/bento_search.rb b/config/initializers/bento_search.rb index b177469cf..c38850b88 100644 --- a/config/initializers/bento_search.rb +++ b/config/initializers/bento_search.rb @@ -3,7 +3,7 @@ conf.user_id = ENV["EDS_USER"] conf.password = ENV["EDS_PASS"] conf.profile = ENV["EDS_PROFILE"] - conf.title = "eResources (Online articles & ebooks)" + conf.title = "eResources (Online articles & chapters)" conf.for_display = {decorator: "EbscoEdsArticleDecorator"} conf.all_results_link = ENV["EDS_ALL_RESULTS_LINK"] end @@ -13,7 +13,7 @@ conf.user_id = ENV["EDS_USER"] conf.password = ENV["EDS_PASS"] conf.profile = ENV["EDS_PROFILE"] - conf.title = "eResources (Online journals)" + conf.title = "eResources (Online publications)" conf.for_display = {decorator: "EbscoEdsArticleDecorator"} conf.all_results_link = ENV["EDS_ALL_RESULTS_LINK"] conf.search_field = "TI" From 6fab0c42fb22f6d91912c65f37be8201533a43c4 Mon Sep 17 00:00:00 2001 From: CEdwardsBlasikiewicz Date: Tue, 17 Dec 2024 14:52:27 +1100 Subject: [PATCH 2/8] add publication url --- app/helpers/single_search_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/single_search_helper.rb b/app/helpers/single_search_helper.rb index 0b0b5efef..e5bf5a961 100644 --- a/app/helpers/single_search_helper.rb +++ b/app/helpers/single_search_helper.rb @@ -37,7 +37,7 @@ def bento_all_results_link(key) ebsco_link elsif key == "ebsco_eds_title" ebsco_link = if bento_query.present? - "#{ENV["EBSCO_SEARCH_URL"]}&custid=#{ENV["EDS_ORG"]}&bquery=TI+#{bento_query}" + "#{ENV["EBSCO_PUB_FINDER_URL"]}&custid=#{ENV["EDS_ORG"]}&bquery=#{bento_query}" else "#{ENV["EBSCO_SEARCH_URL"]}&custid=#{ENV["EDS_ORG"]}" end From b0ca778cbf68d42811872595fb81726ef1ba50b1 Mon Sep 17 00:00:00 2001 From: CEdwardsBlasikiewicz Date: Tue, 17 Dec 2024 15:12:23 +1100 Subject: [PATCH 3/8] add publication url --- app/helpers/single_search_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/single_search_helper.rb b/app/helpers/single_search_helper.rb index e5bf5a961..223821bf1 100644 --- a/app/helpers/single_search_helper.rb +++ b/app/helpers/single_search_helper.rb @@ -39,7 +39,7 @@ def bento_all_results_link(key) ebsco_link = if bento_query.present? "#{ENV["EBSCO_PUB_FINDER_URL"]}&custid=#{ENV["EDS_ORG"]}&bquery=#{bento_query}" else - "#{ENV["EBSCO_SEARCH_URL"]}&custid=#{ENV["EDS_ORG"]}" + "#{ENV["EBSCO_PUB_FINDER_URL"]}&custid=#{ENV["EDS_ORG"]}" end ebsco_link elsif key == "finding_aids" From a9f7bc69bc474288ff182959988857c553a62f5a Mon Sep 17 00:00:00 2001 From: CEdwardsBlasikiewicz Date: Tue, 14 Jan 2025 14:22:13 +1100 Subject: [PATCH 4/8] try to alter journals eresources to new link --- app/helpers/single_search_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/single_search_helper.rb b/app/helpers/single_search_helper.rb index 223821bf1..a5dc5ce99 100644 --- a/app/helpers/single_search_helper.rb +++ b/app/helpers/single_search_helper.rb @@ -37,9 +37,9 @@ def bento_all_results_link(key) ebsco_link elsif key == "ebsco_eds_title" ebsco_link = if bento_query.present? - "#{ENV["EBSCO_PUB_FINDER_URL"]}&custid=#{ENV["EDS_ORG"]}&bquery=#{bento_query}" + "#{ENV["EBSCO_PUB_FINDER_URL"]}?search=#{bento_query}&highlightTag=mark" else - "#{ENV["EBSCO_PUB_FINDER_URL"]}&custid=#{ENV["EDS_ORG"]}" + (ENV["EBSCO_PUB_FINDER_URL"]).to_s end ebsco_link elsif key == "finding_aids" From 3cf66c518e217f32246fea1c78fa7812162c724e Mon Sep 17 00:00:00 2001 From: calumedwardsblasikiewicz Date: Tue, 22 Jul 2025 11:04:07 +1000 Subject: [PATCH 5/8] Update URL formatting. Signed-off-by: calumedwardsblasikiewicz --- app/helpers/single_search_helper.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/helpers/single_search_helper.rb b/app/helpers/single_search_helper.rb index 5acb0da6c..6be9369ad 100644 --- a/app/helpers/single_search_helper.rb +++ b/app/helpers/single_search_helper.rb @@ -30,16 +30,16 @@ def bento_all_results_link(key) bento_query = (params[:q] || params[:query])&.gsub("&", "%26") link = if key.start_with?("ebsco_eds_keyword") ebsco_link = if bento_query.present? - "#{ENV["EBSCO_SEARCH_URL"]}&custid=#{ENV["EDS_ORG"]}&bquery=#{bento_query}" + "#{ENV["EBSCO_SEARCH_URL"]}?q=#{bento_query}&limiters=FT1%3AY&searchMode=all&searchSegment=all-results" else - "#{ENV["EBSCO_SEARCH_URL"]}&custid=#{ENV["EDS_ORG"]}" + "#{ENV["EBSCO_SEARCH_URL"]}" end ebsco_link elsif key == "ebsco_eds_title" ebsco_link = if bento_query.present? - "#{ENV["EBSCO_PUB_FINDER_URL"]}?search=#{bento_query}&highlightTag=mark" + "#{ENV["EBSCO_PUB_FINDER_URL"]}?searchField=titlename&searchtype=contains&highlightTag=mark&search=#{bento_query}" else - (ENV["EBSCO_PUB_FINDER_URL"]).to_s + ENV["EBSCO_PUB_FINDER_URL"].to_s end ebsco_link elsif key == "finding_aids" From 25efbf313754d636c57a547778efb6dbf0d2afc8 Mon Sep 17 00:00:00 2001 From: calumedwardsblasikiewicz Date: Tue, 22 Jul 2025 11:07:41 +1000 Subject: [PATCH 6/8] linting Signed-off-by: calumedwardsblasikiewicz --- app/helpers/single_search_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/single_search_helper.rb b/app/helpers/single_search_helper.rb index 6be9369ad..9008110c6 100644 --- a/app/helpers/single_search_helper.rb +++ b/app/helpers/single_search_helper.rb @@ -32,7 +32,7 @@ def bento_all_results_link(key) ebsco_link = if bento_query.present? "#{ENV["EBSCO_SEARCH_URL"]}?q=#{bento_query}&limiters=FT1%3AY&searchMode=all&searchSegment=all-results" else - "#{ENV["EBSCO_SEARCH_URL"]}" + ENV["EBSCO_SEARCH_URL"].to_s end ebsco_link elsif key == "ebsco_eds_title" From bc09ebea432a2c3d79f1487e30d9289aef68e77a Mon Sep 17 00:00:00 2001 From: calumedwardsblasikiewicz Date: Tue, 22 Jul 2025 12:59:46 +1000 Subject: [PATCH 7/8] fix spec Signed-off-by: calumedwardsblasikiewicz --- spec/helpers/single_search_helper_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/helpers/single_search_helper_spec.rb b/spec/helpers/single_search_helper_spec.rb index 695cc2f56..c582eda64 100644 --- a/spec/helpers/single_search_helper_spec.rb +++ b/spec/helpers/single_search_helper_spec.rb @@ -112,17 +112,17 @@ end it "returns a link to the EDS keyword search results page" do - expect(helper.bento_all_results_link("ebsco_eds_keyword")).to eq("https://search.ebscohost.com/login.aspx?authtype=ip,guest&groupid=main&profile=eds&direct=true&custid=test&bquery=hello") + expect(helper.bento_all_results_link("ebsco_eds_keyword")).to eq("https://research.ebsco.com/c/ciw6tp/search/results?q=hello&limiters=FT1%253AY&searchMode=all&searchSegment=all-results") end it "returns a link to the EDS title search results page" do - expect(helper.bento_all_results_link("ebsco_eds_title")).to eq("https://search.ebscohost.com/login.aspx?authtype=ip,guest&groupid=main&profile=eds&direct=true&custid=test&bquery=TI+hello") + expect(helper.bento_all_results_link("ebsco_eds_title")).to eq("https://publications.ebsco.com/c/elukgh?searchField=titlename&searchtype=contains&highlightTag=mark&search=hello") end end context "when a query is not present" do it "returns a link to the catalogue search results page" do - expect(helper.bento_all_results_link("catalogue")).to eq("http://test.host/catalog?search_field=all_fields&q=") + expect(helper.bento_all_results_link("catalogue")).to eq("http://test.host/catalog?search_field=all_fields&q=") # eq("https://search.ebscohost.com/login.aspx?authtype=ip,guest&groupid=main&profile=eds&direct=true&custid=test?q=hello&limiters=FT1%253AY&searchMode=all&searchSegment=all-results") end it "returns a link to the finding aids search results page" do @@ -130,11 +130,11 @@ end it "returns a link to the EDS keyword search results page" do - expect(helper.bento_all_results_link("ebsco_eds_keyword")).to eq("https://search.ebscohost.com/login.aspx?authtype=ip,guest&groupid=main&profile=eds&direct=true&custid=test") + expect(helper.bento_all_results_link("ebsco_eds_keyword")).to eq("https://research.ebsco.com/c/ciw6tp/search/results") end it "returns a link to the EDS title search results page" do - expect(helper.bento_all_results_link("ebsco_eds_title")).to eq("https://search.ebscohost.com/login.aspx?authtype=ip,guest&groupid=main&profile=eds&direct=true&custid=test") + expect(helper.bento_all_results_link("ebsco_eds_title")).to eq("https://publications.ebsco.com/c/elukgh") end end end From aaf8ec530794994c29a0d4e5e5fe945636509f11 Mon Sep 17 00:00:00 2001 From: Calum Edwards Blasikiewicz <153031672+CEdwardsBlasikiewicz@users.noreply.github.com> Date: Tue, 22 Jul 2025 15:31:18 +1000 Subject: [PATCH 8/8] Update .env.test --- .env.test | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.env.test b/.env.test index 3057cdc0b..fc0d8a4d2 100644 --- a/.env.test +++ b/.env.test @@ -27,7 +27,9 @@ EDS_PASS=test EDS_USE_CACHE=false 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 + +EBSCO_SEARCH_URL=https://research.ebsco.com/c/ciw6tp/search/results +EBSCO_PUB_FINDER_URL=https://publications.ebsco.com/c/elukgh GLOBAL_MESSAGE_URL=http://test.nla.gov.au/catalogue-message/1234