config/initializers/naf.rb in naf-1.1.4 vs config/initializers/naf.rb in naf-2.0.0

- old
+ new

@@ -1,3 +1,15 @@ module Naf - DEFAULT_PAGE_OPTIONS = [10, 20, 50, 100, 250, 500, 750, 1000, 1500, 2000] + DEFAULT_PAGE_OPTIONS = [10, 20, 50, 100, 250, 500, 750, 1000, 1500, 2000] + LOGGING_ARCHIVE_DIRECTORY = "/archive" + if ['test', 'development'].include?(Rails.env) + LOGGING_ROOT_DIRECTORY = 'var/log' + else + LOGGING_ROOT_DIRECTORY = '/var/log' + end + + NAF_DATABASE_HOSTNAME = Rails.configuration.database_configuration[Rails.env]['host'].present? ? + Rails.configuration.database_configuration[Rails.env]['host'] : 'localhost' + NAF_DATABASE = Rails.configuration.database_configuration[Rails.env]['database'] + PREFIX_PATH = "#{LOGGING_ROOT_DIRECTORY}/naf/#{NAF_DATABASE_HOSTNAME}/#{NAF_DATABASE}" + end