lib/configliere/config_file.rb in configliere-0.0.2 vs lib/configliere/config_file.rb in configliere-0.0.3
- old
+ new
@@ -1,6 +1,7 @@
require 'yaml'
+require 'fileutils'
module Configliere
#
# ConfigFile -- load configuration from a simple YAML file
#
module ConfigFile
@@ -34,13 +35,14 @@
protected
# form suitable for serialization to disk
# (e.g. the encryption done in configliere/encrypted)
def export
- to_hash
+ super.to_hash
end
def self.write_yaml_file filename, hsh
+ FileUtils.mkdir_p(File.dirname(filename))
File.open(filename, 'w'){|f| f << YAML.dump(hsh) }
end
def self.merge_into_yaml_file filename, handle, params
begin