0.01
No release in over 3 years
Low commit activity in last 3 years
Many authors (Michael Feathers, Sandi Metz) have shown that an evaluation of churn vs complexity of files in software projects provide a valuable metric towards code quality. This is another take on the matter, for ruby code, using the `churn` and `flog` projects.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

Runtime

 Project Readme

Logo

Attractor Rails Engine

A code complexity metrics visualization and exploration tool for Ruby and JavaScript

baked into a mountable Rails Engine


Build Status Forks Stargazers Issues MIT License

All Contributors

Become a Patron!

Table of Contents

  • Table of Contents
  • Introduction
  • Installation
  • Configuration
  • Contributing
  • Logo Attribution
  • Contributors ✨

Installation

Add the gem to your Gemfile:

group :development do
  gem 'attractor-rails'
end

And then execute:

bundle install

This will install attractor, along with two plugins (attractor-ruby, attractor-javascript) for you.

Mount the engine in your routes.rb:

Rails.application.routes.draw do
  mount Attractor::Rails::Engine, at: "/attractor" if Rails.env.development?
# ...
end

And that's it! Browse to http://localhost:3000/attractor/ and enjoy your code metrics!

NOTE: due to the forwarding of requests to the attractor gem in the background, the / at the end is important! Don't leave it out.

Configuration

attractor-rails ships with sensible defaults, but you can override the following configuration options in an initializer, if you like:

# config/initializers/attractor.rb
Attractor::Rails.minimum_churn_count = 1     # default: 3
Attractor::Rails.file_prefix = "app"         # default: ""
Attractor::Rails.start_ago = "3m"            # default: "5y"

Contributing

Bug reports and pull requests are welcome on GitHub.

Logo Attribution

Black Hole by Eynav Raphael from the Noun Project

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Julian Rubisch

💻 📖

This project follows the all-contributors specification. Contributions of any kind welcome!