A code complexity metrics visualization and exploration tool for Ruby and JavaScript
baked into a mountable Rails Engine
- Table of Contents
- Introduction
- Installation
- Configuration
- Contributing
- Logo Attribution
- Contributors ✨
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.
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"
Bug reports and pull requests are welcome on GitHub.
Black Hole by Eynav Raphael from the Noun Project
Thanks goes to these wonderful people (emoji key):
Julian Rubisch 💻 📖 |
This project follows the all-contributors specification. Contributions of any kind welcome!