Class: Specbook::Configuration
- Inherits:
-
Object
- Object
- Specbook::Configuration
- Defined in:
- lib/specbook/configuration.rb
Instance Attribute Summary collapse
-
#actor_colors ⇒ Object
Returns the value of attribute actor_colors.
-
#authorize_with ⇒ Object
Returns the value of attribute authorize_with.
-
#back_link ⇒ Object
Returns the value of attribute back_link.
-
#editor_base ⇒ Object
Returns the value of attribute editor_base.
- #feature_root ⇒ Object
-
#max_runs ⇒ Object
Returns the value of attribute max_runs.
- #screenshot_root ⇒ Object
-
#setup_overlay_rules ⇒ Object
Returns the value of attribute setup_overlay_rules.
- #trace_root ⇒ Object
-
#trace_viewer_port ⇒ Object
Returns the value of attribute trace_viewer_port.
-
#ui_domains ⇒ Object
Returns the value of attribute ui_domains.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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_colors ⇒ Object
Returns the value of attribute actor_colors.
3 4 5 |
# File 'lib/specbook/configuration.rb', line 3 def actor_colors @actor_colors end |
#authorize_with ⇒ Object
Returns the value of attribute authorize_with.
3 4 5 |
# File 'lib/specbook/configuration.rb', line 3 def @authorize_with end |
#back_link ⇒ Object
Returns the value of attribute back_link.
3 4 5 |
# File 'lib/specbook/configuration.rb', line 3 def back_link @back_link end |
#editor_base ⇒ Object
Returns the value of attribute editor_base.
3 4 5 |
# File 'lib/specbook/configuration.rb', line 3 def editor_base @editor_base end |
#feature_root ⇒ Object
40 41 42 |
# File 'lib/specbook/configuration.rb', line 40 def feature_root @feature_root || rails_root end |
#max_runs ⇒ Object
Returns the value of attribute max_runs.
3 4 5 |
# File 'lib/specbook/configuration.rb', line 3 def max_runs @max_runs end |
#screenshot_root ⇒ Object
32 33 34 |
# File 'lib/specbook/configuration.rb', line 32 def screenshot_root @screenshot_root || rails_root.join("tmp/spec_screenshots") end |
#setup_overlay_rules ⇒ Object
Returns the value of attribute setup_overlay_rules.
3 4 5 |
# File 'lib/specbook/configuration.rb', line 3 def @setup_overlay_rules end |
#trace_root ⇒ Object
36 37 38 |
# File 'lib/specbook/configuration.rb', line 36 def trace_root @trace_root || rails_root.join("tmp/spec_traces") end |
#trace_viewer_port ⇒ Object
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_domains ⇒ Object
Returns the value of attribute ui_domains.
3 4 5 |
# File 'lib/specbook/configuration.rb', line 3 def ui_domains @ui_domains end |