bundler/bundler — pull request #3050 by fnichol (2014-05-28 16:43:37+00:00)
Title: Add `bundle viz --without` to exclude gem groups from resulting graph.

Hello Bundler team!

This PR introduces a `--without` flag (similar to the flag on the `install` subcommand) which will drop the inclusion of these gems from the graph.

The ability to exclude gem groups from the graph is very useful when trying to visualize or understand the runtime dependencies of a particular RubyGem or project, minus any development or test related
libraries.

Previously the process of reproducing this behavior was a manual process:

* Inspect the project's Gemfile and comment/remove any gems that are not
runtime dependencies. Typically these gems would be in `:test` or
`:development` groups.
* Inspect the project's gemspec (if it exists) and comment/remove any
gems that are not runtime dependencies.

Now it is as simple as:

bundle viz --without=test development

---

I have 2 concerns with this PR and I suspect I may require some remediation on one or both:

1. While I would normally include regression/feature specs for a related commit, the `bundle viz` related code currently doesn't have any test coverage. I've attempted to be as minimal and surgical as possible so as to not break any current behavior but it's going to take a code review and test drive to verify this work at present. In short, am I good here, or is there more work to do?
2. I would have preferred to not augment a Class' constructor arguments (for `Bundler::Graph`), but it's my assumption that this class in for internal use only and doesn't constitute the public SemVer API for Bundler. To be on the safe side, I appended this argument at the end and provided a default to preserve backwards compatibility. Does this look reasonable?

Thank you core team for your tireless work to make the Ruby community a better place!