metasploit-framework/config/application.rb

55 lines
1.1 KiB
Ruby
Raw Normal View History

require 'rails'
require File.expand_path('../boot', __FILE__)
all_environments = [
:development,
:production,
:test
]
Bundler.require(
*Rails.groups(
coverage: [:test],
db: all_environments,
pcap: all_environments
)
)
#
# Railties
#
# For compatibility with jquery-rails (and other engines that need action_view) in pro
2014-09-05 02:06:14 +08:00
require 'action_controller/railtie'
require 'action_view/railtie'
#
# Project
#
require 'metasploit/framework/common_engine'
require 'metasploit/framework/database'
module Metasploit
module Framework
class Application < Rails::Application
include Metasploit::Framework::CommonEngine
config.paths['log'] = "#{Msf::Config.log_directory}/#{Rails.env}.log"
config.paths['config/database'] = [Metasploit::Framework::Database.configurations_pathname.try(:to_path)]
case Rails.env
when "development"
config.eager_load = false
when "test"
config.eager_load = false
when "production"
config.eager_load = true
end
end
end
2014-07-19 00:49:49 +08:00
end
# Silence warnings about this defaulting to true
I18n.enforce_available_locales = true