You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
521 B
23 lines
521 B
require 'ostruct'
|
|
::App = OpenStruct.new
|
|
|
|
# Define os campos essenciais
|
|
required_fields = %w(
|
|
title
|
|
language
|
|
max_upload_file_size
|
|
default_color
|
|
forum_uri
|
|
)
|
|
|
|
# Carrega as configuracoes personalizadas
|
|
require "#{RAILS_ROOT}/config/application.rb"
|
|
|
|
# Verifica se todas os campos essenciais foram instanciados
|
|
required_fields.each do |field|
|
|
raise "Required configuration not found: App.#{field}" unless App.respond_to?(field)
|
|
end
|
|
|
|
# Internacionalizacao
|
|
Gibberish.current_language = App.language if RAILS_ENV != 'test'
|