
Security News
Researcher Exposes Zero-Day Clickjacking Vulnerabilities in Major Password Managers
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
bundler-dependencies
Advanced tools
Bundler plugin to inspect dependencies of gems used by your project.
A project's Gemfile.lock
shows some basic information about what gems are directly depended on by other gems, but this extension takes it a step further and enumerates the entire dependency tree of each gem being depended on. For instance, rails
has 12 direct dependencies, but altogether installs 40 gems.
Each dependency is a potential point of failure, vulnerability, maintenance and complexity for a project, so the goal of bundle dependencies
is to shed some light on what's being installed by what. This shouldn't stop you from installing gems that are useful to your project, but to be able to make an educated decision if a gem with 25 dependencies is a worthy tradeoff, for example.
Add this line to your application's Gemfile:
plugin 'bundler-graph'
And then execute:
$ bundle install
Alternately, you can install the plugin directly:
$ bundle plugin install bundle-dependencies
bundler dependencies [command]
[--path=PATH] # Path to Gemfile.lock to scan
[-W, --without=one two three] # Gems to ignore
[-R, --without-rails] # Ignore all Rails gems
Requires a Gemfile.lock
or gems.locked
file to evaluate.
NOTE: By default, bundler dependencies
runs the count
command.
bundle dependencies help
to get an overview of all commands.bundle dependencies help COMMAND
to get help for a specific command.Check how many dependencies each gem in the Gemfile has (use the --minimum N
switch to limit the output to gems with at least N
dependencies):
bundle dependencies [count] [--minimum N]
Find all the gems in the Gemfile that depend on a given gem (either directly or indirectly), as well as all the dependency paths for that gem:
bundle dependencies find GEM
Get just the number of dependent gems:
bundle dependencies find GEM --quiet
See a graph of all dependencies:
bundle dependencies graph
See a graph of all dependencies for a specific gem:
bundle dependencies graph GEMNAME
The following options can be used with any command:
--path PATH
: User the Gemfile for the project at PATH
, rather than the current project's Gemfile.--without foo bar baz
/-W foo bar baz
: Exclude the listed gems from the scan. Any uses either directly in your Gemfile or as dependencies will be excluded, and not be counted.--without-rails
/-R
: Quick option to exclude all 1st party Rails gems from the scan.After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/dvandersluis/bundler-dependencies.
FAQs
Unknown package
We found that bundler-dependencies demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.