Sha256: 408dc82692b5a0cb647f351801c252a1857d0a03447e4df0613d8d1d96cc4365

Contents?: true

Size: 792 Bytes

Versions: 3

Compression:

Stored size: 792 Bytes

Contents

module EmberCliDeployRedis
  # An application that is deployed and whose revisions can be retrieved.
  class Application
    attr_reader :name

    def initialize(name)
      self.name = name
    end

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

    # @deprecated use {#active_revision} instead
    def latest_revision
      warn "[DEPRECATION] `latest_revision` is deprecated, use `active_revision` instead"
      active_revision
    end

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

    # Returns the Revision specified by name, or nil if nothing matched.
    def revision_by_name(revision_name)
      revisions.find { |r| r.name == revision_name }
    end

    private

    attr_writer :name
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ember_cli_deploy_redis-1.0.2 lib/ember_cli_deploy_redis/application.rb
ember_cli_deploy_redis-1.0.1 lib/ember_cli_deploy_redis/application.rb
ember_cli_deploy_redis-1.0.0 lib/ember_cli_deploy_redis/application.rb