Skip to content

Commit

Permalink
Merge pull request #963 from mbelscher/master
Browse files Browse the repository at this point in the history
Minor change to map.erb to work with Ruby 1.8.7
  • Loading branch information
wyardley authored Nov 4, 2016
2 parents 0210c96 + 5c86bc7 commit a4b630a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/conf.d/map.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ map <%= @string %> $<%= @name %> {
<%- end -%>
<% end -%>
<% if @mappings.is_a?(Array) -%>
<%- field_width = @mappings.inject(0) { |l,(h)| h['key'].size > l ? h['key'].size : l } -%>
<%- field_width = @mappings.inject(0) { |l,h| h['key'].size > l ? h['key'].size : l } -%>
<%- @mappings.each do |h| -%>
<%= sprintf("%-*s", field_width, h['key']) %> <%= h['value'] %>;
<%- end -%>
Expand Down

0 comments on commit a4b630a

Please sign in to comment.