lib/kafo/configuration.rb in kafo-0.7.2 vs lib/kafo/configuration.rb in kafo-0.7.3

- old
+ new

@@ -10,10 +10,11 @@ attr_reader :config_file, :answer_file DEFAULT = { :name => '', :description => '', + :enabled => true, :log_dir => '/var/log/kafo', :log_name => 'configuration.log', :log_level => 'info', :no_prefix => false, :mapping => {}, @@ -24,11 +25,12 @@ :colors => Kafo::ColorScheme.colors_possible?, :color_of_background => :dark, :hook_dirs => [], :custom => {}, :low_priority_modules => [], - :verbose_log_level => 'info' + :verbose_log_level => 'info', + :parser_cache_path => './config/parser_cache.json' } def initialize(file, persist = true) @config_file = file @persist = persist @@ -252,9 +254,15 @@ end end def migrations_dir @config_file.gsub(/\.yaml$/, '.migrations') + end + + def parser_cache + if app[:parser_cache_path] + @parser_cache ||= Kafo::ParserCacheReader.new_from_file(File.expand_path(app[:parser_cache_path])) + end end private def custom_storage