Module: Capo::Init
- Defined in:
- lib/capo/init.rb
Class Method Summary collapse
Class Method Details
.fetch_repository ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/capo/init.rb', line 7 def fetch_repository repository_url = 'git://github.com/capoio/capo.git' puts "Pulling changes from remote repository" begin repo = with_timeout{Git.open Capo.repository_path} puts with_timeout{repo.pull} rescue puts "Repository doesn't seem to exist yet..." puts "Cloning repository from #{repository_url} to #{Capo.repository_path}" with_timeout{Git.clone repository_url, Capo.repository_path} retry end end |