Class: Dependaboat::Cli

Inherits:
Object
  • Object
show all
Defined in:
lib/dependaboat/cli.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*argv) ⇒ Cli

Returns a new instance of Cli.



14
15
16
17
18
# File 'lib/dependaboat/cli.rb', line 14

def initialize(*argv)
  @dry_run = false # Default
  @logger = Dependaboat.logger
  options_parser.parse(argv)
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



7
8
9
# File 'lib/dependaboat/cli.rb', line 7

def config
  @config
end

#loggerObject

Returns the value of attribute logger.



8
9
10
# File 'lib/dependaboat/cli.rb', line 8

def logger
  @logger
end

#ownerObject (readonly)

Returns the value of attribute owner.



7
8
9
# File 'lib/dependaboat/cli.rb', line 7

def owner
  @owner
end

#projectObject (readonly)

Returns the value of attribute project.



7
8
9
# File 'lib/dependaboat/cli.rb', line 7

def project
  @project
end

#project_idObject (readonly)

Returns the value of attribute project_id.



7
8
9
# File 'lib/dependaboat/cli.rb', line 7

def project_id
  @project_id
end

#repoObject (readonly)

Returns the value of attribute repo.



7
8
9
# File 'lib/dependaboat/cli.rb', line 7

def repo
  @repo
end

Class Method Details

.runObject



10
11
12
# File 'lib/dependaboat/cli.rb', line 10

def self.run
  new(*ARGV).run
end

Instance Method Details

#runObject



20
21
22
23
24
25
# File 'lib/dependaboat/cli.rb', line 20

def run
  initialize_project
  fetch_and_process_alerts
  logger.info "Run complete."
  0
end