Class: R10K::Git::Rugged::Cache

Inherits:
Cache
  • Object
show all
Defined in:
lib/r10k/git/rugged/cache.rb

Constant Summary

Constants included from Logging

Logging::LOG_LEVELS, Logging::SYSLOG_LEVELS_MAP

Instance Attribute Summary

Attributes inherited from Cache

#path, #repo

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Cache

generate, #initialize, instance_cache, #reset!, #sanitized_dirname, #sync, #synced?

Methods included from Logging

add_outputters, debug_formatter, default_formatter, default_outputter, #logger, #logger_name, parse_level

Methods included from Util::Cacheable

default_cachedir, #sanitized_dirname

Methods included from Settings::Mixin

included

Constructor Details

This class inherits a constructor from R10K::Git::Cache

Class Method Details

.bare_repositoryObject



8
9
10
# File 'lib/r10k/git/rugged/cache.rb', line 8

def self.bare_repository
  R10K::Git::Rugged::BareRepository
end

Instance Method Details

#sync!Object

Update the remote URL if the cache differs from the current configuration



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

def sync!
  if cached? && @repo.remotes['origin'] != @remote
    @repo.update_remote(@remote)
  end
  super
end