Class: FlakeySpecCatcher::UserConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/flakey_spec_catcher/user_config.rb

Overview

UserConfig class Captures user-defined settings to configure RSpec re-run settings.

Constant Summary collapse

USER_CONFIG_ENV_VARS =
%w[FSC_REPEAT_FACTOR FSC_IGNORE_FILES FSC_IGNORE_BRANCHES
FSC_SILENT_MODE FSC_RERUN_FILE_ONLY FSC_USAGE_PATTERNS
FSC_EXCLUDED_TAGS FSC_OUTPUT_FILE FSC_LIST_CHILD_SPECS
FSC_RANDOM_TIMING].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cli_override: CliOverride.new) ⇒ UserConfig

Returns a new instance of UserConfig.



19
20
21
22
23
# File 'lib/flakey_spec_catcher/user_config.rb', line 19

def initialize(cli_override: CliOverride.new)
  apply_env_var_settings
  @cli_override = cli_override
  override_settings
end

Instance Attribute Details

#break_on_first_failureObject (readonly)

Returns the value of attribute break_on_first_failure.



11
12
13
# File 'lib/flakey_spec_catcher/user_config.rb', line 11

def break_on_first_failure
  @break_on_first_failure
end

#dry_runObject (readonly)

Returns the value of attribute dry_run.



11
12
13
# File 'lib/flakey_spec_catcher/user_config.rb', line 11

def dry_run
  @dry_run
end

#enable_runsObject (readonly)

Returns the value of attribute enable_runs.



10
11
12
# File 'lib/flakey_spec_catcher/user_config.rb', line 10

def enable_runs
  @enable_runs
end

#excluded_tagsObject (readonly)

Returns the value of attribute excluded_tags.



10
11
12
# File 'lib/flakey_spec_catcher/user_config.rb', line 10

def excluded_tags
  @excluded_tags
end

#ignore_branchesObject (readonly)

Returns the value of attribute ignore_branches.



9
10
11
# File 'lib/flakey_spec_catcher/user_config.rb', line 9

def ignore_branches
  @ignore_branches
end

#ignore_filesObject (readonly)

Returns the value of attribute ignore_files.



9
10
11
# File 'lib/flakey_spec_catcher/user_config.rb', line 9

def ignore_files
  @ignore_files
end

#list_child_specsObject (readonly)

Returns the value of attribute list_child_specs.



12
13
14
# File 'lib/flakey_spec_catcher/user_config.rb', line 12

def list_child_specs
  @list_child_specs
end

#manual_rerun_patternsObject (readonly)

Returns the value of attribute manual_rerun_patterns.



10
11
12
# File 'lib/flakey_spec_catcher/user_config.rb', line 10

def manual_rerun_patterns
  @manual_rerun_patterns
end

#manual_rerun_usageObject (readonly)

Returns the value of attribute manual_rerun_usage.



10
11
12
# File 'lib/flakey_spec_catcher/user_config.rb', line 10

def manual_rerun_usage
  @manual_rerun_usage
end

#output_fileObject (readonly)

Returns the value of attribute output_file.



10
11
12
# File 'lib/flakey_spec_catcher/user_config.rb', line 10

def output_file
  @output_file
end

#random_timingObject (readonly)

Returns the value of attribute random_timing.



12
13
14
# File 'lib/flakey_spec_catcher/user_config.rb', line 12

def random_timing
  @random_timing
end

#repeat_factorObject (readonly)

Returns the value of attribute repeat_factor.



9
10
11
# File 'lib/flakey_spec_catcher/user_config.rb', line 9

def repeat_factor
  @repeat_factor
end

#rerun_file_onlyObject (readonly)

Returns the value of attribute rerun_file_only.



9
10
11
# File 'lib/flakey_spec_catcher/user_config.rb', line 9

def rerun_file_only
  @rerun_file_only
end

#rspec_usage_patternsObject (readonly)

Returns the value of attribute rspec_usage_patterns.



9
10
11
# File 'lib/flakey_spec_catcher/user_config.rb', line 9

def rspec_usage_patterns
  @rspec_usage_patterns
end

#silent_modeObject (readonly)

Returns the value of attribute silent_mode.



9
10
11
# File 'lib/flakey_spec_catcher/user_config.rb', line 9

def silent_mode
  @silent_mode
end

#split_indexObject (readonly)

Returns the value of attribute split_index.



11
12
13
# File 'lib/flakey_spec_catcher/user_config.rb', line 11

def split_index
  @split_index
end

#split_nodesObject (readonly)

Returns the value of attribute split_nodes.



11
12
13
# File 'lib/flakey_spec_catcher/user_config.rb', line 11

def split_nodes
  @split_nodes
end

#test_optionsObject (readonly)

Returns the value of attribute test_options.



11
12
13
# File 'lib/flakey_spec_catcher/user_config.rb', line 11

def test_options
  @test_options
end

#use_parentObject (readonly)

Returns the value of attribute use_parent.



11
12
13
# File 'lib/flakey_spec_catcher/user_config.rb', line 11

def use_parent
  @use_parent
end

#verboseObject (readonly)

Returns the value of attribute verbose.



11
12
13
# File 'lib/flakey_spec_catcher/user_config.rb', line 11

def verbose
  @verbose
end