Class: RakeCheck::Checker::Rbp

Inherits:
Base
  • Object
show all
Defined in:
lib/rake_check/checker/rbp.rb

Overview

Check the output of rails best pratices gem

Instance Attribute Summary

Attributes inherited from Base

#check_output, #options, #time

Instance Method Summary collapse

Methods inherited from Base

#initialize, #status, #success?

Constructor Details

This class inherits a constructor from RakeCheck::Checker::Base

Instance Method Details

#runObject



20
21
22
# File 'lib/rake_check/checker/rbp.rb', line 20

def run
  run_command "rails_best_practices --silent --spec"
end

#short_messageObject



11
12
13
14
15
16
17
18
# File 'lib/rake_check/checker/rbp.rb', line 11

def short_message
  warnings = @check_output[/Found (\d)+ warnings/, 1]
  if warnings
    "with #{warnings} warnings"
  else
    ""
  end
end

#typeObject



7
8
9
# File 'lib/rake_check/checker/rbp.rb', line 7

def type
  "Rails best practices"
end