lib/chronicle/etl/config.rb in chronicle-etl-0.5.4 vs lib/chronicle/etl/config.rb in chronicle-etl-0.5.5

- old
+ new

@@ -1,5 +1,6 @@ +require "active_support/core_ext/hash/keys" require 'fileutils' require 'yaml' module Chronicle module ETL @@ -19,9 +20,11 @@ # Writes a hash as a yml config file def write(type, identifier, data) base = config_pathname_for_type(type) path = base.join("#{identifier}.yml") + + data.deep_stringify_keys! FileUtils.mkdir_p(File.dirname(path)) File.open(path, 'w', 0o600) do |f| # Ruby likes to add --- separators when writing yaml files f << data.to_yaml.gsub(/^-+\n/, '') end