Skip to content

Commit

Permalink
Merge pull request #411 from criteo-forks/fix_410
Browse files Browse the repository at this point in the history
Properly sort consul configuration
  • Loading branch information
legal90 committed Feb 9, 2017
2 parents 558baf3 + b9f7fe5 commit 82fac06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libraries/consul_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def to_json
config = to_hash.keep_if do |k, _|
for_keeps.include?(k.to_sym)
end.merge(options)
JSON.pretty_generate(Hash[config.sort], quirks_mode: true)
JSON.pretty_generate(Hash[config.sort_by { |k, _| k.to_s }], quirks_mode: true)
end

def tls?
Expand Down
2 changes: 1 addition & 1 deletion libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def nssm_service_installed?
# 1 is command not found
# 3 is service not found
exit_code = shell_out!(%("#{nssm_exe}" status consul), returns: [0, 1, 3]).exitstatus
exit_code.zero?
exit_code == 0
end

def nssm_service_status?(expected_status)
Expand Down

0 comments on commit 82fac06

Please sign in to comment.