lib/service_skeleton/config.rb in service_skeleton-0.0.0.11.gc1cf3ce vs lib/service_skeleton/config.rb in service_skeleton-0.0.0.13.ga523c90
- old
+ new
@@ -7,14 +7,14 @@
class ServiceSkeleton
class Config
attr_reader :logger, :env
def initialize(env, svc)
- @env = env.to_hash.dup.freeze
@svc = svc
parse_registered_variables(env)
+ @env = env.to_hash.dup.freeze
setup_logger
end
def [](k)
@env[k]
@@ -32,10 +32,10 @@
if var.sensitive?
if env.object_id != ENV.object_id
raise ServiceSkeleton::Error::CannotSanitizeEnvironmentError,
"Attempted to sanitize sensitive variable #{var.name}, but was not passed the ENV object"
end
- env.delete(var.name.to_s)
+ env[var.name.to_s] = "*SENSITIVE*"
end
end
end
def setup_logger