Class: MailerLog::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/mailer_log/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize ⇒ Configuration

Returns a new instance of Configuration.



18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/mailer_log/configuration.rb', line 18

def initialize
  @retention_period = 1.year
  @webhook_signing_key = nil
  @mailgun_api_key = nil
  @capture_call_stack = true
  @call_stack_depth = 20
  @per_page = 25
  @header_partial = nil # e.g., 'shared/admin_navbar'
  @spa_layout = nil # e.g., 'application' — when set, SPA renders inside host app layout
  @show_delivery_events = nil # nil = auto (true if webhook_signing_key present)
  @github_repo = nil # e.g., 'trafficrunners/gmbmanager' for GitHub links in call stack
  @authenticate_with_proc = nil
  @resolve_accountable_proc = nil
end

Instance Attribute Details

#authenticate_with_proc ⇒ Object (readonly)

Returns the value of attribute authenticate_with_proc.



16
17
18
# File 'lib/mailer_log/configuration.rb', line 16

def authenticate_with_proc
  @authenticate_with_proc
end

#call_stack_depth ⇒ Object

Returns the value of attribute call_stack_depth.



5
6
7
# File 'lib/mailer_log/configuration.rb', line 5

def call_stack_depth
  @call_stack_depth
end

#capture_call_stack ⇒ Object

Returns the value of attribute capture_call_stack.



5
6
7
# File 'lib/mailer_log/configuration.rb', line 5

def capture_call_stack
  @capture_call_stack
end

#github_repo ⇒ Object

Returns the value of attribute github_repo.



5
6
7
# File 'lib/mailer_log/configuration.rb', line 5

def github_repo
  @github_repo
end

#header_partial ⇒ Object

Returns the value of attribute header_partial.



5
6
7
# File 'lib/mailer_log/configuration.rb', line 5

def header_partial
  @header_partial
end

#mailgun_api_key ⇒ Object

Returns the value of attribute mailgun_api_key.



5
6
7
# File 'lib/mailer_log/configuration.rb', line 5

def mailgun_api_key
  @mailgun_api_key
end

#per_page ⇒ Object

Returns the value of attribute per_page.



5
6
7
# File 'lib/mailer_log/configuration.rb', line 5

def per_page
  @per_page
end

#resolve_accountable_proc ⇒ Object (readonly)

Returns the value of attribute resolve_accountable_proc.



16
17
18
# File 'lib/mailer_log/configuration.rb', line 16

def resolve_accountable_proc
  @resolve_accountable_proc
end

#retention_period ⇒ Object

Returns the value of attribute retention_period.



5
6
7
# File 'lib/mailer_log/configuration.rb', line 5

def retention_period
  @retention_period
end

#show_delivery_events ⇒ Object

Returns the value of attribute show_delivery_events.



5
6
7
# File 'lib/mailer_log/configuration.rb', line 5

def show_delivery_events
  @show_delivery_events
end

#spa_layout ⇒ Object

Returns the value of attribute spa_layout.



5
6
7
# File 'lib/mailer_log/configuration.rb', line 5

def spa_layout
  @spa_layout
end

#webhook_signing_key ⇒ Object

Returns the value of attribute webhook_signing_key.



5
6
7
# File 'lib/mailer_log/configuration.rb', line 5

def webhook_signing_key
  @webhook_signing_key
end

Instance Method Details

#authenticate_with(&block) ⇒ Object



33
34
35
# File 'lib/mailer_log/configuration.rb', line 33

def authenticate_with(&block)
  @authenticate_with_proc = block
end

#resolve_accountable(&block) ⇒ Object



37
38
39
# File 'lib/mailer_log/configuration.rb', line 37

def resolve_accountable(&block)
  @resolve_accountable_proc = block
end

#show_delivery_events? ⇒ Boolean

Returns:

  • (Boolean)


41
42
43
44
45
# File 'lib/mailer_log/configuration.rb', line 41

def show_delivery_events?
  return @show_delivery_events unless @show_delivery_events.nil?

  @webhook_signing_key.present?
end