Class: R10K::Module::Git

Inherits:
R10K::Module show all
Defined in:
lib/r10k/module/git.rb

Instance Attribute Summary

Attributes inherited from R10K::Module

#name, #path

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from R10K::Module

#full_path, inherited, new

Constructor Details

#initialize(name, path, args) ⇒ Git

Returns a new instance of Git.



13
14
15
16
17
18
# File 'lib/r10k/module/git.rb', line 13

def initialize(name, path, args)
  super

  @remote = @args[:git]
  @ref    = (@args[:ref] || 'master')
end

Class Method Details

.implements(name, args) ⇒ Object



7
8
9
10
11
# File 'lib/r10k/module/git.rb', line 7

def self.implements(name, args)
  args.is_a? Hash and args.has_key?(:git)
rescue
  false
end

Instance Method Details

#sync!(options = {}) ⇒ Object



20
21
22
23
# File 'lib/r10k/module/git.rb', line 20

def sync!(options = {})
  synchro = R10K::Synchro::Git.new(@remote)
  synchro.sync(full_path, @ref, options)
end