upyun-rb 0.0.10 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,19 @@ module Upyun
14
14
  end
15
15
  end
16
16
 
17
+ def head(path)
18
+ uri = "/#{@bucket}/#{path}"
19
+ date = Upyun::Util.current_date
20
+ sign = Digest::MD5.hexdigest("HEAD&#{uri}&#{date}&0&#{@signed_password}")
21
+
22
+ @connection.head do |req|
23
+ req.url uri
24
+ req.headers['Authorization'] = "UpYun #{@operator}:#{sign}"
25
+ req.headers['Date'] = date
26
+ req.headers['Expect'] = ''
27
+ end
28
+ end
29
+
17
30
  def put(path, file)
18
31
  uri = "/#{@bucket}/#{path}"
19
32
  date = Upyun::Util.current_date
@@ -1,3 +1,3 @@
1
1
  module Upyun
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.14"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: upyun-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: