Method: Brine::Requesting#brine_root_url

Defined in:
lib/brine/requesting.rb

#brine_root_urlString

Retrieve the root url to which Brine will send requests.

This will normally be the value of ENV, and that value should be directly usable after older ENV is end-of-lifed (at which point this can be removed).

Returns:

  • (String)

    Return the root URL to use or nil if none is provided.



25
26
27
28
29
30
31
32
33
34
# File 'lib/brine/requesting.rb', line 25

def brine_root_url
  if @brine_root_url
    @brine_root_url
  elsif ENV['BRINE_ROOT_URL']
    ENV['BRINE_ROOT_URL']
  elsif ENV['ROOT_URL']
    deprecation_message('1.0', 'ROOT_URL is deprecated, replace with BRINE_ROOT_URL') if ENV['ROOT_URL']
    ENV['ROOT_URL']
  end
end