From 3093ba83943e0ed689b9fbe95d38d03f77f1e411 Mon Sep 17 00:00:00 2001 From: Luke Imhoff Date: Wed, 5 Nov 2014 09:25:50 -0600 Subject: [PATCH] Explicitly require 'metasploit/credential' and 'metasploit_data_models' By putting the db group into the metasploit-framework-db.gemspec, bundler no longer automatically required 'metasploit/credential' and 'metasploit_data_models' because gems, such as metasploit-framework-db, are expected to explictly require their dependencies. --- lib/metasploit/framework/require.rb | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/metasploit/framework/require.rb b/lib/metasploit/framework/require.rb index 186fca3ce3..f795d6f367 100644 --- a/lib/metasploit/framework/require.rb +++ b/lib/metasploit/framework/require.rb @@ -80,13 +80,18 @@ module Metasploit # @return [void] def self.optionally_require_metasploit_db_gem_engines optionally( - 'metasploit/credential/engine', - 'metasploit-credential not in the bundle', - ) + 'metasploit/credential', + 'metasploit-credential not in the bundle', + ) do + require 'metasploit/credential/engine' + end + optionally( - 'metasploit_data_models/engine', - 'metaspoit_data_models not in the bundle' - ) + 'metasploit_data_models', + 'metasploit_data_models not in the bundle' + ) do + require 'metasploit_data_models/engine' + end end #