[forks-shield]: https://img.shields.io/github/forks/julianrubisch/attractor-rails.svg?style=flat-square [forks-url]: https://github.com/julianrubisch/attractor-rails/network/members [stars-shield]: https://img.shields.io/github/stars/julianrubisch/attractor-rails.svg?style=flat-square [stars-url]: https://github.com/julianrubisch/attractor-rails/stargazers [issues-shield]: https://img.shields.io/github/issues/julianrubisch/attractor-rails.svg?style=flat-square [issues-url]: https://github.com/julianrubisch/attractor-rails/issues [license-shield]: https://img.shields.io/github/license/julianrubisch/attractor-rails.svg?style=flat-square [license-url]: https://github.com/julianrubisch/attractor-rails/blob/master/LICENSE [build-status]: https://travis-ci.org/julianrubisch/attractor-rails.svg?branch=master [twitter-shield]: https://img.shields.io/twitter/follow/AttractorGem?style=social [logo-source]: https://thenounproject.com/term/black-hole/1043893 [repo]: https://github.com/julianrubisch/attractor-rails
Logo

Attractor Rails Engine

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

baked into a mountable Rails Engine

--- ![Build Status][build-status] [![Forks][forks-shield]][forks-url] [![Stargazers][stars-shield]][stars-url] [![Issues][issues-shield]][issues-url] [![MIT License][license-shield]][license-url] [![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-) Become a Patron!
## Table of Contents - [Table of Contents](#table-of-contents) - [Introduction](#introduction) - [Installation](#installation) - [Configuration](#configuration) - [Contributing](#contributing) - [Logo Attribution](#logo-attribution) - [Contributors ✨](#contributors-%e2%9c%a8) ## Installation Add the gem to your Gemfile: ```ruby group :development do gem 'attractor-rails' end ``` And then execute: ```sh bundle install ``` This will install `attractor`, along with two plugins (`attractor-ruby`, `attractor-javascript`) for you. Mount the engine in your `routes.rb`: ```ruby 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: ```ruby # 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][repo]. ## Logo Attribution [Black Hole by Eynav Raphael from the Noun Project][logo-source] ## Contributors ✨ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

Julian Rubisch

💻 📖
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!