lib/odania.rb in odania-0.0.16 vs lib/odania.rb in odania-0.0.17

- old
+ new

@@ -2,20 +2,25 @@ require 'diplomat' require 'erubis' require 'fileutils' require 'uri/http' require 'public_suffix' +require 'deep_merge' +require 'json' +require 'socket' BASE_DIR = File.absolute_path File.join File.dirname(__FILE__), '..' ENVIRONMENT = ENV['ENVIRONMENT'].nil? ? 'development' : ENV['ENVIRONMENT'] +LOCAL_TEST_MODE = 'development'.eql?(ENVIRONMENT) module Odania CORE_PLUGIN_NAME = 'odania-core' + autoload :Config, 'odania/config' autoload :Consul, 'odania/consul' + autoload :Erb, 'odania/erb' autoload :Plugin, 'odania/plugin' - autoload :Template, 'odania/template' autoload :Varnish, 'odania/varnish' def self.plugin Odania.configure @plugin = Plugin.new(@consul) if @plugin.nil? @@ -40,8 +45,9 @@ end ips end def self.varnish_sanitize(name) + raise 'Could not sanitize varnish name!!' if name.nil? name.gsub(/[^0-9a-zA-Z_]/, '_') end end