Module: DockerSync::ConfigSerializer

Defined in:
lib/docker-sync/config/config_serializer.rb

Class Method Summary collapse

Class Method Details

.default_deserializer_file(config_path) ⇒ Object

Returns a Yaml hashmap, expaneded by ENV vars

Parameters:

  • config_path (String)

    path to the yaml configuration to load

Returns:

  • (Object)

    returns a Yaml hashmap, expaneded by ENV vars



9
10
11
12
# File 'lib/docker-sync/config/config_serializer.rb', line 9

def default_deserializer_file(config_path)
  config_string = File.read(config_path)
  default_deserializer_string(config_string)
end

.default_deserializer_string(config_string) ⇒ Object

Returns a yaml hashmap.

Parameters:

  • config_string (String)

    the configuration string inf yaml format

Returns:

  • (Object)

    a yaml hashmap



16
17
18
# File 'lib/docker-sync/config/config_serializer.rb', line 16

def default_deserializer_string(config_string)
  deserialize_config( expand_env_variables(config_string) )
end