1
0
Fork 0
mirror of https://github.com/jnunemaker/httparty synced 2023-03-27 23:23:07 -04:00

Removing memoization

This commit is contained in:
Lucas Uyezu 2013-10-09 18:15:35 -03:00
parent c0fe182ae4
commit 9934d6d120
3 changed files with 3 additions and 3 deletions

View file

@ -11,7 +11,7 @@ module HTTParty
end
def format(request, response)
@current_time ||= Time.new.strftime("%Y-%m-%d %H:%M:%S.%L %z")
@current_time = Time.new.strftime("%Y-%m-%d %H:%M:%S %z")
http_method = request.http_method.name.split("::").last.upcase
path = request.path.to_s
content_length = response['Content-Length']

View file

@ -12,7 +12,7 @@ module HTTParty
def format(request, response)
@messages = []
@current_time ||= Time.new.strftime("%Y-%m-%d %H:%M:%S %z")
@current_time = Time.new.strftime("%Y-%m-%d %H:%M:%S %z")
http_method = request.http_method.name.split("::").last.upcase
path = request.path.to_s

View file

@ -3,7 +3,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'spec_hel
describe HTTParty::Logger::ApacheLogger do
describe "#format" do
it "formats a response in a style that resembles apache's access log" do
request_time = Time.new.strftime("%Y-%m-%d %H:%M:%S.%L %z")
request_time = Time.new.strftime("%Y-%m-%d %H:%M:%S %z")
log_message = "[HTTParty] [#{request_time}] 302 \"GET http://my.domain.com/my_path\" - "
request_double = double(