Sha256: 05b716eb59a907b9c1a77e5432ba360871287fd6c6cdbbeaab414f778ce5ee88
Contents?: true
Size: 672 Bytes
Versions: 3
Compression:
Stored size: 672 Bytes
Contents
module RailsCredentialsManager class List < RailsCredentialsManager::Base def perform configs.each do |env, config| puts pastel.green("#{env}:") config.each do |key, value| deep_print_key_and_value(value, [key]) end end end private def deep_print_key_and_value(object, key_path) object.each do |current_key, value| if value.is_a?(Hash) value.each { |k, val| deep_print_key_and_value({k => val}, key_path + [current_key]) } else full_key = (key_path + [current_key]).join(".") print_key_and_value(full_key, value) end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems