8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/cloudinary/config.rb', line 8
def load_config_from_env
if ENV["CLOUDINARY_CLOUD_NAME"]
config_keys = ENV.keys.select! { |key| key.start_with? "CLOUDINARY_" }
config_keys -= ["CLOUDINARY_URL"] config_keys.each do |full_key|
conf_key = full_key["CLOUDINARY_".length..-1].downcase conf_val = ENV[full_key]
conf_val = conf_val == 'true' if %w[true false].include?(conf_val) update(conf_key => conf_val)
end
elsif ENV[ENV_URL]
load_from_url(ENV[ENV_URL])
end
end
|