lib/rubber/environment.rb in rubber-2.7.5 vs lib/rubber/environment.rb in rubber-2.8.0
- old
+ new
@@ -1,10 +1,9 @@
require 'yaml'
require 'socket'
require 'delegate'
require 'monitor'
-require 'rubber/encryption'
module Rubber
module Configuration
# Contains the configuration defined in rubber.yml
@@ -53,9 +52,11 @@
bound = bind()
@config_secret = bound.rubber_secret
if @config_secret
obfuscation_key = bound.rubber_secret_key
if obfuscation_key
+ require 'rubber/encryption'
+
read_config(@config_secret) do |data|
Rubber::Encryption.decrypt(data, obfuscation_key)
end
else
read_config(@config_secret)