Blacklight Plugin

Fall back on net_http when curb gem is not present

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 2.4
  • Component/s: None
  • Description:
    Hide
    Blacklight is currently not falling back properly on net_http when curb is not present. If the curb gem is not installed then Blacklight fails to start. Even though the code called within a begin block with a rescue block, it still fails to start with script/server.

    In vendor/plugins/blacklight/lib/blacklight.rb I monkey patched the following code to work around this:

    begin
          #require 'curb'
          #Blacklight.solr.adapter.connector.adapter_name = :curb
          Blacklight.solr.adapter.connector.adapter_name = :net_http
    rescue
          # sticking with Net::HTTP
    end
    Show
    Blacklight is currently not falling back properly on net_http when curb is not present. If the curb gem is not installed then Blacklight fails to start. Even though the code called within a begin block with a rescue block, it still fails to start with script/server. In vendor/plugins/blacklight/lib/blacklight.rb I monkey patched the following code to work around this: begin       #require 'curb'       #Blacklight.solr.adapter.connector.adapter_name = :curb       Blacklight.solr.adapter.connector.adapter_name = :net_http rescue       # sticking with Net::HTTP end

Activity

Hide
Naomi Dushay added a comment - 25/Sep/09 12:34 PM
Is this done already?
Show
Naomi Dushay added a comment - 25/Sep/09 12:34 PM Is this done already?
Hide
Matt Mitchell added a comment - 01/Oct/09 4:30 PM
Curb is used now ONLY if it's installed. Otherwise net::http is used. No errors are thrown and curb is no longer dependency.
Show
Matt Mitchell added a comment - 01/Oct/09 4:30 PM Curb is used now ONLY if it's installed. Otherwise net::http is used. No errors are thrown and curb is no longer dependency.

People

Dates

  • Created:
    01/Jun/09 4:09 PM
    Updated:
    01/Oct/09 4:31 PM
    Resolved:
    01/Oct/09 4:31 PM