Class: Specbook::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/specbook/configuration.rb', line 14

def initialize
  @max_runs            = 20
  @trace_viewer_port   = 9322
  @actor_colors        = {}
  @ui_domains          = []
  @setup_overlay_rules = [
    { pattern: /\b(?:logs in|signs in|signed in)\b/i, icon: "🔑", note: "Authentication — switching user session" },
    { pattern: /\bexists?\b/i,                        icon: "🔧", note: "Test setup — creating test data" },
    { pattern: /\bredirected to\b/i,                  icon: "✅", note: "Assertion passed — verified redirect" }
  ]
  @back_link       = nil
  @editor_base     = nil
  @authorize_with  = nil
  @screenshot_root = nil
  @trace_root      = nil
  @feature_root    = nil
end

Instance Attribute Details

#actor_colorsObject

Returns the value of attribute actor_colors.



3
4
5
# File 'lib/specbook/configuration.rb', line 3

def actor_colors
  @actor_colors
end

#authorize_withObject

Returns the value of attribute authorize_with.



3
4
5
# File 'lib/specbook/configuration.rb', line 3

def authorize_with
  @authorize_with
end

Returns the value of attribute back_link.



3
4
5
# File 'lib/specbook/configuration.rb', line 3

def back_link
  @back_link
end

#editor_baseObject

Returns the value of attribute editor_base.



3
4
5
# File 'lib/specbook/configuration.rb', line 3

def editor_base
  @editor_base
end

#feature_rootObject



40
41
42
# File 'lib/specbook/configuration.rb', line 40

def feature_root
  @feature_root || rails_root
end

#max_runsObject

Returns the value of attribute max_runs.



3
4
5
# File 'lib/specbook/configuration.rb', line 3

def max_runs
  @max_runs
end

#screenshot_rootObject



32
33
34
# File 'lib/specbook/configuration.rb', line 32

def screenshot_root
  @screenshot_root || rails_root.join("tmp/spec_screenshots")
end

#setup_overlay_rulesObject

Returns the value of attribute setup_overlay_rules.



3
4
5
# File 'lib/specbook/configuration.rb', line 3

def setup_overlay_rules
  @setup_overlay_rules
end

#trace_rootObject



36
37
38
# File 'lib/specbook/configuration.rb', line 36

def trace_root
  @trace_root || rails_root.join("tmp/spec_traces")
end

#trace_viewer_portObject

Returns the value of attribute trace_viewer_port.



3
4
5
# File 'lib/specbook/configuration.rb', line 3

def trace_viewer_port
  @trace_viewer_port
end

#ui_domainsObject

Returns the value of attribute ui_domains.



3
4
5
# File 'lib/specbook/configuration.rb', line 3

def ui_domains
  @ui_domains
end