Sha256: 1de3c793500d0046895e8e76905ec16a03159593e27c396f22ea08e306855c99
Contents?: true
Size: 1.18 KB
Versions: 1
Compression:
Stored size: 1.18 KB
Contents
module Pione module Command # PioneUpdatePackageInfo is a command definition of "pione # update-package-info". class PioneUpdatePackageInfo < BasicCommand # # basic informations # command_name "pione update-package-info" command_banner "update package info files" PioneCommand.add_subcommand("update-package-info", self) # # options # use_option :color use_option :debug define_option(:force) do |item| item.long = "--force" item.desc = "update pacakge info files" item.value = lambda {|b| b} end # # command lifecycle: setup phase # setup :target # Check archiver target location. def setup_target abort("There are no PIONE documents or packages.") if @argv.first.nil? @target = @argv.first end # # command lifecycle: execution phase # execute :update # Update pacakge info files. def execute_update Package::PackageHandler.write_info_files(Location[@target], force: option[:force]) rescue Package::InvalidScenario => e abort(e.message) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pione-0.3.2 | lib/pione/command/pione-update-package-info.rb |