Class: VagrantPlugins::VagrantGit::RepoConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-git/config.rb

Constant Summary collapse

@@required =
[:target, :path]

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#branchObject

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_hostObject

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

#pathObject

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_upstreamObject

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_loadObject

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

#targetObject

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

#validateObject



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