-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add sort to LogFormats to ensure consistency between runs #829
Conversation
@@ -56,7 +56,7 @@ LogFormat "%h %l %u %t \"%r\" %>s %b" common | |||
LogFormat "%{Referer}i -> %U" referer | |||
LogFormat "%{User-agent}i" agent | |||
<% if @log_formats and !@log_formats.empty? -%> | |||
<%- @log_formats.each do |nickname,format| -%> | |||
<%- @log_formats.sort.each do |nickname,format| -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can contract those two lines of if
/ do
into:
<% Hash(@log_formats).sort.each do |nickname, format| -%>
822f791
to
2b605f1
Compare
@igalic I changed it liked you asked to, but is it possible this is a Ruby >= 2.0 only thing? |
@tjikkun If your question concerns the need for sort then no, i have the same problem on "ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]". If your question concerns the patch then possibly, i really don't know enough Ruby to answer that. |
@igalic is "<% Hash(@log_formats).sort.each do |nickname, format| -%>" a Ruby >= 2.0 only thing? |
@tjikkun yeah, that seems to only work on 2.0. Can you go back to your initial change? Sorry for the confusion. |
2b605f1
to
e72fd70
Compare
@mhaskel ok, reverted back to initial patch. Hope it can be merged soon. |
add sort to LogFormats to ensure consistency between runs
Thanks for the contribution @tjikkun |
No description provided.