Use start_with? instead of a regexp

This commit is contained in:
Jack Nagel 2014-12-06 12:29:16 -05:00
parent 01dc112b60
commit 4026e035ad

View File

@ -364,7 +364,7 @@ end
class SubversionDownloadStrategy < VCSDownloadStrategy class SubversionDownloadStrategy < VCSDownloadStrategy
def initialize(name, resource) def initialize(name, resource)
super super
@url = @url.sub(/^svn\+/, "") if @url =~ %r[^svn\+http://] @url = @url.sub(/^svn\+/, "") if @url.start_with?("svn+http://")
end end
def repo_url def repo_url