some adjustments to the cvelist importer migrate and gemfiles
This commit is contained in:
parent
081bb068d5
commit
f075cd0284
4 changed files with 337 additions and 4 deletions
9
Gemfile
9
Gemfile
|
@ -4,16 +4,17 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
|||
ruby '2.7.0'
|
||||
|
||||
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
||||
gem 'rails', '~> 5.2.3'
|
||||
gem 'rails', '~> 7.0.0'
|
||||
gem 'actionpack'
|
||||
gem 'sass-rails'
|
||||
gem 'railties'
|
||||
|
||||
# Use postgres as the database for Active Record
|
||||
gem 'pg'
|
||||
gem 'pry'
|
||||
gem 'bulk_insert'
|
||||
gem 'git'
|
||||
# Use Puma as the app server
|
||||
gem 'puma', '~> 3.11'
|
||||
# Use SCSS for stylesheets
|
||||
gem 'sass-rails', '~> 5.0'
|
||||
# Use Uglifier as compressor for JavaScript assets
|
||||
gem 'uglifier', '>= 1.3.0'
|
||||
# See https://github.com/rails/execjs#readme for more supported runtimes
|
||||
|
|
298
Gemfile.lock
Normal file
298
Gemfile.lock
Normal file
|
@ -0,0 +1,298 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
actioncable (7.0.2.3)
|
||||
actionpack (= 7.0.2.3)
|
||||
activesupport (= 7.0.2.3)
|
||||
nio4r (~> 2.0)
|
||||
websocket-driver (>= 0.6.1)
|
||||
actionmailbox (7.0.2.3)
|
||||
actionpack (= 7.0.2.3)
|
||||
activejob (= 7.0.2.3)
|
||||
activerecord (= 7.0.2.3)
|
||||
activestorage (= 7.0.2.3)
|
||||
activesupport (= 7.0.2.3)
|
||||
mail (>= 2.7.1)
|
||||
net-imap
|
||||
net-pop
|
||||
net-smtp
|
||||
actionmailer (7.0.2.3)
|
||||
actionpack (= 7.0.2.3)
|
||||
actionview (= 7.0.2.3)
|
||||
activejob (= 7.0.2.3)
|
||||
activesupport (= 7.0.2.3)
|
||||
mail (~> 2.5, >= 2.5.4)
|
||||
net-imap
|
||||
net-pop
|
||||
net-smtp
|
||||
rails-dom-testing (~> 2.0)
|
||||
actionpack (7.0.2.3)
|
||||
actionview (= 7.0.2.3)
|
||||
activesupport (= 7.0.2.3)
|
||||
rack (~> 2.0, >= 2.2.0)
|
||||
rack-test (>= 0.6.3)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||
actiontext (7.0.2.3)
|
||||
actionpack (= 7.0.2.3)
|
||||
activerecord (= 7.0.2.3)
|
||||
activestorage (= 7.0.2.3)
|
||||
activesupport (= 7.0.2.3)
|
||||
globalid (>= 0.6.0)
|
||||
nokogiri (>= 1.8.5)
|
||||
actionview (7.0.2.3)
|
||||
activesupport (= 7.0.2.3)
|
||||
builder (~> 3.1)
|
||||
erubi (~> 1.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
||||
activejob (7.0.2.3)
|
||||
activesupport (= 7.0.2.3)
|
||||
globalid (>= 0.3.6)
|
||||
activemodel (7.0.2.3)
|
||||
activesupport (= 7.0.2.3)
|
||||
activerecord (7.0.2.3)
|
||||
activemodel (= 7.0.2.3)
|
||||
activesupport (= 7.0.2.3)
|
||||
activestorage (7.0.2.3)
|
||||
actionpack (= 7.0.2.3)
|
||||
activejob (= 7.0.2.3)
|
||||
activerecord (= 7.0.2.3)
|
||||
activesupport (= 7.0.2.3)
|
||||
marcel (~> 1.0)
|
||||
mini_mime (>= 1.1.0)
|
||||
activesupport (7.0.2.3)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 1.6, < 2)
|
||||
minitest (>= 5.1)
|
||||
tzinfo (~> 2.0)
|
||||
addressable (2.8.0)
|
||||
public_suffix (>= 2.0.2, < 5.0)
|
||||
archive-zip (0.12.0)
|
||||
io-like (~> 0.3.0)
|
||||
awesome_print (1.9.2)
|
||||
bindex (0.8.1)
|
||||
bootsnap (1.11.1)
|
||||
msgpack (~> 1.2)
|
||||
builder (3.2.4)
|
||||
bulk_insert (1.9.0)
|
||||
activerecord (>= 3.2.0)
|
||||
byebug (11.1.3)
|
||||
capybara (3.36.0)
|
||||
addressable
|
||||
matrix
|
||||
mini_mime (>= 0.1.3)
|
||||
nokogiri (~> 1.8)
|
||||
rack (>= 1.6.0)
|
||||
rack-test (>= 0.6.3)
|
||||
regexp_parser (>= 1.5, < 3.0)
|
||||
xpath (~> 3.2)
|
||||
childprocess (4.1.0)
|
||||
chromedriver-helper (2.1.1)
|
||||
archive-zip (~> 0.10)
|
||||
nokogiri (~> 1.8)
|
||||
coderay (1.1.3)
|
||||
coffee-rails (4.2.2)
|
||||
coffee-script (>= 2.2.0)
|
||||
railties (>= 4.0.0)
|
||||
coffee-script (2.4.1)
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.12.2)
|
||||
concurrent-ruby (1.1.10)
|
||||
crass (1.0.6)
|
||||
digest (3.1.0)
|
||||
erubi (1.10.0)
|
||||
execjs (2.8.1)
|
||||
ffi (1.15.5)
|
||||
git (1.10.2)
|
||||
rchardet (~> 1.8)
|
||||
globalid (1.0.0)
|
||||
activesupport (>= 5.0)
|
||||
i18n (1.10.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
interception (0.5)
|
||||
io-like (0.3.1)
|
||||
jbuilder (2.11.5)
|
||||
actionview (>= 5.0.0)
|
||||
activesupport (>= 5.0.0)
|
||||
listen (3.1.5)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
ruby_dep (~> 1.2)
|
||||
loofah (2.16.0)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.5.9)
|
||||
mail (2.7.1)
|
||||
mini_mime (>= 0.1.1)
|
||||
marcel (1.0.2)
|
||||
matrix (0.4.2)
|
||||
method_source (1.0.0)
|
||||
mini_mime (1.1.2)
|
||||
minitest (5.15.0)
|
||||
msgpack (1.4.5)
|
||||
net-imap (0.2.3)
|
||||
digest
|
||||
net-protocol
|
||||
strscan
|
||||
net-pop (0.1.1)
|
||||
digest
|
||||
net-protocol
|
||||
timeout
|
||||
net-protocol (0.1.3)
|
||||
timeout
|
||||
net-smtp (0.3.1)
|
||||
digest
|
||||
net-protocol
|
||||
timeout
|
||||
nio4r (2.5.8)
|
||||
nokogiri (1.13.3-x86_64-linux)
|
||||
racc (~> 1.4)
|
||||
pg (1.3.5)
|
||||
pry (0.13.1)
|
||||
coderay (~> 1.1)
|
||||
method_source (~> 1.0)
|
||||
pry-byebug (3.9.0)
|
||||
byebug (~> 11.0)
|
||||
pry (~> 0.13.0)
|
||||
pry-doc (1.3.0)
|
||||
pry (~> 0.11)
|
||||
yard (~> 0.9.11)
|
||||
pry-rails (0.3.9)
|
||||
pry (>= 0.10.4)
|
||||
pry-rescue (1.5.2)
|
||||
interception (>= 0.5)
|
||||
pry (>= 0.12.0)
|
||||
pry-theme (1.3.1)
|
||||
coderay (~> 1.1)
|
||||
public_suffix (4.0.6)
|
||||
puma (3.12.6)
|
||||
racc (1.6.0)
|
||||
rack (2.2.3)
|
||||
rack-test (1.1.0)
|
||||
rack (>= 1.0, < 3)
|
||||
rails (7.0.2.3)
|
||||
actioncable (= 7.0.2.3)
|
||||
actionmailbox (= 7.0.2.3)
|
||||
actionmailer (= 7.0.2.3)
|
||||
actionpack (= 7.0.2.3)
|
||||
actiontext (= 7.0.2.3)
|
||||
actionview (= 7.0.2.3)
|
||||
activejob (= 7.0.2.3)
|
||||
activemodel (= 7.0.2.3)
|
||||
activerecord (= 7.0.2.3)
|
||||
activestorage (= 7.0.2.3)
|
||||
activesupport (= 7.0.2.3)
|
||||
bundler (>= 1.15.0)
|
||||
railties (= 7.0.2.3)
|
||||
rails-dom-testing (2.0.3)
|
||||
activesupport (>= 4.2.0)
|
||||
nokogiri (>= 1.6)
|
||||
rails-html-sanitizer (1.4.2)
|
||||
loofah (~> 2.3)
|
||||
railties (7.0.2.3)
|
||||
actionpack (= 7.0.2.3)
|
||||
activesupport (= 7.0.2.3)
|
||||
method_source
|
||||
rake (>= 12.2)
|
||||
thor (~> 1.0)
|
||||
zeitwerk (~> 2.5)
|
||||
rake (13.0.6)
|
||||
rb-fsevent (0.11.1)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
rchardet (1.8.0)
|
||||
regexp_parser (2.2.1)
|
||||
rexml (3.2.5)
|
||||
ruby_dep (1.5.0)
|
||||
rubyzip (2.3.2)
|
||||
sass-rails (6.0.0)
|
||||
sassc-rails (~> 2.1, >= 2.1.1)
|
||||
sassc (2.4.0)
|
||||
ffi (~> 1.9)
|
||||
sassc-rails (2.1.2)
|
||||
railties (>= 4.0.0)
|
||||
sassc (>= 2.0)
|
||||
sprockets (> 3.0)
|
||||
sprockets-rails
|
||||
tilt
|
||||
selenium-webdriver (4.1.0)
|
||||
childprocess (>= 0.5, < 5.0)
|
||||
rexml (~> 3.2, >= 3.2.5)
|
||||
rubyzip (>= 1.2.2)
|
||||
spring (2.1.1)
|
||||
spring-watcher-listen (2.0.1)
|
||||
listen (>= 2.7, < 4.0)
|
||||
spring (>= 1.2, < 3.0)
|
||||
sprockets (4.0.3)
|
||||
concurrent-ruby (~> 1.0)
|
||||
rack (> 1, < 3)
|
||||
sprockets-rails (3.4.2)
|
||||
actionpack (>= 5.2)
|
||||
activesupport (>= 5.2)
|
||||
sprockets (>= 3.0.0)
|
||||
strscan (3.0.1)
|
||||
thor (1.2.1)
|
||||
tilt (2.0.10)
|
||||
timeout (0.2.0)
|
||||
turbolinks (5.2.1)
|
||||
turbolinks-source (~> 5.2)
|
||||
turbolinks-source (5.2.0)
|
||||
tzinfo (2.0.4)
|
||||
concurrent-ruby (~> 1.0)
|
||||
uglifier (4.2.0)
|
||||
execjs (>= 0.3.0, < 3)
|
||||
web-console (4.2.0)
|
||||
actionview (>= 6.0.0)
|
||||
activemodel (>= 6.0.0)
|
||||
bindex (>= 0.4.0)
|
||||
railties (>= 6.0.0)
|
||||
webrick (1.7.0)
|
||||
websocket-driver (0.7.5)
|
||||
websocket-extensions (>= 0.1.0)
|
||||
websocket-extensions (0.1.5)
|
||||
xpath (3.2.0)
|
||||
nokogiri (~> 1.8)
|
||||
yard (0.9.27)
|
||||
webrick (~> 1.7.0)
|
||||
zeitwerk (2.5.4)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
actionpack
|
||||
awesome_print
|
||||
bootsnap (>= 1.1.0)
|
||||
bulk_insert
|
||||
byebug
|
||||
capybara (>= 2.15)
|
||||
chromedriver-helper
|
||||
coffee-rails (~> 4.2)
|
||||
git
|
||||
jbuilder (~> 2.5)
|
||||
listen (>= 3.0.5, < 3.2)
|
||||
pg
|
||||
pry
|
||||
pry-byebug
|
||||
pry-doc
|
||||
pry-rails
|
||||
pry-rescue
|
||||
pry-theme
|
||||
puma (~> 3.11)
|
||||
rails (~> 7.0.0)
|
||||
railties
|
||||
sass-rails
|
||||
selenium-webdriver
|
||||
spring
|
||||
spring-watcher-listen (~> 2.0.0)
|
||||
turbolinks (~> 5)
|
||||
tzinfo-data
|
||||
uglifier (>= 1.3.0)
|
||||
web-console (>= 3.3.0)
|
||||
|
||||
RUBY VERSION
|
||||
ruby 2.7.0p0
|
||||
|
||||
BUNDLED WITH
|
||||
2.1.2
|
|
@ -2,6 +2,8 @@ class CreateCves < ActiveRecord::Migration[5.2]
|
|||
def change
|
||||
create_table :cves do |t|
|
||||
t.jsonb :cve_data_meta
|
||||
t.string :cve_id
|
||||
t.index :cve_id, unique: true
|
||||
t.jsonb :affects
|
||||
t.string :data_format
|
||||
t.string :data_type
|
||||
|
|
32
db/schema.rb
Normal file
32
db/schema.rb
Normal file
|
@ -0,0 +1,32 @@
|
|||
# This file is auto-generated from the current state of the database. Instead
|
||||
# of editing this file, please use the migrations feature of Active Record to
|
||||
# incrementally modify your database, and then regenerate this schema definition.
|
||||
#
|
||||
# This file is the source Rails uses to define your schema when running `bin/rails
|
||||
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
||||
# be faster and is potentially less error prone than running all of your
|
||||
# migrations from scratch. Old migrations may fail to apply correctly if those
|
||||
# migrations use external dependencies or application code.
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.0].define(version: 2022_04_01_173431) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
||||
create_table "cves", force: :cascade do |t|
|
||||
t.jsonb "cve_data_meta"
|
||||
t.string "cve_id"
|
||||
t.jsonb "affects"
|
||||
t.string "data_format"
|
||||
t.string "data_type"
|
||||
t.string "data_version"
|
||||
t.jsonb "description"
|
||||
t.jsonb "impact"
|
||||
t.jsonb "problemtype"
|
||||
t.jsonb "references"
|
||||
t.jsonb "source"
|
||||
t.index ["cve_id"], name: "index_cves_on_cve_id", unique: true
|
||||
end
|
||||
|
||||
end
|
Loading…
Add table
Reference in a new issue