summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederico Bittencourt <fred.rbittencourt@gmail.com>2016-11-22 21:46:35 -0200
committerFrederico Bittencourt <fred.rbittencourt@gmail.com>2016-11-22 21:46:35 -0200
commita0474029debfa5ca437538ed5d7ed7da62c3c440 (patch)
tree8863e581a89aeb95659b3a9a2246138f929fccac
parent2a57cc0e65371cc551d792e97d8f4163ada4cfc2 (diff)
downloadbundler-a0474029debfa5ca437538ed5d7ed7da62c3c440.tar.gz
remove --path argument from info command
-rw-r--r--lib/bundler/cli.rb3
-rw-r--r--lib/bundler/cli/info.rb12
-rw-r--r--lib/bundler/cli/install.rb2
-rw-r--r--spec/commands/info_spec.rb6
4 files changed, 4 insertions, 19 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index 9088c1aa46..89a9d0a3ac 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -246,9 +246,6 @@ module Bundler
map %w(list) => "show"
desc "info GEM [OPTIONS]", "Shows gem information"
- method_option "path", :type => :boolean,
- :default => false,
- :banner => "Show gem path"
def info(gem_name)
require "bundler/cli/info"
Info.new(options, gem_name).run
diff --git a/lib/bundler/cli/info.rb b/lib/bundler/cli/info.rb
index 999479cfcb..b7eb6a6e56 100644
--- a/lib/bundler/cli/info.rb
+++ b/lib/bundler/cli/info.rb
@@ -16,16 +16,7 @@ module Bundler
end
spec = Bundler::CLI::Common.select_spec(gem_name, :regex_match)
- return unless spec
-
- path = spec.full_gem_path
- return Bundler.ui.info(path) if options[:path]
-
- unless File.directory?(path)
- Bundler.ui.warn("The gem #{gem_name} has been deleted. It was installed at:")
- end
-
- print_gem_info spec
+ return print_gem_info(spec) if spec
end
private
@@ -38,6 +29,7 @@ module Bundler
\tSummary: #{spec.summary || "No description available."}
\tHomepage: #{spec.homepage || "No website available."}
\tStatus: #{outdated?(spec, latest) ? "Outdated - #{spec.version} < #{latest.version}" : "Up to date"}
+ \tPath: #{spec.full_gem_path}
END
end
diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb
index f66716b39d..e2b45c6f30 100644
--- a/lib/bundler/cli/install.rb
+++ b/lib/bundler/cli/install.rb
@@ -76,7 +76,7 @@ module Bundler
relative_path = absolute_path.sub(File.expand_path(".") + File::SEPARATOR, "." + File::SEPARATOR)
Bundler.ui.confirm "Bundled gems are installed into #{relative_path}."
else
- Bundler.ui.confirm "Use `bundle show [gemname]` to see where a bundled gem is installed."
+ Bundler.ui.confirm "Use `bundle info [gemname]` to see where a bundled gem is installed."
end
unless Bundler.settings["ignore_messages"]
diff --git a/spec/commands/info_spec.rb b/spec/commands/info_spec.rb
index 0f0b25a813..dcf2d50359 100644
--- a/spec/commands/info_spec.rb
+++ b/spec/commands/info_spec.rb
@@ -17,11 +17,7 @@ describe "bundle info" do
expect(out).to include("\tSummary:")
expect(out).to include("\tHomepage:")
expect(out).to include("\tStatus:")
- end
-
- it "should print gem path" do
- bundle "info rails --path"
- expect(out).to eq(default_bundle_path("gems", "rails-2.3.2").to_s)
+ expect(out).to include("\tPath:")
end
it "should create a Gemfile.lock if not existing" do