lib/bundler/dependencies/cli/graph.rb in bundler-dependencies-0.5.1 vs lib/bundler/dependencies/cli/graph.rb in bundler-dependencies-0.6.0

- old
+ new

@@ -1,23 +1,23 @@ module Bundler module Dependencies class CLI < ::Thor class Graph < Command - def initialize(gem, options) - @gem = gem - super(options) - end + include CLI::WithGem private - attr_reader :gem - def to_s - Visitors::ShellTree.new.walk(graph.without(*without), shell) + if gems.empty? + error("#{gem} is not present in your bundle.") + exit(1) + end + + Visitors::ShellTree.new.walk(gems, shell) end def graph - gem ? Bundler::Dependencies::Graph.new(specs: [Spec.find(gem)]) : super + gem ? Bundler::Dependencies::Graph.new(specs: [super.find(gem)]) : super end end end end end