Sha256: 55212a9a77f43c31f5e79430afdcdd0be4aa3b1176faa08b74b7ae6807a7c990
Contents?: true
Size: 905 Bytes
Versions: 1
Compression:
Stored size: 905 Bytes
Contents
require "diplomat" require "dryad/core" require "dryad/consul/config_observer" require "dryad/consul/railtie" if defined?(Rails) require "dryad/consul/version" require "dryad/consul/service_registry" require "dryad/consul/service" require "dryad/consul/key_value_client" require "dryad/consul/config_provider" require "dryad/consul/service_observer" require "erb" module Dryad module Consul class Error < StandardError; end class << self def configure_consul(configuration) consul = configuration.consul if consul[:username].nil? || consul[:password].nil? url = "http://#{consul[:host]}:#{consul[:port]}" else url = "http://#{consul[:username]}:#{ERB::Util.url_encode(consul[:password])}@#{consul[:host]}:#{consul[:port]}" end ::Diplomat.configure do |config| config.url = url end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dryad-consul-1.0.0 | lib/dryad/consul.rb |