Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Fix #437 #440

Merged
merged 2 commits into from
May 17, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions deploy/lib/server_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,27 @@ def get_properties
end

def info
logger.info "IS_JAR: #{@@is_jar}"
logger.info "Properties:"
@properties.sort {|x,y| y <=> x}.each do |k, v|
logger.info k + ": " + v
format = find_arg(['--format'])
info = {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can move this variable (info) inside the if, otherwise clean and simple.

info["isJar"] = @@is_jar
info["properties"] = @properties
if format == "json"
logger.info "#{JSON.pretty_generate(info)}"
elsif format == "xml"
logger.info "<info>"
logger.info "\s\s<isJar>#{@@is_jar}</isJar>"
logger.info "\s\s<properties>"
@properties.sort {|x,y| y <=> x}.each do |k, v|
logger.info "\s\s\s\s<property name=\"#{k}\">#{v}</property>"
end
logger.info "\s\s</properties>"
logger.info "</info>"
else
logger.info "IS_JAR: #{@@is_jar}"
logger.info "Properties:"
@properties.sort {|x,y| y <=> x}.each do |k, v|
logger.info k + ": " + v
end
end
return true
end
Expand Down