Module: Fog::Google::StorageJSON::Utils
Instance Method Summary collapse
- #http_url(params, expires) ⇒ Object
- #https_url(params, expires) ⇒ Object
- #storage_api_base_url_for_universe(universe_domain) ⇒ Object
- #storage_base_url_for_universe(universe_domain) ⇒ Object
- #storage_host_for_universe(universe_domain) ⇒ Object
- #url(params, expires) ⇒ Object
Instance Method Details
#http_url(params, expires) ⇒ Object
9 10 11 |
# File 'lib/fog/google/storage/storage_json/utils.rb', line 9 def http_url(params, expires) "http://#{host_path_query(params, expires)}" end |
#https_url(params, expires) ⇒ Object
13 14 15 |
# File 'lib/fog/google/storage/storage_json/utils.rb', line 13 def https_url(params, expires) "https://#{host_path_query(params, expires)}" end |
#storage_api_base_url_for_universe(universe_domain) ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/fog/google/storage/storage_json/utils.rb', line 22 def storage_api_base_url_for_universe(universe_domain) domain = universe_domain.to_s.strip if !domain.empty? && domain != "googleapis.com" "https://storage.#{domain}/storage/" else Fog::Google::StorageJSON::GOOGLE_STORAGE_JSON_BASE_URL end end |
#storage_base_url_for_universe(universe_domain) ⇒ Object
35 36 37 |
# File 'lib/fog/google/storage/storage_json/utils.rb', line 35 def storage_base_url_for_universe(universe_domain) "https://#{storage_host_for_universe(universe_domain)}/" end |
#storage_host_for_universe(universe_domain) ⇒ Object
31 32 33 |
# File 'lib/fog/google/storage/storage_json/utils.rb', line 31 def storage_host_for_universe(universe_domain) Fog::Google::Storage::Utils.storage_host_for_universe(universe_domain) end |
#url(params, expires) ⇒ Object
17 18 19 20 |
# File 'lib/fog/google/storage/storage_json/utils.rb', line 17 def url(params, expires) Fog::Logger.deprecation("Fog::Google::Storage => #url is deprecated, use #https_url instead [light_black](#{caller.first})[/]") https_url(params, expires) end |