diff options
author | joyicecloud <joyicecloud@gmail.com> | 2013-09-03 15:37:56 -0700 |
---|---|---|
committer | joyicecloud <joyicecloud@gmail.com> | 2013-09-18 14:24:17 -0700 |
commit | 43732e9c1b3a7510d0592d2a2f357855abab18d7 (patch) | |
tree | 7e8de92c9e2c2b10dfdd4b11e420727f0a3890fc /lib/bundler.rb | |
parent | 7bd82641de44de6601a03ae455ce9277bcdf04b0 (diff) | |
download | bundler-43732e9c1b3a7510d0592d2a2f357855abab18d7.tar.gz |
Displays the previous version of the gem when run bundle update
Change code in the 3 source files to display the method locked_gems in
lib/bundler.rb
Add 3 Rspec test in the update directory for each source: rubygems, git,
path.
Diffstat (limited to 'lib/bundler.rb')
-rw-r--r-- | lib/bundler.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb index f6e75dd7..311409bd 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -153,9 +153,12 @@ module Bundler end def locked_gems - @locked_gems ||= begin + return @locked_gems if defined?(@locked_gems) + if Bundler.default_lockfile.exist? lock = Bundler.read_file(Bundler.default_lockfile) - LockfileParser.new(lock) + @lock_gems = LockfileParser.new(lock) + else + @locked_gems = nil end end |