0.03
No release in over 3 years
Low commit activity in last 3 years
There's a lot of open issues
Ruby Detective is a gem that parses your code, finds it's dependencies and outputs a interactive .html file that you can use to explore the dependency network of the code.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 13.0.1
~> 3.9.0
~> 0.17.1

Runtime

~> 2.6.5
 Project Readme

Ruby Detective

Investigating your code dependencies

Ruby Detective is a gem that parses your code, finds it's dependencies and outputs an interactive .html file that you can use to explore the dependency network of the code.

This is the UI for the Ruby Detective project by the way:

Preview

*: Due to Ruby metaprogramming super-powers (and by extension Rails heavy use of those) it's unfeasible to find every single dependency, so we can only guarantee that explicit constants will be pointed as dependencies.

Main features

  • Explorable and interactive network graph of the project dependencies
  • Graph nodes colored by namespace, making it easier to spot contexts
  • Useful information like lines of code, number of dependencies and dependents, etc
  • Outputs a fully self-contained .html file that can be easily shared

Installation

Make sure you have Ruby 2.5 or higher installed (lower versions are not supported)

gem install ruby_detective

Usage

cd my-project-folder
ruby_detective .

This should output an html file at the end that is completely self-contained, and can be shared around with your peers :D

Some tips

  • Click on a node to bring it's card to the top of the list on the left
  • Click twice on a node to add it to the graph, allowing to navigate through dependencies
  • Use the filters on the right to customize the graph, toggling off the "Show second-level dependency edges" option can be specially useful

This gem was inspired by @emad-elsaid library rubrowser.