lib/milc/gcloud/compute/firewall_rules.rb in milc-0.1.0 vs lib/milc/gcloud/compute/firewall_rules.rb in milc-0.1.1
- old
+ new
@@ -1,9 +1,11 @@
# coding: utf-8
require "milc/gcloud/compute"
+require 'active_support/core_ext/array/wrap'
+
module Milc
module Gcloud
module Compute
module FirewallRules
def compare(attrs, res)
@@ -23,10 +25,10 @@
}.tap(&:flatten!).sort
{
:sourceRanges => :source_ranges,
:targetTags => :target_tags,
}.each do |k1, k2|
- res[k2] = res[k1] ? res[k1].sort : nil
+ res[k2] = res[k1] ? Array.wrap(res[k1]).sort : nil
end
super(attrs, res)
end
def call_update(cmd_args, attrs, &block)