class Batali::Origin::Git
Fetch unit from local path
Public Class Methods
new(args = {})
click to toggle source
Calls superclass method
# File lib/batali/origin/git.rb, line 12 def initialize(args = {}) super self.identifier = Smash.new( :url => url, :ref => ref, :subdirectory => subdirectory, ).checksum unless name? self.name = identifier end end
Public Instance Methods
fetch_repo()
click to toggle source
@return [String] path to repository
# File lib/batali/origin/git.rb, line 49 def fetch_repo memoize(:fetch_repo) do clone_repository ref_dup end end
load_metadata()
click to toggle source
@return [Smash] metadata information
Calls superclass method
# File lib/batali/origin/git.rb, line 39 def load_metadata fetch_repo original_path = path.dup self.path = Utility.path_join(*[path, subdirectory].compact) result = super self.path = original_path result end
units()
click to toggle source
@return [Array<Unit>]
Calls superclass method
# File lib/batali/origin/git.rb, line 25 def units memoize(:g_units) do items = super items.first.source = Source::Git.new( :url => url, :ref => ref, :subdirectory => subdirectory, :cache_path => cache_path, ) items end end