module EacLauncher::Git::Base::Underlying

Public Instance Methods

execute!(*args) click to toggle source
# File lib/eac_launcher/git/base/underlying.rb, line 11
def execute!(*args)
  args, options = build_args(args)
  ::EacRubyUtils::Envs.local.command(*args).execute!(options)
end
init() click to toggle source
# File lib/eac_launcher/git/base/underlying.rb, line 21
def init
  git
  self
end
system!(*args) click to toggle source
# File lib/eac_launcher/git/base/underlying.rb, line 16
def system!(*args)
  args, options = build_args(args)
  ::EacRubyUtils::Envs.local.command(*args).system!(options)
end

Private Instance Methods

build_args(args) click to toggle source
# File lib/eac_launcher/git/base/underlying.rb, line 28
def build_args(args)
  options = {}
  if args.last.is_a?(Hash)
    options = args.last
    args.pop
  end
  args = args.first if args.first.is_a?(Array)
  [['git', '-C', self, '--no-pager'] + args, options]
end
git_uncached() click to toggle source
# File lib/eac_launcher/git/base/underlying.rb, line 38
def git_uncached
  FileUtils.mkdir_p(self)
  if File.exist?(subpath('.git'))
    ::Git.open(self)
  else
    ::Git.init(self)
  end
end