Class: EySecrets::Update

Inherits:
Struct
  • Object
show all
Includes:
CompositeCommandBuilder
Defined in:
lib/ey_secrets/actions/update.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from CompositeCommandBuilder

#action, #commands

Instance Attribute Details

#applicationObject

Returns the value of attribute application

Returns:

  • (Object)

    the current value of application



2
3
4
# File 'lib/ey_secrets/actions/update.rb', line 2

def application
  @application
end

#optionsObject

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



2
3
4
# File 'lib/ey_secrets/actions/update.rb', line 2

def options
  @options
end

#repositoryObject

Returns the value of attribute repository

Returns:

  • (Object)

    the current value of repository



2
3
4
# File 'lib/ey_secrets/actions/update.rb', line 2

def repository
  @repository
end

Instance Method Details

#buildObject



5
6
7
8
9
10
11
12
# File 'lib/ey_secrets/actions/update.rb', line 5

def build
  repository.assert_ready_for_update

  InstanceResolver.find!(application, options.merge(remotes: repository.remotes)).each do |instance|
    action CopyFiles.new(instance, repository, options)
    action Restart.new(instance, options)
  end
end