Optionally require mdm, as well

MSP-11412
bug/bundler_fix
Matt Buck 2014-10-03 13:49:39 -05:00
parent 478dbd32f2
commit 88cbf22ef0
No known key found for this signature in database
GPG Key ID: 42134E0C9C4E94BB
2 changed files with 9 additions and 6 deletions

View File

@ -10,8 +10,7 @@ require 'fileutils'
require 'metasploit/model/engine' require 'metasploit/model/engine'
require 'metasploit/concern/engine' require 'metasploit/concern/engine'
require 'metasploit_data_models/engine' Metasploit::Framework::Require.optionally_require_metasploit_db_gems
Metasploit::Framework::Require.optionally_require_metasploit_credential_engine
# `Rails::Engine` behavior common to both {Metasploit::Framework::Application} and {Metasploit::Framework::Engine}. # `Rails::Engine` behavior common to both {Metasploit::Framework::Application} and {Metasploit::Framework::Engine}.
module Metasploit::Framework::CommonEngine module Metasploit::Framework::CommonEngine

View File

@ -72,16 +72,20 @@ module Metasploit
end end
end end
# Tries to `require 'metasploit/credential/engine'`. # Tries to require gems necessary for using a database with the framework.
# #
# @example # @example
# Metasploit::Framework::Require.optionally_require_metasploit_credential_engine # Metasploit::Framework::Require.optionally_require_metasploit_db_gems
# #
# @return [void] # @return [void]
def self.optionally_require_metasploit_credential_engine def self.optionally_require_metasploit_db_gems
optionally( optionally(
'metasploit/credential/engine', 'metasploit/credential/engine',
"metasploit-credential not in the bundle", 'metasploit-credential not in the bundle',
)
optionally(
'metasploit_data_models/engine',
'metaspoit_data_models not in the bundle'
) )
end end