lib/locomotive/coal/client.rb in locomotivecms_coal-1.0.0.pre.beta.2 vs lib/locomotive/coal/client.rb in locomotivecms_coal-1.0.0.rc1
- old
+ new
@@ -91,13 +91,13 @@
def uri_path
[self.options[:path_prefix], 'api', 'v3'].join('/')
end
- def prepare_uri(uri)
- uri = "http://#{uri.to_s}" unless uri.to_s =~ /^https?:\/\//
+ def prepare_uri(str)
+ str = "http://#{str.to_s}" unless str.to_s =~ /^https?:\/\//
- URI(uri).tap do |uri|
+ URI(str).tap do |uri|
uri.scheme = 'https' if ssl?
if uri.path == '/' || uri.path.blank?
uri.merge!(uri_path)
end