class EacLauncher::Git::WarpBase

Métodos abstratos:

* source_instance
* source_remote_name
* current_ref

Constants

TARGET_REMOTE

Attributes

instance[R]

Public Class Methods

new(instance) click to toggle source
Calls superclass method EacLauncher::Paths::Real::new
# File lib/eac_launcher/git/warp_base.rb, line 18
def initialize(instance)
  @instance = instance
  cache_git.git.reset_hard(current_ref)
  cache_git.remote(TARGET_REMOTE).url = target_remote_url
  super(path)
end

Protected Instance Methods

cache_git_uncached() click to toggle source
# File lib/eac_launcher/git/warp_base.rb, line 45
def cache_git_uncached
  ::EacLauncher::Git::Base.new(update)
end
path() click to toggle source
# File lib/eac_launcher/git/warp_base.rb, line 37
def path
  instance.cache_path('git_repository')
end
source_git_uncached() click to toggle source
# File lib/eac_launcher/git/warp_base.rb, line 41
def source_git_uncached
  ::EacLauncher::Git::Base.new(source_instance.real)
end
target_remote_url() click to toggle source
# File lib/eac_launcher/git/warp_base.rb, line 49
def target_remote_url
  ::EacLauncher::Vendor::Github.to_ssh_url(source_git.git.remote(source_remote_name).url)
end
update() click to toggle source
# File lib/eac_launcher/git/warp_base.rb, line 29
def update
  ::EacLauncher::Git::MirrorUpdate.new(
    path,
    source_instance.real,
    source_instance.options.git_current_revision
  )
end