summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-03-09 17:47:54 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-03-14 18:52:20 +0100
commit309729f5bfde799aad6fb985d6239633de2cb450 (patch)
treee8b771e16ffa122c450fc82cc30134683245570c
parente70f79e577969a50754d6c7f4d51d33b1932051c (diff)
downloadbundler-309729f5bfde799aad6fb985d6239633de2cb450.tar.gz
Make `bundle info rails` create a lock file
Just like `bundle show rails` did.
-rw-r--r--lib/bundler/cli/info.rb5
-rw-r--r--spec/commands/info_spec.rb2
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/bundler/cli/info.rb b/lib/bundler/cli/info.rb
index 958b525067..6fd71597aa 100644
--- a/lib/bundler/cli/info.rb
+++ b/lib/bundler/cli/info.rb
@@ -9,6 +9,11 @@ module Bundler
end
def run
+ Bundler.ui.silence do
+ Bundler.definition.validate_runtime!
+ Bundler.load.lock
+ end
+
spec = spec_for_gem(gem_name)
spec_not_found(gem_name) unless spec
diff --git a/spec/commands/info_spec.rb b/spec/commands/info_spec.rb
index c771623a91..b87249f28f 100644
--- a/spec/commands/info_spec.rb
+++ b/spec/commands/info_spec.rb
@@ -10,8 +10,6 @@ RSpec.describe "bundle info" do
end
it "creates a Gemfile.lock when invoked with a gem name" do
- skip "'bundle info rails' does not create a lock file automatically like 'bundle show rails' does"
-
FileUtils.rm("Gemfile.lock")
bundle "info rails"