Module: ConsulApplicationSettings

Defined in:
lib/consul_application_settings.rb,
lib/consul_application_settings/utils.rb,
lib/consul_application_settings/reader.rb,
lib/consul_application_settings/version.rb,
lib/consul_application_settings/configuration.rb,
lib/consul_application_settings/providers/consul.rb,
lib/consul_application_settings/providers/abstract.rb,
lib/consul_application_settings/providers/local_storage.rb,
lib/consul_application_settings/providers/consul_preloaded.rb

Overview

The gem provides possibility to load settings from Consul and automatically fall back to data stored in file system

Defined Under Namespace

Modules: Providers, Utils Classes: Configuration, Error, Reader

Constant Summary collapse

VERSION =
'3.0.1'.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configObject

Returns the value of attribute config.



15
16
17
# File 'lib/consul_application_settings.rb', line 15

def config
  @config
end

.defaultsObject

Returns the value of attribute defaults.



16
17
18
# File 'lib/consul_application_settings.rb', line 16

def defaults
  @defaults
end

Class Method Details

.configure {|config| ... } ⇒ Object

Yields:



21
22
23
# File 'lib/consul_application_settings.rb', line 21

def self.configure
  yield(config)
end

.load(path = '') ⇒ Object



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

def self.load(path = '')
  Reader.new(path, config)
end