diff options
Diffstat (limited to 'lib/bundler/lockfile_parser.rb')
-rw-r--r-- | lib/bundler/lockfile_parser.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/bundler/lockfile_parser.rb b/lib/bundler/lockfile_parser.rb index 32eb43a4..0511f0fc 100644 --- a/lib/bundler/lockfile_parser.rb +++ b/lib/bundler/lockfile_parser.rb @@ -19,6 +19,7 @@ module Bundler GIT = "GIT" GEM = "GEM" PATH = "PATH" + SVN = "SVN" SPECS = " specs:" OPTIONS = /^ ([a-z]+): (.*)$/i @@ -54,12 +55,13 @@ module Bundler TYPES = { "GIT" => Bundler::Source::Git, "GEM" => Bundler::Source::Rubygems, - "PATH" => Bundler::Source::Path + "PATH" => Bundler::Source::Path, + "SVN" => Bundler::Source::SVN } def parse_source(line) case line - when GIT, GEM, PATH + when GIT, GEM, PATH, SVN @current_source = nil @opts, @type = {}, line when SPECS @@ -67,10 +69,10 @@ module Bundler when "PATH" @current_source = TYPES[@type].from_lock(@opts) @sources << @current_source - when "GIT" + when "GIT", "SVN" @current_source = TYPES[@type].from_lock(@opts) - # Strip out duplicate GIT sections - if @type == "GIT" && @sources.include?(@current_source) + # Strip out duplicate GIT / SVN sections + if @sources.include?(@current_source) @current_source = @sources.find { |s| s == @current_source } else @sources << @current_source |