Sha256: 3750d3eda47bc0afad67cb6375ea35d81f8cdb85f13df6164d2edc7300feed31
Contents?: true
Size: 1.33 KB
Versions: 18
Compression:
Stored size: 1.33 KB
Contents
# # Gems # require 'active_model' require 'active_support' # not loaded by default with require 'active_support' require 'active_support/dependencies' # # Project # require 'metasploit/model/version' # Only include the Rails engine when using Rails. This allows the non-Rails projects, like metasploit-framework to use # the validators by calling Metasploit::Model.require_validators. if defined? Rails require 'metasploit/model/engine' end # Top-level namespace shared between metasploit-model, metasploit-framework, and Pro. module Metasploit # The namespace for this gem. All code under the {Metasploit::Model} namespace is code that is shared between # in-memory ActiveModels in metasploit-framework and database ActiveRecords in metasploit_data_models. Having a # separate gem for this shard code outside of metasploit_data_models is necessary as metasploit_data_models is an # optional dependency for metasploit-framework as metasploit-framework can work without a database. module Model require 'metasploit/model/configured' extend Metasploit::Model::Configured lib_metasploit_pathname = Pathname.new(__FILE__).dirname lib_pathname = lib_metasploit_pathname.parent configuration.root = lib_pathname.parent configuration.autoload.relative_paths << File.join('app', 'validators') end end Metasploit::Model.setup
Version data entries
18 entries across 18 versions & 1 rubygems