Sha256: adf65c53cc25e43ff33919fd7efbbb48bfe02e5026752249c4be8f8f6b9b3f24

Contents?: true

Size: 874 Bytes

Versions: 2

Compression:

Stored size: 874 Bytes

Contents

class Ey::Core::Client::Deployment < Ey::Core::Model
  extend Ey::Core::Associations

  identity :id, type: :integer

  attribute :commit
  attribute :finished_at,    type: :time
  attribute :migrate,        type: :boolean
  attribute :migrate_command
  attribute :ref
  attribute :resolved_ref
  attribute :serverside_version
  attribute :started_at,     type: :time
  attribute :successful,     type: :boolean
  attribute :verbose
  attribute :streaming
  attribute :request_url, aliases: :request

  has_one :account
  has_one :environment
  has_one :application
  has_one :user

  def request
    self.request_url && self.connection.requests.get(self.request_url.split("/").last)
  end

  def timeout(message=nil)
    merge_attributes(self.connection.timeout_deployment("id" => self.id, "message" => message).body["deployment"])
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ey-core-3.6.6 lib/ey-core/models/deployment.rb
ey-core-3.6.5 lib/ey-core/models/deployment.rb