Class: QuietQuality::Tools::RelevantRunner

Inherits:
BaseRunner
  • Object
show all
Defined in:
lib/quiet_quality/tools/relevant_runner.rb

Constant Summary collapse

MAX_FILES =

In general, we don’t want to supply a huge number of arguments to a command-line tool. This will probably become configurable later.

100

Instance Method Summary collapse

Methods inherited from BaseRunner

#failure_status?, #initialize, #success_status?, #tool_name

Methods included from Logging

#debug, #info, #warn

Constructor Details

This class inherits a constructor from QuietQuality::Tools::BaseRunner

Instance Method Details

#base_commandObject



28
29
30
# File 'lib/quiet_quality/tools/relevant_runner.rb', line 28

def base_command
  fail(NoMethodError, "RelevantRunner subclass must implement either `command` or `base_command`")
end

#base_exec_commandObject



32
33
34
# File 'lib/quiet_quality/tools/relevant_runner.rb', line 32

def base_exec_command
  fail(NoMethodError, "RelevantRunner subclass must implement either `exec_command` or `base_exec_command`")
end

#commandObject



14
15
16
17
# File 'lib/quiet_quality/tools/relevant_runner.rb', line 14

def command
  return nil if skip_execution?
  (command_override || base_command) + target_files.sort
end

#exec_commandObject



19
20
21
22
# File 'lib/quiet_quality/tools/relevant_runner.rb', line 19

def exec_command
  return nil if skip_execution?
  (exec_override || base_exec_command) + target_files.sort
end

#invoke!Object



10
11
12
# File 'lib/quiet_quality/tools/relevant_runner.rb', line 10

def invoke!
  @_outcome ||= skip_execution? ? skipped_outcome : performed_outcome
end

#no_files_outputObject



36
37
38
# File 'lib/quiet_quality/tools/relevant_runner.rb', line 36

def no_files_output
  fail(NoMethodError, "RelevantRunner subclass must implement `no_files_output`")
end

#relevant_path?(path) ⇒ Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/quiet_quality/tools/relevant_runner.rb', line 24

def relevant_path?(path)
  fail(NoMethodError, "RelevantRunner subclass must implement `relevant_path?`")
end