Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove code for connecting to old borrow direct service (replaced by reshare) #1188

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ gem 'warden'

gem 'nokogiri'

gem 'borrow_direct'

gem 'recaptcha'

gem 'global_alerts'
Expand Down
4 changes: 0 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ GEM
bindex (0.8.1)
bootsnap (1.18.4)
msgpack (~> 1.2)
borrow_direct (1.2.0)
httpclient (~> 2.4)
builder (3.3.0)
bundler-audit (0.9.2)
bundler (>= 1.2.0, < 3)
Expand Down Expand Up @@ -206,7 +204,6 @@ GEM
http-cookie (1.0.7)
domain_name (~> 0.5)
http-form_data (2.3.0)
httpclient (2.8.3)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
Expand Down Expand Up @@ -473,7 +470,6 @@ PLATFORMS
DEPENDENCIES
axe-core-rspec
bootsnap (>= 1.1.0)
borrow_direct
capistrano (~> 3.0)
capistrano-passenger
capistrano-rails
Expand Down
72 changes: 0 additions & 72 deletions app/models/borrow_direct_requests.rb

This file was deleted.

9 changes: 3 additions & 6 deletions app/models/folio/patron.rb
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,10 @@ def academic_staff_or_fellow?
end

def borrow_direct_requests
return [] if proxy_borrower? # Proxies can't submit borrow direct requests, so don't check.
# Proxies can't submit borrow direct requests, so don't check.
return [] unless Settings.borrow_direct_reshare.enabled && !proxy_borrower?

if Settings.borrow_direct_reshare.enabled
BorrowDirectReshareRequests.new(university_id).requests
else
BorrowDirectRequests.new(barcode).requests
end
BorrowDirectReshareRequests.new(university_id).requests
end

# this is all requests including self and group/proxy
Expand Down
7 changes: 0 additions & 7 deletions config/initializers/borrow_direct.rb

This file was deleted.

3 changes: 0 additions & 3 deletions config/settings.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
debug: false

borrow_direct:
api_key: ''

folio:
okapi_url: <%= ENV['OKAPI_URL'] %>
online_service_point_id: 7c5abc9f-f3d7-4856-b8d7-6712462ca007
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/requests_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
let(:requests) do
[
instance_double(Folio::Request, key: '1', sort_key: nil),
instance_double(BorrowDirectRequests::Request, key: 'sta-1', sort_key: nil)
instance_double(BorrowDirectReshareRequests::ReshareRequest, key: 'sta-1', sort_key: nil)
]
end

Expand Down
91 changes: 0 additions & 91 deletions spec/models/borrow_direct_requests_spec.rb

This file was deleted.

Loading