Class: Ehbrs::Tools::Vg::Patches::BaseApplier

Inherits:
Object
  • Object
show all
Defined in:
lib/ehbrs/tools/vg/patches/base_applier.rb

Direct Known Subclasses

IpsApplier, VcdiffApplier

Instance Method Summary collapse

Instance Method Details

#apply(source_path, output_path) ⇒ Object

Parameters:

  • source_path (Pathname)
  • output_path (Pathname)

Raises:

  • (RuntimeError)

    Se o arquivo de saída não é criado.



16
17
18
19
20
21
22
23
24
25
# File 'lib/ehbrs/tools/vg/patches/base_applier.rb', line 16

def apply(source_path, output_path)
  source_path = source_path.to_pathname
  output_path = output_path.to_pathname
  command(source_path, output_path).system!

  return if output_path.exist?

  fatal_error("Applier returned without error, but output file \"#{output_path}\"" \
              'does not exist')
end

#command(source_path, output_path) ⇒ EacRubyUtils::Envs::Command

Parameters:

  • source_path (Pathname)
  • output_path (Pathname)

Returns:

  • (EacRubyUtils::Envs::Command)


30
31
32
# File 'lib/ehbrs/tools/vg/patches/base_applier.rb', line 30

def command(source_path, output_path)
  raise_abstract_method __method__, source_path, output_path
end