class Firebug::Configuration

A configuration object.

@attr [String] key

The encryption key used to encrypt and decrypt cookies.

@attr [String] table_name

The name of the sessions table.

@attr [Boolean] truncate_user_agent

Truncate the user-agent to 120 characters.

@attr [Proc] match_user_agent

Use the user-agent in addition to the session ID.

@attr [Proc] match_ip_address

Use the remote ip address in addition to the session ID.

@attr [Boolean] silence_logger

Silence ActiveRecord logs.

@attr [Proc] session_filter

Return true if this request should have it's session written.
@see ActionDispatch::Session::CodeIgniterStore#commit_session?

Attributes

key[RW]
match_ip_address[R]
match_user_agent[R]
session_filter[RW]
silence_logger[RW]
table_name[R]
truncate_user_agent[RW]

Public Class Methods

new() click to toggle source
# File lib/firebug/configuration.rb, line 31
def initialize
  self.truncate_user_agent = false
  self.match_user_agent = false
  self.match_ip_address = false
  self.silence_logger = true
  # default to always writing the session
  self.session_filter = ->(_) { true }
end

Public Instance Methods

match_ip_address=(value) click to toggle source

@param [Proc,Boolean] value

# File lib/firebug/configuration.rb, line 46
def match_ip_address=(value)
  @match_ip_address = value.respond_to?(:call) ? value : ->(_) { value }
end
match_user_agent=(value) click to toggle source

@param [Proc,Boolean] value

# File lib/firebug/configuration.rb, line 41
def match_user_agent=(value)
  @match_user_agent = value.respond_to?(:call) ? value : ->(_) { value }
end
table_name=(value) click to toggle source

Sets the table name for (see Firebug::Session)

@param [String] value

# File lib/firebug/configuration.rb, line 53
def table_name=(value)
  Firebug::Session.table_name = value
  @table_name = value
end