mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-11 05:17:41 +03:00
L #-: Revert to_h changes
not compatible with ruby 2.0.0/centos7
(cherry picked from commit 1711fac8e1
)
This commit is contained in:
parent
a369885f13
commit
91ef3d0fe9
@ -560,6 +560,9 @@ Layout/MultilineOperationIndentation:
|
|||||||
# STYLE
|
# STYLE
|
||||||
#######
|
#######
|
||||||
|
|
||||||
|
Style/HashConversion:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
Style/QuotedSymbols:
|
Style/QuotedSymbols:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ class InstanceCache
|
|||||||
def select_vms
|
def select_vms
|
||||||
vms = []
|
vms = []
|
||||||
execute_retry('SELECT * from vms').each do |vm|
|
execute_retry('SELECT * from vms').each do |vm|
|
||||||
vm = [:uuid, :id, :name, :state, :type].zip(vm).to_h
|
vm = Hash[[:uuid, :id, :name, :state, :type].zip(vm)]
|
||||||
vm[:deploy_id] = vm[:uuid]
|
vm[:deploy_id] = vm[:uuid]
|
||||||
vms << vm
|
vms << vm
|
||||||
end
|
end
|
||||||
|
@ -484,7 +484,7 @@ module OneCfg::Config::Type
|
|||||||
elsif value.is_a?(Array)
|
elsif value.is_a?(Array)
|
||||||
value.collect {|v| unsymbolize(v) }
|
value.collect {|v| unsymbolize(v) }
|
||||||
elsif value.is_a?(Hash)
|
elsif value.is_a?(Hash)
|
||||||
value.collect {|k, v| [unsymbolize(k), unsymbolize(v)] }.to_h
|
Hash[value.collect {|k, v| [unsymbolize(k), unsymbolize(v)] }]
|
||||||
else
|
else
|
||||||
value
|
value
|
||||||
end
|
end
|
||||||
@ -505,7 +505,7 @@ module OneCfg::Config::Type
|
|||||||
elsif value.is_a?(Array)
|
elsif value.is_a?(Array)
|
||||||
value.collect {|v| symbolize(v) }
|
value.collect {|v| symbolize(v) }
|
||||||
elsif value.is_a?(Hash)
|
elsif value.is_a?(Hash)
|
||||||
value.collect {|k, v| [symbolize(k), symbolize(v)] }.to_h
|
Hash[value.collect {|k, v| [symbolize(k), symbolize(v)] }]
|
||||||
else
|
else
|
||||||
value
|
value
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user