Module: Avm::Patches::EacLauncherGitBase::InstanceMethods

Defined in:
lib/avm/patches/eac_launcher_git_base.rb

Instance Method Summary collapse

Instance Method Details

#command(*args) ⇒ Object



44
45
46
47
# File 'lib/avm/patches/eac_launcher_git_base.rb', line 44

def command(*args)
  args, _options = build_args(args)
  ::EacRubyUtils::Envs.local.command(*args)
end

#dirty?Boolean

Returns:

  • (Boolean)


49
50
51
# File 'lib/avm/patches/eac_launcher_git_base.rb', line 49

def dirty?
  dirty_files.any?
end

#dirty_filesObject



53
54
55
56
57
# File 'lib/avm/patches/eac_launcher_git_base.rb', line 53

def dirty_files
  execute!('status', '--porcelain', '--untracked-files').each_line.map do |line|
    parse_status_line(line.gsub(/\n\z/, ''))
  end
end

#execute(*args) ⇒ Object



39
40
41
42
# File 'lib/avm/patches/eac_launcher_git_base.rb', line 39

def execute(*args)
  args, options = build_args(args)
  ::EacRubyUtils::Envs.local.command(*args).execute(options)
end

#root_pathPathname

Returns:

  • (Pathname)


60
61
62
# File 'lib/avm/patches/eac_launcher_git_base.rb', line 60

def root_path
  @root_path ||= self.class.find_root(to_s)
end