Class: Neetob::CLI::MonthlyAudit::Perform
- Defined in:
- lib/neetob/cli/monthly_audit/perform.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#month ⇒ Object
Returns the value of attribute month.
-
#sandbox ⇒ Object
Returns the value of attribute sandbox.
-
#skip_issue ⇒ Object
Returns the value of attribute skip_issue.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(month, sandbox = false, skip_issue = false) ⇒ Perform
constructor
A new instance of Perform.
- #run ⇒ Object
Methods included from Utils
#camel_case_to_slug, #is_upper?, #symbolize_keys
Constructor Details
#initialize(month, sandbox = false, skip_issue = false) ⇒ Perform
14 15 16 17 18 19 |
# File 'lib/neetob/cli/monthly_audit/perform.rb', line 14 def initialize(month, sandbox = false, skip_issue = false) super() @month = month @sandbox = sandbox @skip_issue = skip_issue end |
Instance Attribute Details
#month ⇒ Object
Returns the value of attribute month.
12 13 14 |
# File 'lib/neetob/cli/monthly_audit/perform.rb', line 12 def month @month end |
#sandbox ⇒ Object
Returns the value of attribute sandbox.
12 13 14 |
# File 'lib/neetob/cli/monthly_audit/perform.rb', line 12 def sandbox @sandbox end |
#skip_issue ⇒ Object
Returns the value of attribute skip_issue.
12 13 14 |
# File 'lib/neetob/cli/monthly_audit/perform.rb', line 12 def skip_issue @skip_issue end |
Instance Method Details
#run ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/neetob/cli/monthly_audit/perform.rb', line 21 def run Thread.current[:month] = month Thread.current[:skip_issue] = skip_issue Thread.current[:audit_mode] = true markdown_file_name = "audit-report-#{DateTime.now.to_i}.md" Thread.current[:markdown_file_name] = markdown_file_name ui.success("## Starting the audit for #{month}") ui.info "\n" ui.say("## Issue creation is #{skip_issue ? 'disabled' : 'enabled'}") ui.info "\n" Security::Main.new.run ui.info "\n" Databases::Main.new.run ui.info "\n" InstancesAndAddons::Main.new.run ui.info "\n" Misc::Main.new.run ui.info "\n" `rm -rf /tmp/neetob` ui.success("## Audit for #{month} completed successfully.") ui.success("## Audit report is written to #{markdown_file_name}") ui.success("## Please update the manual audit part and post the audit in Github.") end |