diff options
author | Carl Lerche <carllerche@mac.com> | 2010-04-23 13:11:04 -0700 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2010-04-23 13:11:04 -0700 |
commit | 4d6f5c4ce372d7e636478e38ec48f28c6f44129d (patch) | |
tree | fea2f7947928d1a62f9a859f3faaab71bc6f3d60 /lib/bundler/lockfile_parser.rb | |
parent | eaac39d3b9cd5645a1567f961303dcc2a4868870 (diff) | |
download | bundler-4d6f5c4ce372d7e636478e38ec48f28c6f44129d.tar.gz |
Push cached gems for install time into the Rubygems source
Diffstat (limited to 'lib/bundler/lockfile_parser.rb')
-rw-r--r-- | lib/bundler/lockfile_parser.rb | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/bundler/lockfile_parser.rb b/lib/bundler/lockfile_parser.rb index 7f75ff7feb..11a5fea1ef 100644 --- a/lib/bundler/lockfile_parser.rb +++ b/lib/bundler/lockfile_parser.rb @@ -6,9 +6,10 @@ module Bundler # Do stuff def initialize(lockfile) - @sources = [] + @rg_source = Source::Rubygems.new + @sources = [@rg_source] @dependencies = [] - @specs = [] + @specs = [] lockfile.split(/\n+/).each do |line| case line @@ -43,17 +44,13 @@ module Bundler options = extract_options(option_line) # There should only be one instance of a rubygem source if type == 'gem' - rg_source.add_remote source - rg_source + @rg_source.add_remote source + @rg_source else TYPES[type].from_lock(source, extra_opts.merge(options)) end end - def rg_source - @rg_source ||= Source::Rubygems.new - end - NAME_VERSION = '(?! )(.*?)(?: \((.*)\))?:?' def parse_dependencies(line) |