duritong / puppet-trocla

puppet integration for trocla
11 stars 18 forks source link

sort encryption options #11

Closed timogoebel closed 9 years ago

timogoebel commented 9 years ago

... we should sort the hash keys so that the file does not change every single puppet run. :-)

duritong commented 9 years ago

Afair we need to sort on the keys, as sort on a hash on 1.8 doesb't do what you expect it to do.

timogoebel commented 9 years ago

@duritong : What would you prefer instead?

<% @adapter_options.sort_by {|key, value| key}.each do |key,value| -%>

duritong commented 9 years ago

Or just like @adapter_options.keys.sort.each{|k| @adapter_options[k] }

timogoebel commented 9 years ago

Thanks, @duritong ! I updated the code. What do you think?

duritong commented 9 years ago

Thanks! Lgtm