File tree Expand file tree Collapse file tree 4 files changed +27
-11
lines changed Expand file tree Collapse file tree 4 files changed +27
-11
lines changed Original file line number Diff line number Diff line change @@ -287,8 +287,8 @@ def update(*gems)
287287 method_option "outdated" , type : :boolean , banner : "Show verbose output including whether gems are outdated."
288288 def show ( gem_name = nil )
289289 if ARGV . include? ( "--outdated" )
290- message = "the `--outdated` flag to `bundle show` was undocumented and will be removed without replacement "
291- removed_message = "the `--outdated` flag to `bundle show` was undocumented and has been removed without replacement "
290+ message = "the `--outdated` flag to `bundle show` will be removed in favor of `bundle show --verbose` "
291+ removed_message = "the `--outdated` flag to `bundle show` has been removed in favor of `bundle show --verbose` "
292292 SharedHelpers . major_deprecation ( 2 , message , removed_message : removed_message )
293293 end
294294 require_relative "cli/show"
Original file line number Diff line number Diff line change @@ -57,12 +57,8 @@ def run
5757
5858 def fetch_latest_specs
5959 definition = Bundler . definition ( true )
60- if options [ :outdated ]
61- Bundler . ui . info "Fetching remote specs for outdated check...\n \n "
62- Bundler . ui . silence { definition . remotely! }
63- else
64- definition . with_cache!
65- end
60+ Bundler . ui . info "Fetching remote specs for outdated check...\n \n "
61+ Bundler . ui . silence { definition . remotely! }
6662 Bundler . reset!
6763 definition . specs
6864 end
Original file line number Diff line number Diff line change 33RSpec . describe "bundle show" do
44 context "with a standard Gemfile" do
55 before :each do
6+ build_repo2
7+
68 install_gemfile <<-G
7- source "https://gem.repo1 "
9+ source "https://gem.repo2 "
810 gem "rails"
911 G
1012 end
8688 \t Status: Up to date
8789 MSG
8890 end
91+
92+ it "includes up to date status in summary of gems" do
93+ update_repo2 do
94+ build_gem "rails" , "3.0.0"
95+ end
96+
97+ bundle "show --verbose"
98+
99+ expect ( out ) . to include <<~MSG
100+ * rails (2.3.2)
101+ \t Summary: This is just a fake gem for testing
102+ \t Homepage: http://example.com
103+ \t Status: Outdated - 2.3.2 < 3.0.0
104+ MSG
105+
106+ # check lockfile is not accidentally updated
107+ expect ( lockfile ) . to include ( "actionmailer (2.3.2)" )
108+ end
89109 end
90110
91111 context "with a git repo in the Gemfile" do
219239 end
220240end
221241
222- RSpec . describe "bundle show" , bundler : "4 " do
242+ RSpec . describe "bundle show" , bundler : "5 " do
223243 pending "shows a friendly error about the command removal"
224244end
Original file line number Diff line number Diff line change 614614 end
615615
616616 it "prints a deprecation warning informing about its removal" do
617- expect ( deprecations ) . to include ( "the `--outdated` flag to `bundle show` was undocumented and will be removed without replacement " )
617+ expect ( deprecations ) . to include ( "the `--outdated` flag to `bundle show` will be removed in favor of `bundle show --verbose` " )
618618 end
619619
620620 pending "fails with a helpful message" , bundler : "4"
You can’t perform that action at this time.
0 commit comments