Explicitly require 'active_support/concern'

[#36737359]

When starting msfconsole, 'bundler/setup' is not required, the
'msf/env/gemcache' is required instead. Unlike 'bundler/setup' the
msf/env gemcache does not do the automatic requires for gems in the
cache, so explicit requires on 'active_support/concern' is needed to get
ActiveSupport::Concern defined.  (I could have done require
'active_support' to match the behavior of 'bundler/setup', but a smaller
require seemed more appropriate.
This commit is contained in:
Luke Imhoff 2012-10-03 15:42:14 -05:00
parent 249a251f26
commit 7443fed86d
6 changed files with 39 additions and 3 deletions

View File

@ -1,10 +1,13 @@
source 'http://rubygems.org'
# Need 3+ for ActiveSupport::Concern
gem 'activesupport', '>= 3.0.0'
group :development do
# running documention generation tasks
# running documentation generation tasks
gem 'rake'
# Markdown formatting for yara
# Markdown formatting for yard
gem 'redcarpet'
# generating documention
# generating documentation
gem 'yard'
end

View File

@ -1,6 +1,11 @@
GEM
remote: http://rubygems.org/
specs:
activesupport (3.2.8)
i18n (~> 0.6)
multi_json (~> 1.0)
i18n (0.6.1)
multi_json (1.3.6)
rake (0.9.2.2)
redcarpet (2.1.1)
yard (0.8.2.1)
@ -9,6 +14,7 @@ PLATFORMS
ruby
DEPENDENCIES
activesupport (>= 3.0.0)
rake
redcarpet
yard

View File

@ -1,3 +1,8 @@
#
# Gems
#
require 'active_support/concern'
# Concerns the module cache maintained by the {Msf::ModuleManager}.
module Msf::ModuleManager::Cache
extend ActiveSupport::Concern

View File

@ -1,3 +1,11 @@
#
# Gems
#
require 'active_support/concern'
#
# Project
#
require 'msf/core/modules/loader/archive'
require 'msf/core/modules/loader/directory'

View File

@ -1,3 +1,8 @@
#
# Gems
#
require 'active_support/concern'
# Deals with module paths in the {Msf::ModuleManager}
module Msf::ModuleManager::ModulePaths
extend ActiveSupport::Concern

View File

@ -1,3 +1,12 @@
#
# Gems
#
require 'active_support/concern'
#
# Project
#
# Defines the MODULE_* constants
require 'msf/core/constants'