Sha256: d46ba7e02f527420ff2c0c2cb5729c55c22b33cddd54eec0a42a72c1a67146cf
Contents?: true
Size: 1.41 KB
Versions: 3
Compression:
Stored size: 1.41 KB
Contents
#!/usr/bin/env ruby # frozen_string_literal: true require 'dotenv' env_path = File.expand_path('.env', __dir__) Dotenv.load(env_path) require 'gli' require_relative '../lib/avs' require_relative '../lib/service/db' require_relative '../lib/service/api/insightvm' require_relative '../lib/service/mail' require_relative '../lib/app' class App extend GLI::App program_desc 'Asset Vulnerability Solution Reporting Tools' version Avs::VERSION synopsis_format :compact pre do |_global, _command, _options, _args| # Pre logic here # Return true to proceed; false to abort and not call the # chosen command # Use skips_pre before a command to skip this block # on that command only true end post do |global, command, options, args| # Post logic here # Use skips_post before a command to skip this # block on that command only end on_error do |_exception| # Error logic here # return false to skip default error handling true end # # TODO: use the ENV for host, db, port # def self.api # @api ||= InsightVMApi.new( # 'https://sbginsightvmconsole.standardbank.co.za:3780/api/3', # 'r7admin', # 'P@ssword1234' # ) # end # # TODO: use the ENV for host, db, port # def self.db # @db ||= Db.new(host: '127.0.0.1', db: 'avs', user: 'avs', port: 5433) # end # def self.mail # MailService.instance # end end exit App.run(ARGV)
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
avs-0.1.3 | bin/avs |
avs-0.1.2 | bin/avs |
avs-0.1.1 | bin/avs |