Module: RakeCommandFilter

Defined in:
lib/rake_command_filter.rb,
lib/line_filter.rb,
lib/command_definition.rb,
lib/line_filter_result.rb,
lib/command_failed_error.rb,
lib/rake_command_definition.rb,
lib/yard_command_definition.rb,
lib/rspec_command_definition.rb,
lib/rubocop_command_definition.rb,
lib/rake_command_filter/version.rb,
lib/scss_lint_command_definition.rb

Overview

A rake task that filters the output of other rake tasks so you can see what you care about.

Defined Under Namespace

Classes: CommandDefinition, CommandFailedError, LineFilter, LineFilterResult, RSpecCommandDefinition, RakeCommandDefinition, RakeTask, RubocopCommandDefinition, ScssLintCommandDefinition, YardCommandDefinition

Constant Summary collapse

MATCH_SUCCESS =

returned by line filter block when a command is successful.

:success
MATCH_FAILURE =

returned by line filter block when a command fails.

:failure
MATCH_WARNING =

return by a line filter to indicate a warning from the command

:warning
MATCH_NONE =

returned when a line filter doesn’t match the specified line.

:none
FAILED_TEXT =

text used to indicate failure

'FAILED'.freeze
OK_TEXT =

text used to indicate success

'OK'.freeze
LINE_HANDLING_HIDE_ALWAYS =

Always hide the line, no matter what

:hide_always
LINE_HANDLING_HIDE_UNTIL_ERROR =

Show the line only after an error pattern line has been matched

:hide_until_error
LINE_HANDLING_SHOW_ALWAYS =

Show the line

:show_always
VERSION =

version of this gem

'0.1.1'.freeze
@@testing =

rubocop:disable Style/ClassVars

false

Class Method Summary collapse

Class Method Details

.testing=(_val) ⇒ Object

set to true if we are in at test context



30
31
32
# File 'lib/rake_command_filter.rb', line 30

def self.testing=(_val)
  @@testing = true # rubocop:disable Style/ClassVars
end

.testing?Boolean

Returns true if we are in a test context.

Returns:

  • (Boolean)

    true if we are in a test context.



35
36
37
# File 'lib/rake_command_filter.rb', line 35

def self.testing?
  return @@testing
end