Commit 14ae4257 authored by Fabio Pelosin's avatar Fabio Pelosin

[Subversion] Minor improvements.

parent 543b3a8e
...@@ -6,17 +6,23 @@ module Pod ...@@ -6,17 +6,23 @@ module Pod
def download def download
if options[:revision] if options[:revision]
download_revision download_revision
elsif options[:tag]
download_tag
else else
download_head download_head
end end
end end
def download_head def download_head
svn "checkout \"#{url}\" \"#{target_path}\"" svn %|checkout "#{url}/#{options[:folder]}" "#{target_path}"|
end end
def download_revision def download_revision
svn "checkout \"#{url}\" -r '#{options[:revision]}' \"#{target_path}\"" svn %|checkout "#{url}/#{options[:folder]}" -r "#{options[:revision]}" "#{target_path}"|
end
def download_tag
svn %|checkout "#{url}/tags/#{options[:tag]}/#{options[:folder]}" "#{target_path}"|
end end
end end
end end
......
...@@ -264,7 +264,7 @@ module Pod ...@@ -264,7 +264,7 @@ module Pod
it "check's out a specific tag" do it "check's out a specific tag" do
@pod.top_specification.stubs(:source).returns( @pod.top_specification.stubs(:source).returns(
:svn => "file://#{fixture('subversion-repo')}/tags/tag-1" :svn => "file://#{fixture('subversion-repo')}", :tag => 'tag-1'
) )
downloader = Downloader.for_pod(@pod) downloader = Downloader.for_pod(@pod)
downloader.download downloader.download
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment