Skip to content

slopy/pc_rails_code_quality

Repository files navigation

Code Climate Test Coverage Issue Count Build Status

PcRailsCodeQuality

This gem is a compilation of usefull rails gems:

  • rubocop
  • rubycritic
  • simplecov
  • rails_best_practices
  • brakeman

Usage

How to use my plugin.

Installation

Add this line to your application's Gemfile:

group :development, :test do
  gem 'pc_rails_code_quality', :git => 'https://github.com/slopy/pc_rails_code_quality'
end

And then execute:

$ bundle

Generating reports

$ rake pc_reports:html

Web UI

Add to you routes.rb

mount PcRailsCodeQuality::Engine => "/"

To show menu on other pages

In ApplicationController

  helper PcRailsCodeQuality::ApplicationHelper

In layout file

  <%= stylesheet_link_tag "pc_rails_code_quality/application.css" %>
  <%= code_quality_fixed_menu %>

Then you can access the reports:

  • rubocop /dev/reports/rubocop
  • rubycritic /dev/reports/rubycritic
  • tests /dev/reports/tests
  • simplecov /dev/reports/simplecov
  • rails_best_practices /dev/reports/rails_best_practices
  • brakeman /dev/reports/brakeman

Test reports

add

require "pc_rails_code_quality/tests"

to your test_helper or spec_helper

Contributing

Contact: [email protected]

License

The gem is available as open source under the terms of the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published