Module: BrickAndMortar::Svn
- Defined in:
- lib/brick_and_mortar/svn.rb
Class Method Summary collapse
Class Method Details
.checkout_repo(url, name = nil, options = {}) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/brick_and_mortar/svn.rb', line 3 def self.checkout_repo(url, name = nil, = {}) unless name split_url = url.split '/' name = if split_url.last == 'trunk' split_url.last else split_url[-2] end end # @todo This doesn't set the working directory properly for svn, but it's needed to handle the case where the user needs to interact with svn (for password, for instance) # IO.popen "svn co #{url} #{name}" system "svn co #{url} #{name}" end |