Class: VagrantPlugins::VagrantGit::RepoConfig
- Inherits:
-
Object
- Object
- VagrantPlugins::VagrantGit::RepoConfig
- Defined in:
- lib/vagrant-git/config.rb
Constant Summary collapse
- @@required =
[:target, :path]
Instance Attribute Summary collapse
-
#branch ⇒ Object
Config for a single repo Assumes that the agent has permission to check out, or that it’s public.
-
#clone_in_host ⇒ Object
Config for a single repo Assumes that the agent has permission to check out, or that it’s public.
-
#path ⇒ Object
Config for a single repo Assumes that the agent has permission to check out, or that it’s public.
-
#set_upstream ⇒ Object
Config for a single repo Assumes that the agent has permission to check out, or that it’s public.
-
#sync_on_load ⇒ Object
Config for a single repo Assumes that the agent has permission to check out, or that it’s public.
-
#target ⇒ Object
Config for a single repo Assumes that the agent has permission to check out, or that it’s public.
Instance Method Summary collapse
Instance Attribute Details
#branch ⇒ Object
Config for a single repo Assumes that the agent has permission to check out, or that it’s public
43 44 45 |
# File 'lib/vagrant-git/config.rb', line 43 def branch @branch end |
#clone_in_host ⇒ Object
Config for a single repo Assumes that the agent has permission to check out, or that it’s public
43 44 45 |
# File 'lib/vagrant-git/config.rb', line 43 def clone_in_host @clone_in_host end |
#path ⇒ Object
Config for a single repo Assumes that the agent has permission to check out, or that it’s public
43 44 45 |
# File 'lib/vagrant-git/config.rb', line 43 def path @path end |
#set_upstream ⇒ Object
Config for a single repo Assumes that the agent has permission to check out, or that it’s public
43 44 45 |
# File 'lib/vagrant-git/config.rb', line 43 def set_upstream @set_upstream end |
#sync_on_load ⇒ Object
Config for a single repo Assumes that the agent has permission to check out, or that it’s public
43 44 45 |
# File 'lib/vagrant-git/config.rb', line 43 def sync_on_load @sync_on_load end |
#target ⇒ Object
Config for a single repo Assumes that the agent has permission to check out, or that it’s public
43 44 45 |
# File 'lib/vagrant-git/config.rb', line 43 def target @target end |
Instance Method Details
#finalize! ⇒ Object
58 59 60 61 62 63 64 65 |
# File 'lib/vagrant-git/config.rb', line 58 def finalize! if @clone_in_host.nil? @clone_in_host = true end if @sync_on_load.nil? @sync_on_load = false end end |
#validate ⇒ Object
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/vagrant-git/config.rb', line 47 def validate errors = {} if @target.nil? errors[:target] = ["target must not be nil."] end if @path.nil? errors[:path] = ["path must not be nil."] end errors end |