Skip to content

Commit

Permalink
Removing memoization
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasuyezu committed Oct 9, 2013
1 parent c0fe182 commit 9934d6d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/httparty/logger/apache_logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def initialize(logger, level)
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']
Expand Down
2 changes: 1 addition & 1 deletion lib/httparty/logger/curl_logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def initialize(logger, level)

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

Expand Down
2 changes: 1 addition & 1 deletion spec/httparty/logger/apache_logger_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
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(
Expand Down

0 comments on commit 9934d6d

Please sign in to comment.