Class: EmberCliDeployRedis::Application

Inherits:
Object
  • Object
show all
Defined in:
lib/ember_cli_deploy_redis/application.rb

Overview

An application that is deployed and whose revisions can be retrieved.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Application

Returns a new instance of Application.



6
7
8
# File 'lib/ember_cli_deploy_redis/application.rb', line 6

def initialize(name)
  self.name = name
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/ember_cli_deploy_redis/application.rb', line 4

def name
  @name
end

Instance Method Details

#active_revisionObject



20
21
22
# File 'lib/ember_cli_deploy_redis/application.rb', line 20

def active_revision
  EmberCliDeployRedis::Revision.active_from_redis(self)
end

#latest_revisionObject

Deprecated.

use #active_revision instead



15
16
17
18
# File 'lib/ember_cli_deploy_redis/application.rb', line 15

def latest_revision
  warn "[DEPRECATION] `latest_revision` is deprecated, use `active_revision` instead"
  active_revision
end

#revision_by_name(revision_name) ⇒ Object

Returns the Revision specified by name, or nil if nothing matched.



25
26
27
# File 'lib/ember_cli_deploy_redis/application.rb', line 25

def revision_by_name(revision_name)
  revisions.find { |r| r.name == revision_name }
end

#revisionsObject



10
11
12
# File 'lib/ember_cli_deploy_redis/application.rb', line 10

def revisions
  EmberCliDeployRedis::RevisionList.from_redis(self)
end