Skip to content

attractor (code complexity metrics visualization and exploration tool for ruby and javascript) running in a rails engine

License

Notifications You must be signed in to change notification settings

julianrubisch/attractor-rails

Repository files navigation


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

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!

About

attractor (code complexity metrics visualization and exploration tool for ruby and javascript) running in a rails engine

Resources

License

Stars

Watchers

Forks

Packages

No packages published