lib/sonar.rb
def request scheme, request_method, uri, params, env = {}
    uri = [@__sonar__base_url__, uri].compact.join('/') unless uri =~ /\A\/|\A[\w|\d]+\:\/\//
    uri = ::URI.parse(uri.gsub(/\A\/+/, '/'))
    uri.scheme ||= scheme.to_s
    uri.host ||= ::SonarConstants::DEFAULT_HOST
    uri.path = '/' << uri.path unless uri.path =~ /\A\//
    params.is_a?(Hash) && params.each_pair do |k, v|
      (v.is_a?(Numeric) || v.is_a?(Symbol)) && params.update(k => v.to_s)
    end
    __sonar__session__.invoke_request request_method, uri, params, env
  end
# switch session
#
# sonar using app based sessions, that's it, creates sessions based on app __id__.
# you can test multiple apps and use `app RackApp` to switch between them.
#
switch session
sonar using app based sessions, that's it, creates sessions based on app __id__.
you can test multiple apps and use `app RackApp` to switch between them.
switch session sonar using app based sessions that ' s it creates sessions based on app __id__ . you can test multiple apps and use ` app RackApp ` to switch between them .
def request scheme, request_method, uri, params, env = {}
    uri = [@__sonar__base_url__, uri].compact.join('/') unless uri =~ /\A\/|\A[\w|\d]+\:\/\//
    uri = ::URI.parse(uri.gsub(/\A\/+/, '/'))
    uri.scheme ||= scheme.to_s
    uri.host ||= ::SonarConstants::DEFAULT_HOST
    uri.path = '/' << uri.path unless uri.path =~ /\A\//
    params.is_a?(Hash) && params.each_pair do |k, v|
      (v.is_a?(Numeric) || v.is_a?(Symbol)) && params.update(k => v.to_s)
    end
    __sonar__session__.invoke_request request_method, uri, params, env
  end
def request scheme , request_method , uri , params , env = { } uri = [ @__sonar__base_url__ , uri ] . compact . join ( '/' ) unless uri =~ / \A \/ | \A [ \w | \d ]+ \: \/ \/ / uri = :: URI . parse ( uri . gsub ( / \A \/ + / , '/' ) ) uri . scheme ||= scheme . to_s uri . host ||= :: SonarConstants :: DEFAULT_HOST uri . path = '/' << uri . path unless uri . path =~ / \A \/ / params . is_a? ( Hash ) && params . each_pair do | k , v | ( v . is_a? ( Numeric ) || v . is_a? ( Symbol ) ) && params . update ( k => v . to_s ) end __sonar__session__ . invoke_request request_method , uri , params , env end
switch session
sonar using app based sessions, that's it, creates sessions based on app __id__.
switch session sonar using app based sessions that ' s it creates sessions based on app __id__ .
scheme
request_method
uri
params
env