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

Version Path
metasploit-model-0.27.0.pre.dep.pre.railties lib/metasploit/model.rb
metasploit-model-0.26.1-java lib/metasploit/model.rb
metasploit-model-0.26.1 lib/metasploit/model.rb
metasploit-model-0.25.7 lib/metasploit/model.rb
metasploit-model-0.25.7-java lib/metasploit/model.rb
metasploit-model-0.25.6 lib/metasploit/model.rb
metasploit-model-0.25.6-java lib/metasploit/model.rb
metasploit-model-0.25.3 lib/metasploit/model.rb
metasploit-model-0.25.3-java lib/metasploit/model.rb
metasploit-model-0.25.2 lib/metasploit/model.rb
metasploit-model-0.25.2-java lib/metasploit/model.rb
metasploit-model-0.25.1 lib/metasploit/model.rb
metasploit-model-0.25.1-java lib/metasploit/model.rb
metasploit-model-0.25.1.pre.metasploit.pre.model.pre.search.pre.operator.pre.and.pre.operation.pre.groups-java lib/metasploit/model.rb
metasploit-model-0.25.1.pre.metasploit.pre.model.pre.search.pre.operator.pre.and.pre.operation.pre.groups lib/metasploit/model.rb
metasploit-model-0.24.1-java lib/metasploit/model.rb
metasploit-model-0.24.1 lib/metasploit/model.rb
metasploit-model-0.24.1.pre.semantic.pre.versioning.pre.2.pre.0 lib/metasploit/model.rb