Files
metasploit-gs/config/application.rb
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

63 lines
1.4 KiB
Ruby
Raw Normal View History

2022-09-01 11:05:54 -05:00
require 'fiddle'
Fiddle.const_set(:VERSION, '0.0.0') unless Fiddle.const_defined?(:VERSION)
require 'rails'
require File.expand_path('../boot', __FILE__)
2014-07-29 15:50:52 -05:00
all_environments = [
:development,
:production,
:test
]
Bundler.require(
*Rails.groups(
2014-12-05 11:58:09 -06:00
coverage: [:test],
2014-07-29 15:50:52 -05:00
db: all_environments,
pcap: all_environments
)
)
#
# Railties
#
# For compatibility with jquery-rails (and other engines that need action_view) in pro
2014-09-04 13:06:14 -05: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
2015-01-07 09:37:07 -06:00
config.paths['log'] = "#{Msf::Config.log_directory}/#{Rails.env}.log"
config.paths['config/database'] = [Metasploit::Framework::Database.configurations_pathname.try(:to_path)]
2021-03-19 15:02:12 -05:00
config.autoloader = :zeitwerk
2015-04-23 14:18:51 -05:00
case Rails.env
when "development"
config.eager_load = false
when "test"
config.eager_load = false
when "production"
config.eager_load = false
2015-04-23 14:18:51 -05:00
end
2023-01-23 10:03:32 -06:00
if ActiveRecord.respond_to?(:legacy_connection_handling=)
ActiveRecord.legacy_connection_handling = false
end
end
end
2014-07-18 11:49:49 -05:00
end
# Silence warnings about this defaulting to true
I18n.enforce_available_locales = true
2021-03-19 15:02:12 -05:00
require 'msfenv'