Class: CapistranoNomadDockerPushImageInteractionHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/capistrano/nomad/helpers/docker.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ CapistranoNomadDockerPushImageInteractionHandler

Returns a new instance of CapistranoNomadDockerPushImageInteractionHandler.



2
3
4
# File 'lib/capistrano/nomad/helpers/docker.rb', line 2

def initialize(*args)
  @last_digest = nil
end

Instance Method Details

#last_digestObject



12
13
14
# File 'lib/capistrano/nomad/helpers/docker.rb', line 12

def last_digest
  @last_digest
end

#on_data(_command, stream_name, data, channel) ⇒ Object



6
7
8
9
10
# File 'lib/capistrano/nomad/helpers/docker.rb', line 6

def on_data(_command, stream_name, data, channel)
  if (match = data.match(/digest: ([^\s]+)/))
    @last_digest = match[1]
  end
end