GithubHelp home page GithubHelp logo

lapidarius's Introduction

Table of Contents

Scope

This gem is aimed to recursively collect the runtime dependencies footprint of the specified gem.
The output of the library mimics the tree shell utility, highlighting the nested dependencies via ASCII characters.

Alternatives

Some alternatives exists:

gem dep

The standard gem dep command just unearth one level of dependencies.

bundle viz

The bundle viz command relies on the Gemfile and the graphviz library to generate a visual representation of the gem inter-dependencies.
While it is great to visualize inter-dependencies, i have hard times figuring out gem's runtime footprint.

Installation

Install the gem from your shell:

gem install lapidarius

Usage

This library relies heavily on the Gem::Commands::DependencyCommand class to recursively the dependencies tree.
Both runtime and development dependencies are counted once, but just the former are printed on screen:

lapidarius sinatra
sinatra (2.0.0)
├── mustermann (~> 1.0)
├── rack (~> 2.0)
├── rack-protection (= 2.0.0)
│   └── rack (>= 0)
└── tilt (~> 2.0)

4 runtime, 5 development

Version

By default this library scans for the latest available version >= 0 found at rubygems.org.
In case you are interested on a specific version just specify the -v option:

lapidarius sinatra -v 1.4.7
sinatra (1.4.7)
├── rack (~> 1.5)
├── rack-protection (~> 1.4)
│   └── rack (>= 0)
└── tilt (< 3, >= 1.3)

3 runtime, 4 development

Remote

By default this library scan for local gems, warning if the gem is not installed:

lapidarius rails -v 1.2.6
No gems found matching rails (= 1.2.6)

If you want to scan for remote gems specify the -r option (be aware of slowness):

lapidarius rails -v 1.2.6 -r
rails (1.2.6)
├── actionmailer (= 1.3.6)
│   └── actionpack (= 1.13.6)
│       └── activesupport (= 1.4.4)
├── actionpack (= 1.13.6)
│   └── activesupport (= 1.4.4)
├── actionwebservice (= 1.2.6)
│   ├── actionpack (= 1.13.6)
│   │   └── activesupport (= 1.4.4)
│   └── activerecord (= 1.15.6)
│       └── activesupport (= 1.4.4)
├── activerecord (= 1.15.6)
│   └── activesupport (= 1.4.4)
├── activesupport (= 1.4.4)
└── rake (>= 0.7.2)

6 runtime, 5 development

Quiet

Some gems have several interdependencies that results in a multitude of tree branches.
In case you just dare to count dependencies without the visual noise, you can pass the -q option:

lapidarius rails -v 5.1.5 -r -q
37 runtime, 48 development

lapidarius's People

Contributors

costajob avatar mkcosta avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.