lib/locomotive/wagon/misc/httparty.rb in locomotivecms_wagon-1.4.0 vs lib/locomotive/wagon/misc/httparty.rb in locomotivecms_wagon-1.5.0.rc1

- old
+ new

@@ -14,9 +14,11 @@ options[:base_uri] = "#{uri.scheme}://#{uri.host}" options[:base_uri] += ":#{uri.port}" if uri.port != 80 path = uri.request_uri options.delete(:format) if options[:format] == 'default' + options[:format] = options[:format].gsub(/[\'\"]/, '').to_sym if options.has_key?(:format) + options[:headers] = { 'User-Agent' => 'LocomotiveCMS' } if options[:with_user_agent] username, password = options.delete(:username), options.delete(:password) options[:basic_auth] = { username: username, password: password } if username path ||= '/' \ No newline at end of file