Class: App
- Inherits:
-
Object
- Object
- App
- Extended by:
- GLI::App
- Defined in:
- lib/avs.rb,
lib/app.rb,
lib/domain/tag/command.rb,
lib/domain/site/command.rb,
lib/domain/asset/command.rb,
lib/domain/report/command.rb,
lib/domain/country/command.rb,
lib/domain/project/command.rb,
lib/domain/software/command.rb,
lib/domain/asset_group/command.rb,
lib/domain/scan_engine/command.rb,
lib/domain/site_target/command.rb,
lib/domain/scan_schedule/command.rb,
lib/domain/vulnerability/command.rb,
lib/domain/operating_system/command.rb,
lib/domain/scan_engine_pool/command.rb,
lib/domain/shared_credential/command.rb
Overview
require_relative ‘../../service/mail’
Class Method Summary collapse
-
.api ⇒ Object
TODO: use the ENV for host, db, port.
-
.db ⇒ Object
TODO: use the ENV for host, db, port.
- .mail ⇒ Object
- .nucleus ⇒ Object
Class Method Details
.api ⇒ Object
TODO: use the ENV for host, db, port
17 18 19 20 21 22 23 |
# File 'lib/app.rb', line 17 def self.api @api ||= InsightVMApi.new( ENV['INSIGHT_API_URL'], ENV['INSIGHT_API_USER'], ENV['INSIGHT_API_PASSWORD'] ) end |
.db ⇒ Object
TODO: use the ENV for host, db, port
35 36 37 38 39 40 41 42 |
# File 'lib/app.rb', line 35 def self.db @db ||= Db.new( host: ENV['DB_HOST'], db: ENV['DB_NAME'], user: ENV['DB_USER'], port: ENV['DB_PORT'] ) end |
.mail ⇒ Object
44 45 46 |
# File 'lib/app.rb', line 44 def self.mail MailService.instance end |
.nucleus ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/app.rb', line 25 def self.nucleus @nucleus ||= NucleusApi.new( base_url: ENV['NUCLEUS_API_URL'], api_key: ENV['NUCLEUS_API_KEY'], download_dir: ENV['NUCLEUS_DOWNLOAD_DIR'], archive_dir: ENV['NUCLEUS_ARCHIVE_DIR'] ) end |