Class: Onair::Platform::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/onair/platform/base.rb

Overview

Adapter contract: implement #snapshot returning a Snapshot.

deployed:         the release CURRENTLY RUNNING (nil sha only if
                truly unresolvable)
pending:          newest in-flight build, or nil
latest_built_sha: newest successfully built sha, or nil
succeeded_shas:   recent succeeded build shas, newest first

Adapters own their internal concurrency and auth. Everything above (delta, pinned, mine, rendering) is platform-agnostic and must not reference any specific platform.

Direct Known Subclasses

Heroku

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Base

Returns a new instance of Base.



35
36
37
# File 'lib/onair/platform/base.rb', line 35

def initialize(config)
  @config = config
end

Instance Method Details

#display_nameObject



43
44
45
# File 'lib/onair/platform/base.rb', line 43

def display_name
  self.class.name.split("::").last
end

#snapshotObject

Raises:

  • (NotImplementedError)


39
40
41
# File 'lib/onair/platform/base.rb', line 39

def snapshot
  raise NotImplementedError
end