Sha256: 414cd9bd2278cd2e3e3f28bb3340f82c88fbeb3a2b824711d5cdfc0f0a74b0ba
Contents?: true
Size: 689 Bytes
Versions: 13
Compression:
Stored size: 689 Bytes
Contents
# frozen_string_literal: true module Orchestration module Services module Redis class Configuration include ConfigurationBase self.service_name = 'redis' def enabled? defined?(::Redis) end def friendly_config "[redis] redis://#{host}:#{port}" end def host from_url['host'] || super end def port from_url['port'] || super end private def from_url return {} if @env.redis_url.nil? uri = URI.parse(@env.redis_url) { 'host' => uri.host, 'port' => uri.port || PORT } end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems