Class: Alchemy::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/alchemy/config.rb

Class Method Summary collapse

Class Method Details

.deprecated_configsObject

A list of deprecated configuration values a value of nil means there is no new default any not nil value is the new default



34
35
36
# File 'lib/alchemy/config.rb', line 34

def deprecated_configs
  {}
end

.get(name) ⇒ Object Also known as: parameter

Returns the configuration for given parameter name.

Parameters:

  • name (String)


10
11
12
13
14
# File 'lib/alchemy/config.rb', line 10

def get(name)
  check_deprecation(name)
  key = check_replacement(name)
  show[key.to_s]
end

.replaced_config_keysObject

A list of replaced configuration keys



39
40
41
42
43
# File 'lib/alchemy/config.rb', line 39

def replaced_config_keys
  {
    output_image_quality: :output_image_jpg_quality
  }
end

.showObject

Returns a merged configuration of the following files

Alchemys default config: gems/../alchemy_cms/config/alchemy/config.yml Your apps default config: your_app/config/alchemy/config.yml Environment specific config: your_app/config/alchemy/development.config.yml

An environment specific config overwrites the settings of your apps default config, while your apps default config has precedence over Alchemys default config.



27
28
29
# File 'lib/alchemy/config.rb', line 27

def show
  @config ||= merge_configs!(alchemy_config, main_app_config, env_specific_config)
end