lib/rubber/environment.rb in rubber-1.2.1 vs lib/rubber/environment.rb in rubber-1.3.0
- old
+ new
@@ -143,17 +143,17 @@
# Forces role/host overrides into config
def bind_config(global)
global = global.clone()
role_overrides = global.delete("roles") || {}
host_overrides = global.delete("hosts") || {}
- roles.to_a.each do |role|
- role_overrides[role].each do |k, v|
+ Array(roles).each do |role|
+ Array(role_overrides[role]).each do |k, v|
global[k] = Environment.combine(global[k], v)
- end if role_overrides[role]
+ end
end
- host_overrides[host].each do |k, v|
+ Array(host_overrides[host]).each do |k, v|
global[k] = Environment.combine(global[k], v)
- end if host_overrides[host]
+ end
return global
end
def method_missing(method_id)
key = method_id.id2name
\ No newline at end of file