Skip to content

Commit 49cadf8

Browse files
authored
Merge pull request #310 from nolith/fix-get_object_url
Fix deprecation messages raising ArgumentError
2 parents 4e3454e + 1380eab commit 49cadf8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/fog/storage/google_json/requests/get_object_url.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ class Real
55
# Get an expiring object url from GCS
66
# Deprecated, redirects to get_object_https_url.rb
77
def get_object_url(bucket_name, object_name, expires)
8-
Fog::Logger.deprecation("Fog::Storage::Google => ##{get_object_url} is deprecated, use ##{get_object_https_url} instead[/] [light_black](#{caller(0..0)})")
8+
Fog::Logger.deprecation("Fog::Storage::Google => #get_object_url is deprecated, use #get_object_https_url instead[/] [light_black](#{caller(0..0)})")
99
get_object_https_url(bucket_name, object_name, expires)
1010
end
1111
end
1212

1313
class Mock # :nodoc:all
1414
def get_object_url(bucket_name, object_name, expires)
15-
Fog::Logger.deprecation("Fog::Storage::Google => ##{get_object_url} is deprecated, use ##{get_object_https_url} instead[/] [light_black](#{caller(0..0)})")
15+
Fog::Logger.deprecation("Fog::Storage::Google => #get_object_url is deprecated, use #get_object_https_url instead[/] [light_black](#{caller(0..0)})")
1616
get_object_https_url(bucket_name, object_name, expires)
1717
end
1818
end

lib/fog/storage/google_xml/requests/get_object_url.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ class Real
1414
# * body<~String> - url for object
1515

1616
def get_object_url(bucket_name, object_name, expires)
17-
Fog::Logger.deprecation("Fog::Storage::Google => ##{get_object_url} is deprecated, use ##{get_object_https_url} instead[/] [light_black](#{caller.first})")
17+
Fog::Logger.deprecation("Fog::Storage::Google => #get_object_url is deprecated, use #get_object_https_url instead[/] [light_black](#{caller(1..1).first})")
1818
get_object_https_url(bucket_name, object_name, expires)
1919
end
2020
end
2121

2222
class Mock # :nodoc:all
2323
def get_object_url(bucket_name, object_name, expires)
24-
Fog::Logger.deprecation("Fog::Storage::Google => ##{get_object_url} is deprecated, use ##{get_object_https_url} instead[/] [light_black](#{caller.first})")
24+
Fog::Logger.deprecation("Fog::Storage::Google => #get_object_url is deprecated, use #get_object_https_url instead[/] [light_black](#{caller(1..1).first})")
2525
get_object_https_url(bucket_name, object_name, expires)
2626
end
2727
end

0 commit comments

Comments
 (0)