Sha256: 2bb2e35652baa1ee0778f0c8e98eb14413acc2cbe06e9eeef96a7352ab9e52b0

Contents?: true

Size: 760 Bytes

Versions: 14

Compression:

Stored size: 760 Bytes

Contents

module Climatic
  module ConfigLayers

    class GlobalLayer < Climatic::ConfigLayers::SystemLayer
      def possible_sources
        [
            ['##SYSTEM_CONFIG_ROOT##', '##PROGRAM_NAME##.##EXTENSION##' ],
            ['##SYSTEM_CONFIG_ROOT##', '##PROGRAM_NAME##', 'config.##EXTENSION##' ],
            ['##SYSTEM_CONFIG_ROOT##', '##PROGRAM_NAME##', '##PROGRAM_NAME##.##EXTENSION##' ]
        ]
      end

      def perform_substitutions(path_part)
        res = path_part.dup
        res.gsub! '##SYSTEM_CONFIG_ROOT##', system_config_root

        exec_name = manager.nil? ? Climatic::LayersManager.default_config_file_base_name : manager.config_file_base_name
        res.gsub! '##PROGRAM_NAME##', exec_name

        res
      end

    end



  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
climatic-0.2.40 lib/climatic/config_layers/global_layer.rb
climatic-0.2.39 lib/climatic/config_layers/global_layer.rb
climatic-0.2.38 lib/climatic/config_layers/global_layer.rb
climatic-0.2.37 lib/climatic/config_layers/global_layer.rb
climatic-0.2.36 lib/climatic/config_layers/global_layer.rb
climatic-0.2.35 lib/climatic/config_layers/global_layer.rb
climatic-0.2.34 lib/climatic/config_layers/global_layer.rb
climatic-0.2.32 lib/climatic/config_layers/global_layer.rb
climatic-0.2.31 lib/climatic/config_layers/global_layer.rb
climatic-0.2.30 lib/climatic/config_layers/global_layer.rb
climatic-0.2.29 lib/climatic/config_layers/global_layer.rb
climatic-0.2.28 lib/climatic/config_layers/global_layer.rb
climatic-0.2.27 lib/climatic/config_layers/global_layer.rb
climatic-0.2.26 lib/climatic/config_layers/global_layer.rb