rapid7 / metasploit-model

Common code, such as validators and mixins, that are shared between ActiveModels in metasploit-framework and ActiveRecords in metasploit_data_models
BSD 3-Clause "New" or "Revised" License
13 stars 21 forks source link

Metasploit::Model Build StatusCode ClimateDependency StatusGem VersionInline docsPullReview stats

Versioning

Metasploit::Model is versioned using semantic versioning 2.0. Each branch should set Metasploit::Model::Version::PRERELEASE to the branch SUMMARY, while master should have no PRERELEASE and the PRERELEASE section of Metasploit::Model::VERSION does not exist.

Installation

Add this line to your application's Gemfile:

gem 'metasploit-model'

And then execute:

$ bundle

This gem's Rails::Engine is not required automatically. You'll need to also add the following to your config/application.rb:

require 'metasploit/model/engine'

Or install it yourself as:

$ gem install metasploit-model

Running tests

Copy the database configuration and modify as appropriate:

cp spec/dummy/config/database.yml.github_actions spec/dummy/config/database.yml

Set up the database:

bundle exec rake db:test:prepare
bundle exec rake db:migrate RAILS_ENV=test

Run the test suite:

bundle exec rspec

Contributing

See CONTRIBUTING.md