class Litterbox::Habitat::Promote

Habitat upload

Public Class Methods

new(pkg_ident, channel, auth) click to toggle source
# File lib/litterbox/habitat/promote.rb, line 7
def initialize(pkg_ident, channel, auth)
  @pkg_ident = pkg_ident
  @channel = channel
  @auth = auth
end

Public Instance Methods

promote(pkg_ident = @pkg_ident, channel = @channel, auth = @auth) click to toggle source
# File lib/litterbox/habitat/promote.rb, line 13
def promote(pkg_ident = @pkg_ident, channel = @channel, auth = @auth)
  command = "hab pkg promote #{pkg_ident} #{channel} -z #{auth}"
  Open3.popen3(command) do |_, out, _, thr|
    while (line = out.gets)
      puts(line)
    end
    return thr.value
  end
end