Class: Binpkgbot::Tasks::Upgrade

Inherits:
Base
  • Object
show all
Includes:
Concern::Emerge
Defined in:
lib/binpkgbot/tasks/upgrade.rb

Instance Attribute Summary

Attributes inherited from Base

#config, #options

Instance Method Summary collapse

Methods included from Concern::Emerge

#emerge, #emerge_runner

Methods inherited from Base

#execute, #initialize

Constructor Details

This class inherits a constructor from Binpkgbot::Tasks::Base

Instance Method Details

#runObject



9
10
11
12
13
14
15
16
# File 'lib/binpkgbot/tasks/upgrade.rb', line 9

def run
  name = @options[:name] || @options[:atom]
  unless name
    raise ArgumentError, "upgrade task is missing :name -- what to upgrade? e.g. @world"
  end

  emerge(name, '-uDN', ephemeral: @options.key?(:persist) ? !@options[:persist] : false)
end