lib/bundler/cli.rb in bundler-1.3.3 vs lib/bundler/cli.rb in bundler-1.3.4

- old
+ new

@@ -262,19 +262,21 @@ Bundler.ui.confirm "Post-install message from #{name}:" Bundler.ui.info msg end clean if Bundler.settings[:clean] && Bundler.settings[:path] - rescue GemNotFound => e + rescue GemNotFound, VersionConflict => e if opts[:local] && Bundler.app_cache.exist? Bundler.ui.warn "Some gems seem to be missing from your vendor/cache directory." end - if Bundler.definition.no_sources? - Bundler.ui.warn "Your Gemfile has no remote sources. If you need " \ - "gems that are not already on\nyour machine, add a line like this " \ - "to your Gemfile:\n source 'https://rubygems.org'" + if Bundler.definition.rubygems_remotes.empty? + Bundler.ui.warn <<-WARN, :wrap => true + Your Gemfile has no gem server sources. If you need gems that are \ + not already on your machine, add a line like this to your Gemfile: + source 'https://rubygems.org' + WARN end raise e end desc "update", "update the current environment" @@ -645,10 +647,12 @@ method_option :file, :type => :string, :default => 'gem_graph', :aliases => '-f', :banner => "The name to use for the generated file. see format option" method_option :version, :type => :boolean, :default => false, :aliases => '-v', :banner => "Set to show each gem version." method_option :requirements, :type => :boolean, :default => false, :aliases => '-r', :banner => "Set to show the version of each required dependency." method_option :format, :type => :string, :default => "png", :aliases => '-F', :banner => "This is output format option. Supported format is png, jpg, svg, dot ..." def viz + require 'graphviz' + output_file = File.expand_path(options[:file]) graph = Graph.new(Bundler.load, output_file, options[:version], options[:requirements], options[:format]) begin graph.viz @@ -861,11 +865,11 @@ pager ||= 'cat' end def without_groups_message groups = Bundler.settings.without - group_list = [groups[0...-1].join(", "), groups[-1]]. - reject{|s| s.empty? }.join(" and ") + group_list = [groups[0...-1].join(", "), groups[-1..-1]]. + reject{|s| s.to_s.empty? }.join(" and ") group_str = (groups.size == 1) ? "group" : "groups" "Gems in the #{group_str} #{group_list} were not installed." end end