class TCellAgent::Tests::TCellContextBuilder

Public Class Methods

new() click to toggle source
# File spec/support/builders.rb, line 40
def initialize
  @tcell_context = TCellAgent::Instrumentation::TCellData.new
  @tcell_context.session_id = 'session-id'
  @tcell_context.user_id = 'user-id'
  @tcell_context.user_agent = 'user-agent'
  @tcell_context.remote_address = '127.0.0.1'
  @tcell_context.transaction_id = nil
  @tcell_context.route_id = 'route-id'
  @tcell_context.path = '/some/path'
  @tcell_context.fullpath = '/some/path?hide-my-value=sensitive'
  @tcell_context.uri = 'http://domain.com/some/path?hide-my-value=sensitive'
  @tcell_context.patches_blocking_triggered = false
  @tcell_context.request_method = 'GET'
  @tcell_context.referrer = 'http://domain.com/home?_utm=some-value'
end

Public Instance Methods

build() click to toggle source
# File spec/support/builders.rb, line 62
def build
  @tcell_context
end
update_attribute(attribute, setting) click to toggle source
# File spec/support/builders.rb, line 56
def update_attribute(attribute, setting)
  @tcell_context.send("#{attribute}=", setting)

  self
end