Sha256: 0ac190094df31ad3064ecb6fcdfe12130fa1b9fb810e6083eefc004601d83105
Contents?: true
Size: 1.05 KB
Versions: 6
Compression:
Stored size: 1.05 KB
Contents
module Vx module Builder class BuildConfiguration class Deploy attr_reader :attributes def initialize(new_env) normalize_attributes(new_env) end def providers @providers end alias :attributes :providers private def normalize_attributes(new_env) attrs = case new_env when Array new_env when Hash [new_env] when String [{"command" => new_env}] else [] end extract_options_and_normalize_items(attrs) end def extract_options_and_normalize_items(new_env) @providers = [] new_env.each do |env| case when env["provider"] @providers.push env when env["command"] @providers.push env.merge("provider" => "shell") end end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems