lib/fog/aliyun/requests/storage/head_object.rb in fog-aliyun-0.1.0 vs lib/fog/aliyun/requests/storage/head_object.rb in fog-aliyun-0.2.0

- old
+ new

@@ -5,29 +5,29 @@ # Get headers for object # # ==== Parameters # * object<~String> - Name of object to look for # - def head_object(object, options={}) + def head_object(object, options = {}) bucket = options[:bucket] bucket ||= @aliyun_oss_bucket location = get_bucket_location(bucket) - endpoint = "http://"+location+".aliyuncs.com" - resource = bucket+'/'+object + endpoint = 'http://' + location + '.aliyuncs.com' + resource = bucket + '/' + object ret = request( - :expects => [200, 404], - :method => 'HEAD', - :path => object, - :bucket => bucket, - :resource => resource, - :endpoint => endpoint + expects: [200, 404], + method: 'HEAD', + path: object, + bucket: bucket, + resource: resource, + endpoint: endpoint ) - return ret + ret end end class Mock - def head_object(object, options={}) + def head_object(object, options = {}) end end end end end