lib/keen/client.rb in keen-0.7.4 vs lib/keen/client.rb in keen-0.7.5
- old
+ new
@@ -87,11 +87,11 @@
def ensure_read_key!
raise ConfigurationError, "Read Key must be set for queries" unless self.read_key
end
def api_event_collection_resource_path(event_collection)
- "/#{api_version}/projects/#{project_id}/events/#{URI.escape(event_collection.to_s)}"
+ "/#{api_version}/projects/#{project_id}/events/#{CGI.escape(event_collection.to_s)}"
end
def preprocess_params(params)
if params.key?(:filters)
params[:filters] = MultiJson.encode(params[:filters])
@@ -109,10 +109,10 @@
params[:timeframe] = MultiJson.encode(params[:timeframe])
end
query_params = ""
params.each do |param, value|
- query_params << "#{param}=#{URI.escape(value)}&"
+ query_params << "#{param}=#{CGI.escape(value)}&"
end
query_params.chop!
query_params
end