mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-22 13:33:52 +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/HashConversion:
|
||||
Enabled: false
|
||||
|
||||
Style/QuotedSymbols:
|
||||
Enabled: false
|
||||
|
||||
|
@ -249,7 +249,7 @@ class InstanceCache
|
||||
def select_vms
|
||||
vms = []
|
||||
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]
|
||||
vms << vm
|
||||
end
|
||||
|
@ -484,7 +484,7 @@ module OneCfg::Config::Type
|
||||
elsif value.is_a?(Array)
|
||||
value.collect {|v| unsymbolize(v) }
|
||||
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
|
||||
value
|
||||
end
|
||||
@ -505,7 +505,7 @@ module OneCfg::Config::Type
|
||||
elsif value.is_a?(Array)
|
||||
value.collect {|v| symbolize(v) }
|
||||
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
|
||||
value
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user