summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/bundler/source/metadata.rb3
-rw-r--r--spec/commands/licenses_spec.rb2
-rw-r--r--spec/commands/show_spec.rb37
-rw-r--r--spec/other/major_deprecation_spec.rb26
4 files changed, 44 insertions, 24 deletions
diff --git a/lib/bundler/source/metadata.rb b/lib/bundler/source/metadata.rb
index 559b912ffd..0867879861 100644
--- a/lib/bundler/source/metadata.rb
+++ b/lib/bundler/source/metadata.rb
@@ -13,10 +13,13 @@ module Bundler
idx << Gem::Specification.new do |s|
s.name = "bundler"
s.version = VERSION
+ s.license = "MIT"
s.platform = Gem::Platform::RUBY
s.source = self
s.authors = ["bundler team"]
s.bindir = "exe"
+ s.homepage = "https://bundler.io"
+ s.summary = "The best way to manage your application's dependencies"
s.executables = %w[bundle]
# can't point to the actual gemspec or else the require paths will be wrong
s.loaded_from = File.expand_path("..", __FILE__)
diff --git a/spec/commands/licenses_spec.rb b/spec/commands/licenses_spec.rb
index 21fd8eaf2f..423921e282 100644
--- a/spec/commands/licenses_spec.rb
+++ b/spec/commands/licenses_spec.rb
@@ -12,7 +12,7 @@ RSpec.describe "bundle licenses" do
it "prints license information for all gems in the bundle" do
bundle "licenses"
- expect(err).to include("bundler: Unknown")
+ expect(out).to include("bundler: MIT")
expect(out).to include("with_license: MIT")
end
diff --git a/spec/commands/show_spec.rb b/spec/commands/show_spec.rb
index 6e1986e35f..6a7d5f267e 100644
--- a/spec/commands/show_spec.rb
+++ b/spec/commands/show_spec.rb
@@ -30,21 +30,11 @@ RSpec.describe "bundle show", :bundler => "< 3" do
expect(out).to eq(default_bundle_path("gems", "rails-2.3.2").to_s)
end
- it "prints deprecation" do
- bundle "show rails"
- expect(err).to eq("[DEPRECATED] use `bundle info rails` instead of `bundle show rails`")
- end
-
it "prints path if gem exists in bundle (with --paths option)" do
bundle "show rails --paths"
expect(out).to eq(default_bundle_path("gems", "rails-2.3.2").to_s)
end
- it "prints deprecation when called with a gem and the --paths option" do
- bundle "show rails --paths"
- expect(err).to eq("[DEPRECATED] use `bundle info rails --path` instead of `bundle show rails --paths`")
- end
-
it "warns if path no longer exists on disk" do
FileUtils.rm_rf(default_bundle_path("gems", "rails-2.3.2"))
@@ -59,10 +49,6 @@ RSpec.describe "bundle show", :bundler => "< 3" do
expect(out).to eq(root.to_s)
end
- it "prints deprecation when called with bundler" do
- bundle "show bundler"
- expect(err).to eq("[DEPRECATED] use `bundle info bundler` instead of `bundle show bundler`")
- end
it "complains if gem not in bundle" do
bundle "show missing"
expect(err).to match(/could not find gem 'missing'/i)
@@ -79,19 +65,26 @@ RSpec.describe "bundle show", :bundler => "< 3" do
expect(gem_list).to eq(gem_list.sort)
end
- it "prints a deprecation when called with the --paths option" do
- bundle "show --paths"
+ it "prints summary of gems" do
+ bundle "show --verbose"
- expect(err).to eq("[DEPRECATED] use `bundle list` instead of `bundle show --paths`")
+ expect(out).to include <<~MSG
+ * actionmailer (2.3.2)
+ \tSummary: This is just a fake gem for testing
+ \tHomepage: http://example.com
+ \tStatus: Up to date
+ MSG
end
- it "prints summary of gems" do
+ it "includes bundler in the summary of gems" do
bundle "show --verbose"
- expect(out).to include("* actionmailer (2.3.2)")
- expect(out).to include("\tSummary: This is just a fake gem for testing")
- expect(out).to include("\tHomepage: No website available.")
- expect(out).to include("\tStatus: Up to date")
+ expect(out).to include <<~MSG
+ * bundler (#{Bundler::VERSION})
+ \tSummary: The best way to manage your application's dependencies
+ \tHomepage: https://bundler.io
+ \tStatus: Up to date
+ MSG
end
end
diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb
index 83944e4075..8ee48f55d5 100644
--- a/spec/other/major_deprecation_spec.rb
+++ b/spec/other/major_deprecation_spec.rb
@@ -480,9 +480,33 @@ The :gist git source is deprecated, and will be removed in the future. Add this
it "prints a deprecation warning recommending `bundle info`", :bundler => "2" do
expect(deprecations).to include("use `bundle info rack` instead of `bundle show rack`")
end
+
+ pending "fails with a helpful message", :bundler => "3"
end
- pending "fails with a helpful message", :bundler => "3"
+ context "with the --paths option" do
+ before do
+ bundle "show --paths"
+ end
+
+ it "prints a deprecation warning recommending `bundle list`", :bundler => "2" do
+ expect(deprecations).to include("use `bundle list` instead of `bundle show --paths`")
+ end
+
+ pending "fails with a helpful message", :bundler => "3"
+ end
+
+ context "with a gem argument and the --paths option" do
+ before do
+ bundle "show rack --paths"
+ end
+
+ it "prints deprecation warning recommending `bundle info`", :bundler => "2" do
+ expect(deprecations).to include("use `bundle info rack --path` instead of `bundle show rack --paths`")
+ end
+
+ pending "fails with a helpful message", :bundler => "3"
+ end
end
context "bundle console" do