lib/kafo/configuration.rb in kafo-0.0.12 vs lib/kafo/configuration.rb in kafo-0.0.13

- old
+ new

@@ -15,12 +15,13 @@ :installer_dir => '.', :modules_dir => './modules', :default_values_dir => '/tmp' } - def initialize(file) + def initialize(file, persist = true) @config_file = file + @persist = persist configure_application @logger = Logging.logger.root @answer_file = app[:answer_file] begin @@ -32,9 +33,10 @@ @config_dir = File.dirname(@config_file) end def save_configuration(configuration) + return true unless @persist FileUtils.touch @config_file File.chmod 0600, @config_file File.open(@config_file, 'w') { |file| file.write(YAML.dump(configuration)) } end