Sha256: ce2f8b6a492d01dac4de129c1ba419b1e1a0e91903d564cd7c12f1f1a5809d35
Contents?: true
Size: 586 Bytes
Versions: 4
Compression:
Stored size: 586 Bytes
Contents
require 'yaml' namespace :nvd do desc 'Execute NVD migrations' task :migrate do db_connect ActiveRecord::Migrator.migrate(File.join FIDIUS::CveDb::GEM_BASE, 'db', 'migrate') end desc "Drop NVD database" task :drop do #db_connect raise NotImplementedError end end def db_connect db_config = YAML.load_file(File.join(Rails.root.to_s, 'config', 'database.yml')) if db_config["cve_db"] ActiveRecord::Base::establish_connection db_config["cve_db"] else puts "No configuration found for cve_db in config/database.yml!" end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
fidius-cvedb-0.0.6 | lib/tasks/nvd_migrate.rake |
fidius-cvedb-0.0.5 | lib/tasks/nvd_migrate.rake |
fidius-cvedb-0.0.3 | lib/tasks/nvd_migrate.rake |
fidius-cvedb-0.0.2 | lib/tasks/nvd_migrate.rake |