incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francesco Vollero <razor...@gmail.com>
Subject [PATCH core] Modified Initalization of HOSTNAME constant into a more ruby style
Date Fri, 10 Dec 2010 13:23:54 GMT
Minor patch to keep the code ruby-ish
---
 server/server.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/server/server.rb b/server/server.rb
index 9585f9b..f092933 100644
--- a/server/server.rb
+++ b/server/server.rb
@@ -49,7 +49,7 @@ end
 
 # You could use $API_HOST environment variable to change your hostname to
 # whatever you want (eg. if you running API behind NAT)
-HOSTNAME=ENV['API_HOST'] ? ENV['API_HOST'] : nil
+HOSTNAME=ENV['API_HOST'] || nil
 
 error Deltacloud::Validation::Failure do
   report_error(400, "validation_failure")
-- 
1.7.3.3


Mime
View raw message