Skip to content

Commit

Permalink
fix: Use URI.open to fix Kernel#open deprecation warning
Browse files Browse the repository at this point in the history
Fixes deprecation warning message:
"/home/runner/work/rigse/rigse/rails/spec/support/solr_spec_helper.rb:23:
warning: calling URI.open via Kernel#open is deprecated, call URI.open
directly or use URI#open"

See: https://github.com/concord-consortium/rigse/actions/runs/5728882369/job/15530837575#step:17:9
  • Loading branch information
433eros committed Aug 28, 2023
1 parent 9c40a35 commit 67ac535
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rails/spec/support/solr_spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require 'open-uri'

$original_sunspot_session = Sunspot.session
Sunspot.session = Sunspot::Rails::StubSessionProxy.new($original_sunspot_session)

Expand All @@ -20,7 +22,7 @@ def reindex_all
end

def test_solr_server
open("http://#{SOLR_HOST}:#{SOLR_PORT}/")
URI.open("http://#{SOLR_HOST}:#{SOLR_PORT}/")
end

def solr_setup
Expand Down

0 comments on commit 67ac535

Please sign in to comment.