Class: Tebako::PackageCommand

Inherits:
Thor
  • Object
show all
Defined in:
lib/tebako/build_commands.rb

Overview

tebako package format inspection command group.

Instance Method Summary collapse

Instance Method Details

#inspect(path) ⇒ Object



300
301
302
303
304
# File 'lib/tebako/build_commands.rb', line 300

def inspect(path)
  render(package_inspection(path).to_h)
rescue ArgumentError, SystemCallError => e
  raise Thor::Error, e.message
end

#verify(path) ⇒ Object



307
308
309
310
311
312
313
# File 'lib/tebako/build_commands.rb', line 307

def verify(path)
  inspection = package_inspection(path)
  render("valid" => true, "package" => inspection.to_h)
rescue ArgumentError, SystemCallError => e
  render("valid" => false, "error" => e.message)
  raise Thor::Error, e.message
end