ronin-db-activerecord

CI Code Climate Gem Version

Description

ronin-db-activerecord contains ActiveRecord models and migrations for the Ronin Database. Provides database models storing and querying network data, advisory data, credentials, and OSINT data.

Features

Examples

Create a database:

require 'ronin/db/migrations'

ActiveRecord::Base.establish_connection(
  adapter: 'sqlite3',
  database: 'path/to/db.sqlite3'
)

Ronin::DB::Migrations.up

Connect to the database:

ActiveRecord::Base.establish_connection(
  adapter: 'sqlite3',
  database: 'path/to/db.sqlite3'
)

require 'ronin/db/models'
Ronin::DB::Models.connect

Requirements

Install

$ gem install ronin-db-activerecord

Gemfile

gem 'ronin-db-activerecord', '~> 0.1'

gemspec

gem.add_dependency 'ronin-db-activerecord', '~> 0.1'

Development

  1. Fork It!
  2. Clone It!
  3. cd ronin-db-activerecord/
  4. bundle install
  5. git checkout -b my_feature
  6. Code It!
  7. bundle exec rake spec
  8. git push origin my_feature

If you want to test your changes locally, run rake db:console to start a local database console.

License

Copyright (c) 2022-2024 Hal Brodigan (postmodern.mod3@gmail.com)

ronin-db-activerecord is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

ronin-db-activerecord is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with ronin-db-activerecord. If not, see https://www.gnu.org/licenses/.