mirror of
https://github.com/jnunemaker/httparty
synced 2023-03-27 23:23:07 -04:00
Removing memoization
This commit is contained in:
parent
c0fe182ae4
commit
9934d6d120
3 changed files with 3 additions and 3 deletions
|
@ -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']
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue