Class: Gitrob::CLI::Commands::AcceptTermsOfUse

Inherits:
Gitrob::CLI::Command show all
Defined in:
lib/gitrob/cli/commands/accept_terms_of_use.rb

Constant Summary collapse

AGREEMENT_FILE_PATH =
File.expand_path(
"../../../../../agreement.txt", __FILE__)
LICENSE_FILE_PATH =
File.expand_path(
"../../../../../LICENSE.txt", __FILE__)
AGREEMENT =
"Gitrob is designed for security professionals. " \
"If you use any information\nfound through this " \
"tool for malicious purposes that are not " \
"authorized by\nthe target, you are " \
"violating the terms of use and license of " \
"this\ntool. By typing y/yes, you agree to the " \
"terms of use and that you will use\nthis tool " \
"for lawful purposes only."
VALID_ANSWERS =
%w(y yes n no)
POSITIVE_ANSWERS =
%w(y yes)

Instance Attribute Summary

Attributes inherited from Gitrob::CLI::Command

#options

Instance Method Summary collapse

Methods inherited from Gitrob::CLI::Command

#debug, #debugging_enabled?, #error, #fatal, #info, #output, #progress_bar, start, #task, #thread_pool, #warn

Constructor Details

#initialize(options) ⇒ AcceptTermsOfUse

Returns a new instance of AcceptTermsOfUse.



23
24
25
26
27
28
# File 'lib/gitrob/cli/commands/accept_terms_of_use.rb', line 23

def initialize(options)
  @options = options
  return if terms_of_use_accepted?
  present_terms_of_use
  handle_user_input
end