Sha256: 20ddff1ec030139b9467e84bb5ab02967e076fb6235348a880f5ff99f28b7365

Contents?: true

Size: 1.06 KB

Versions: 3

Compression:

Stored size: 1.06 KB

Contents

require "ember_cli_deploy_redis/version"
require "ember_cli_deploy_redis/errors"
require "ember_cli_deploy_redis/application"
require "ember_cli_deploy_redis/configuration"
require "ember_cli_deploy_redis/revision"
require "ember_cli_deploy_redis/revision_list"
# require "ostruct"

module EmberCliDeployRedis
  class << self
    def configure
      yield(configuration) if block_given?
    end

    def configuration
      @configuration ||= EmberCliDeployRedis::Configuration.new
    end

    def default_app
      unless configuration.default_app_name
        fail EmberCliDeployRedis::ConfigurationError, 'No default_app_name has been configured.'
      end
      @default_app ||= EmberCliDeployRedis::Application.new(configuration.default_app_name)
    end

    def revisions
      default_app.revisions
    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
      default_app.active_revision
    end
  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.rb
ember_cli_deploy_redis-1.0.1 lib/ember_cli_deploy_redis.rb
ember_cli_deploy_redis-1.0.0 lib/ember_cli_deploy_redis.rb