Module: PolyglotIos::Helper::Terminal
- Included in:
- Command::Login, Command::Projects, Command::Pull, Command::Setup, ErrorHandler, General
- Defined in:
- lib/ios_polyglot_cli/helpers/terminal.rb
Instance Method Summary collapse
- #generate_token_message(token_env_variable = nil) ⇒ Object
- #prompt ⇒ Object
- #success(message = 'Success!') ⇒ Object
Instance Method Details
#generate_token_message(token_env_variable = nil) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/ios_polyglot_cli/helpers/terminal.rb', line 15 def (token_env_variable = nil) token_env_variable ||= PolyglotIos::DEFAULT_TOKEN_ENVIRONMENT_VARIABLE return " To generate an Auth Token, please visit Polyglot website ( for Infinum https://infinum.polyglothq.com ), generate a new token under Settings -> Security and store it in your environment variables under \#{token_env_variable} variable.\n\n zsh:\n echo '\\\\nexport \#{token_env_variable}=<YOUR_AUTH_TOKEN>' >> ~/.zshrc\n source ~/.zshrc\n bash:\n echo '\\\\nexport \#{token_env_variable}=<YOUR_AUTH_TOKEN>' >> ~/.bashrc\n source ~/.bashrc\n MESSAGE\nend\n" |
#prompt ⇒ Object
11 12 13 |
# File 'lib/ios_polyglot_cli/helpers/terminal.rb', line 11 def prompt @prompt ||= TTY::Prompt.new(interrupt: :exit) end |
#success(message = 'Success!') ⇒ Object
7 8 9 |
# File 'lib/ios_polyglot_cli/helpers/terminal.rb', line 7 def success( = 'Success!') prompt.ok() end |