Class: Seams::CLI::Quality
- Inherits:
-
Object
- Object
- Seams::CLI::Quality
- Defined in:
- lib/seams/cli/quality.rb
Overview
Runs the four quality gates the host’s ‘bin/audit` script also runs (RuboCop, Brakeman, bundler-audit, SimpleCov collation), in one shot, and reports a unified summary. Each tool that is not installed in the host’s bundle is skipped with a note rather than failing — hosts opt in by adding the gem.
bin/rails seams:quality:all
Returns true when every gate that ran passed; false otherwise.
Constant Summary collapse
- DEFAULT_ENGINES_ROOT =
"engines"
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(engines_root: DEFAULT_ENGINES_ROOT, output: $stdout) ⇒ Quality
constructor
A new instance of Quality.
Constructor Details
#initialize(engines_root: DEFAULT_ENGINES_ROOT, output: $stdout) ⇒ Quality
Returns a new instance of Quality.
19 20 21 22 23 |
# File 'lib/seams/cli/quality.rb', line 19 def initialize(engines_root: DEFAULT_ENGINES_ROOT, output: $stdout) @engines_root = engines_root @output = output @results = {} end |
Instance Method Details
#call ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/seams/cli/quality.rb', line 25 def call run_rubocop run_brakeman run_bundler_audit run_simplecov_collation print_summary @results.values.all? { |status| %i[pass skipped].include?(status) } end |