lib/fog/aliyun/requests/compute/create_vpc.rb in fog-aliyun-0.3.19 vs lib/fog/aliyun/requests/compute/create_vpc.rb in fog-aliyun-0.4.0

- old
+ new

@@ -1,7 +1,9 @@ # frozen_string_literal: true +require 'addressable' + module Fog module Compute class Aliyun class Real def create_vpc(cidrBlock, options = {}) @@ -13,10 +15,10 @@ parameters = defaultParameters(action, sigNonce, time) pathUrl = defaultAliyunUri(action, sigNonce, time) parameters['CidrBlock'] = cidrBlock pathUrl += '&CidrBlock=' - pathUrl += URI.encode(cidrBlock, '/[^!*\'()\;?:@#&%=+$,{}[]<>`" ') + pathUrl += Addressable::URI.encode_component(cidrBlock, Addressable::URI::CharacterClasses::UNRESERVED + '|') name = options[:name] desc = options[:description] if name