lib/rubber/environment.rb
def bind_config(global)
          global = global.clone()
          role_overrides = global.delete("roles") || {}
          env_overrides = global.delete("environments") || {}
          host_overrides = global.delete("hosts") || {}

          Array(roles).each do |role|
            Array(role_overrides[role]).each do |k, v|
              global[k] = Environment.combine(global[k], v)
            end
          end

          Array(env_overrides[env]).each do |k, v|
            global[k] = Environment.combine(global[k], v)
          end

          Array(host_overrides[host]).each do |k, v|
            global[k] = Environment.combine(global[k], v)
          end

          global
        end
# Forces role/host overrides into config
Forces role/host overrides into config
Forces role / host overrides into config
def bind_config(global)
          global = global.clone()
          role_overrides = global.delete("roles") || {}
          env_overrides = global.delete("environments") || {}
          host_overrides = global.delete("hosts") || {}
          Array(roles).each do |role|
            Array(role_overrides[role]).each do |k, v|
              global[k] = Environment.combine(global[k], v)
            end
          end
          Array(env_overrides[env]).each do |k, v|
            global[k] = Environment.combine(global[k], v)
          end
          Array(host_overrides[host]).each do |k, v|
            global[k] = Environment.combine(global[k], v)
          end
          global
        end
def bind_config ( global ) global = global . clone ( ) role_overrides = global . delete ( "roles" ) || { } env_overrides = global . delete ( "environments" ) || { } host_overrides = global . delete ( "hosts" ) || { } Array ( roles ) . each do | role | Array ( role_overrides [ role ] ) . each do | k , v | global [ k ] = Environment . combine ( global [ k ] , v ) end end Array ( env_overrides [ env ] ) . each do | k , v | global [ k ] = Environment . combine ( global [ k ] , v ) end Array ( host_overrides [ host ] ) . each do | k , v | global [ k ] = Environment . combine ( global [ k ] , v ) end global end
Forces role/host overrides into config
Forces role / host overrides into config
global