Class: RSpec::FlakeClassifier::Configuration
- Inherits:
-
Object
- Object
- RSpec::FlakeClassifier::Configuration
- Defined in:
- lib/rspec/flake/classifier/configuration.rb,
sig/rspec/flake/classifier.rbs
Constant Summary collapse
- DEFAULT_STORE =
".rspec_flake_store"
Instance Attribute Summary collapse
-
#auto_rerun ⇒ bool, Hash[Symbol, untyped]
Returns the value of attribute auto_rerun.
-
#changed_lines_provider ⇒ Object
Returns the value of attribute changed_lines_provider.
-
#coverage_provider ⇒ Object
Returns the value of attribute coverage_provider.
-
#deflaker ⇒ Boolean
Returns the value of attribute deflaker.
-
#probe_provider ⇒ Object
Returns the value of attribute probe_provider.
-
#rspec_command ⇒ Array[String]?
Returns the value of attribute rspec_command.
-
#run_sensitivity ⇒ Boolean
Returns the value of attribute run_sensitivity.
-
#same_order_runs ⇒ Integer
Returns the value of attribute same_order_runs.
-
#sensitivity_factors ⇒ Array[Symbol]
Returns the value of attribute sensitivity_factors.
-
#skip_known_flakes ⇒ Boolean
Returns the value of attribute skip_known_flakes.
-
#store ⇒ String
Returns the value of attribute store.
Instance Method Summary collapse
- #auto_rerun_attempts ⇒ Integer
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #store_path ⇒ String
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/rspec/flake/classifier/configuration.rb', line 13 def initialize @store = DEFAULT_STORE @auto_rerun = false @deflaker = false @rspec_command = nil @same_order_runs = 3 @skip_known_flakes = false @coverage_provider = nil @changed_lines_provider = nil @probe_provider = nil @run_sensitivity = false @sensitivity_factors = %i[time randomness network] end |
Instance Attribute Details
#auto_rerun ⇒ bool, Hash[Symbol, untyped]
Returns the value of attribute auto_rerun.
8 9 10 |
# File 'lib/rspec/flake/classifier/configuration.rb', line 8 def auto_rerun @auto_rerun end |
#changed_lines_provider ⇒ Object
Returns the value of attribute changed_lines_provider.
8 9 10 |
# File 'lib/rspec/flake/classifier/configuration.rb', line 8 def changed_lines_provider @changed_lines_provider end |
#coverage_provider ⇒ Object
Returns the value of attribute coverage_provider.
8 9 10 |
# File 'lib/rspec/flake/classifier/configuration.rb', line 8 def coverage_provider @coverage_provider end |
#deflaker ⇒ Boolean
Returns the value of attribute deflaker.
8 9 10 |
# File 'lib/rspec/flake/classifier/configuration.rb', line 8 def deflaker @deflaker end |
#probe_provider ⇒ Object
Returns the value of attribute probe_provider.
8 9 10 |
# File 'lib/rspec/flake/classifier/configuration.rb', line 8 def probe_provider @probe_provider end |
#rspec_command ⇒ Array[String]?
Returns the value of attribute rspec_command.
8 9 10 |
# File 'lib/rspec/flake/classifier/configuration.rb', line 8 def rspec_command @rspec_command end |
#run_sensitivity ⇒ Boolean
Returns the value of attribute run_sensitivity.
8 9 10 |
# File 'lib/rspec/flake/classifier/configuration.rb', line 8 def run_sensitivity @run_sensitivity end |
#same_order_runs ⇒ Integer
Returns the value of attribute same_order_runs.
8 9 10 |
# File 'lib/rspec/flake/classifier/configuration.rb', line 8 def same_order_runs @same_order_runs end |
#sensitivity_factors ⇒ Array[Symbol]
Returns the value of attribute sensitivity_factors.
8 9 10 |
# File 'lib/rspec/flake/classifier/configuration.rb', line 8 def sensitivity_factors @sensitivity_factors end |
#skip_known_flakes ⇒ Boolean
Returns the value of attribute skip_known_flakes.
8 9 10 |
# File 'lib/rspec/flake/classifier/configuration.rb', line 8 def skip_known_flakes @skip_known_flakes end |
#store ⇒ String
Returns the value of attribute store.
8 9 10 |
# File 'lib/rspec/flake/classifier/configuration.rb', line 8 def store @store end |
Instance Method Details
#auto_rerun_attempts ⇒ Integer
27 28 29 30 31 32 33 |
# File 'lib/rspec/flake/classifier/configuration.rb', line 27 def auto_rerun_attempts return same_order_runs unless auto_rerun.is_a?(Hash) Integer(auto_rerun.fetch(:failures, same_order_runs)) rescue ArgumentError, TypeError same_order_runs end |
#store_path ⇒ String
35 36 37 |
# File 'lib/rspec/flake/classifier/configuration.rb', line 35 def store_path store.to_s.empty? ? DEFAULT_STORE : store.to_s end |