lib/kafo/configuration.rb in kafo-0.0.4 vs lib/kafo/configuration.rb in kafo-0.0.5

- old
+ new

@@ -8,11 +8,11 @@ def self.application_config_file File.join(Dir.pwd, 'config/kafo.yaml') end def self.save_configuration(configuration) - File.write(application_config_file, YAML.dump(configuration)) + File.open(application_config_file, 'w') { |file| file.write(YAML.dump(configuration)) } end def self.configure_application begin configuration = YAML.load_file(application_config_file) @@ -89,10 +89,10 @@ def gem_root_path @gem_root_path ||= File.join(File.dirname(__FILE__), '../../') end def store(data) - File.write(config_file, config_header + YAML.dump(data)) + File.open(config_file, 'w') { |file| file.write(config_header + YAML.dump(data)) } end private def includes