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

[Subversion] Minor improvements.

parent 543b3a8e
......@@ -6,17 +6,23 @@ module Pod
def download
if options[:revision]
download_revision
elsif options[:tag]
download_tag
else
download_head
end
end
def download_head
svn "checkout \"#{url}\" \"#{target_path}\""
svn %|checkout "#{url}/#{options[:folder]}" "#{target_path}"|
end
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
......
......@@ -264,7 +264,7 @@ module Pod
it "check's out a specific tag" do
@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.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