Class: Suppository::AddCommand
- Inherits:
-
Object
- Object
- Suppository::AddCommand
- Includes:
- Logger
- Defined in:
- lib/suppository/add_command.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ AddCommand
constructor
A new instance of AddCommand.
- #run ⇒ Object
Methods included from Logger
log_error, log_info, log_success, log_verbose
Constructor Details
#initialize(args) ⇒ AddCommand
Returns a new instance of AddCommand.
16 17 18 19 20 21 22 |
# File 'lib/suppository/add_command.rb', line 16 def initialize(args) @unsigned = parse_params(args) @repository = Suppository::Repository.new(args[0]) @dist = args[1] @component = args[2] @debs = Dir.glob(args[3]) end |
Instance Method Details
#run ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/suppository/add_command.rb', line 24 def run assert_repository_exists assert_dist_exists assert_component_exists @debs.each { |deb| add_deb Suppository::Checksummed.new(deb) } Suppository::Release.new(@repository.path, @dist, @unsigned).create end |