From efec7d914a7df081a0677c40f8c19b49b94024e4 Mon Sep 17 00:00:00 2001 From: amartynov Date: Mon, 10 Aug 2015 15:10:35 +0300 Subject: [PATCH] default devops_dir --- devops-service/core/devops-config.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/devops-service/core/devops-config.rb b/devops-service/core/devops-config.rb index b40466d..2e16dba 100644 --- a/devops-service/core/devops-config.rb +++ b/devops-service/core/devops-config.rb @@ -11,13 +11,15 @@ class DevopsConfig if config_file.nil? config_file = ENV['DEVOPS_CONFIG'] || ENV['CONFIG'] || File.join(File.dirname(__FILE__), '../config.rb') end - config = {:url_prefix => ""} + config = { + :url_prefix => "", + :devops_dir => File.join(ENV["HOME"], ".devops") + } if File.exists? config_file eval File.read config_file else raise "No config file '#{config_file}' found" end - config[:devops_dir] = File.join(ENV["HOME"], ".devops") if config[:devops_dir].nil? addr = first_public_ipv4 || first_private_ipv4 config[:address] = if addr.nil? "localhost"