Class: Package::Audit::CLI
- Inherits:
-
Thor
- Object
- Thor
- Package::Audit::CLI
show all
- Defined in:
- lib/package/audit/cli.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(command, *args) ⇒ Object
72
73
74
|
# File 'lib/package/audit/cli.rb', line 72
def method_missing(command, *args)
invoke :report, [command], args
end
|
Class Method Details
.exit_on_failure? ⇒ Boolean
68
69
70
|
# File 'lib/package/audit/cli.rb', line 68
def self.exit_on_failure?
true
end
|
Instance Method Details
#deprecated(dir = Dir.pwd) ⇒ Object
44
45
46
|
# File 'lib/package/audit/cli.rb', line 44
def deprecated(dir = Dir.pwd)
within_rescue_block { exit CommandParser.new(dir, options, Enum::Report::DEPRECATED).run }
end
|
#outdated(dir = Dir.pwd) ⇒ Object
49
50
51
|
# File 'lib/package/audit/cli.rb', line 49
def outdated(dir = Dir.pwd)
within_rescue_block { exit CommandParser.new(dir, options, Enum::Report::OUTDATED).run }
end
|
#report(dir = Dir.pwd) ⇒ Object
38
39
40
|
# File 'lib/package/audit/cli.rb', line 38
def report(dir = Dir.pwd)
within_rescue_block { exit CommandParser.new(dir, options, Enum::Report::ALL).run }
end
|
#respond_to_missing? ⇒ Boolean
76
77
78
|
# File 'lib/package/audit/cli.rb', line 76
def respond_to_missing?
true
end
|
#risk ⇒ Object
59
60
61
|
# File 'lib/package/audit/cli.rb', line 59
def risk
Util::SummaryPrinter.risk
end
|
#version ⇒ Object
64
65
66
|
# File 'lib/package/audit/cli.rb', line 64
def version
puts "package-audit #{VERSION}"
end
|
#vulnerable(dir = Dir.pwd) ⇒ Object
54
55
56
|
# File 'lib/package/audit/cli.rb', line 54
def vulnerable(dir = Dir.pwd)
within_rescue_block { exit CommandParser.new(dir, options, Enum::Report::VULNERABLE).run }
end
|