Class: Sunshine::RsyncRepo
- Inherits:
-
Repo
- Object
- Repo
- Sunshine::RsyncRepo
show all
- Defined in:
- lib/sunshine/repos/rsync_repo.rb
Overview
Allows uploading code directly using rsync, instead of a scm.
Instance Attribute Summary
Attributes inherited from Repo
#flags, #scm, #url
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Repo
#checkout_to, detect, #get_repo_info, inherited, new_of_type, #scm_flags, valid?
Constructor Details
#initialize(url, options = {}) ⇒ RsyncRepo
13
14
15
16
17
|
# File 'lib/sunshine/repos/rsync_repo.rb', line 13
def initialize url, options={}
super
@flags << '--exclude .svn/' << '--exclude .git/'
@url << "/" unless @url[-1..-1] == "/"
end
|
Class Method Details
.get_info(path = ".", shell = nil) ⇒ Object
8
9
10
|
# File 'lib/sunshine/repos/rsync_repo.rb', line 8
def self.get_info path=".", shell=nil
{}
end
|
Instance Method Details
#do_checkout(path, shell) ⇒ Object
20
21
22
|
# File 'lib/sunshine/repos/rsync_repo.rb', line 20
def do_checkout path, shell
shell.upload @url, path, :flags => @flags
end
|
#name ⇒ Object
25
26
27
|
# File 'lib/sunshine/repos/rsync_repo.rb', line 25
def name
File.basename @url
end
|