fog 0.0.97 → 0.0.98
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.
- data/fog.gemspec +1 -1
- data/lib/fog.rb +1 -1
- data/lib/fog/aws/requests/s3/head_object.rb +9 -1
- metadata +2 -2
data/fog.gemspec
CHANGED
|
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
|
7
7
|
## If your rubyforge_project name is different, then edit it and comment out
|
|
8
8
|
## the sub! line in the Rakefile
|
|
9
9
|
s.name = 'fog'
|
|
10
|
-
s.version = '0.0.
|
|
10
|
+
s.version = '0.0.98'
|
|
11
11
|
s.date = '2010-05-14'
|
|
12
12
|
s.rubyforge_project = 'fog'
|
|
13
13
|
|
data/lib/fog.rb
CHANGED
|
@@ -25,7 +25,15 @@ module Fog
|
|
|
25
25
|
# * 'ETag'<~String> - Etag of object
|
|
26
26
|
# * 'Last-Modified'<~String> - Last modified timestamp for object
|
|
27
27
|
def head_object(bucket_name, object_name, options={})
|
|
28
|
-
|
|
28
|
+
unless bucket_name
|
|
29
|
+
raise ArgumentError.new('bucket_name is required')
|
|
30
|
+
end
|
|
31
|
+
unless object_name
|
|
32
|
+
raise ArgumentError.new('object_name is required')
|
|
33
|
+
end
|
|
34
|
+
if version_id = options.delete('versionId')
|
|
35
|
+
query = CGI.escape(version_id)
|
|
36
|
+
end
|
|
29
37
|
headers = {}
|
|
30
38
|
headers['If-Modified-Since'] = options['If-Modified-Since'].utc.strftime("%a, %d %b %Y %H:%M:%S +0000") if options['If-Modified-Since']
|
|
31
39
|
headers['If-Unmodified-Since'] = options['If-Unmodified-Since'].utc.strftime("%a, %d %b %Y %H:%M:%S +0000") if options['If-Modified-Since']
|