require 'tty-prompt' module PolyglotIos module Helper module Terminal def success(message = 'Success!') prompt.ok(message) end def prompt @prompt ||= TTY::Prompt.new(interrupt: :exit) end def generate_token_message(token_env_variable = nil) token_env_variable ||= PolyglotIos::DEFAULT_TOKEN_ENVIRONMENT_VARIABLE return <<~MESSAGE 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. zsh: echo '\\nexport #{token_env_variable}=' >> ~/.zshrc source ~/.zshrc bash: echo '\\nexport #{token_env_variable}=' >> ~/.bashrc source ~/.bashrc MESSAGE end end end end