Sha256: cf055fb731437c4f380f6c6093003169cc53ef5a5fa4b94142c7524ebd7ced55

Contents?: true

Size: 951 Bytes

Versions: 10

Compression:

Stored size: 951 Bytes

Contents

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}=<YOUR_AUTH_TOKEN>' >> ~/.zshrc
              source ~/.zshrc
          bash:
              echo '\\nexport #{token_env_variable}=<YOUR_AUTH_TOKEN>' >> ~/.bashrc
              source ~/.bashrc
        MESSAGE
      end

    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ios_polyglot_cli-2.8.1 lib/ios_polyglot_cli/helpers/terminal.rb
ios_polyglot_cli-2.8.0 lib/ios_polyglot_cli/helpers/terminal.rb
ios_polyglot_cli-2.7.3 lib/ios_polyglot_cli/helpers/terminal.rb
ios_polyglot_cli-2.7.2 lib/ios_polyglot_cli/helpers/terminal.rb
ios_polyglot_cli-2.7.1 lib/ios_polyglot_cli/helpers/terminal.rb
ios_polyglot_cli-2.7.0 lib/ios_polyglot_cli/helpers/terminal.rb
ios_polyglot_cli-2.6.3 lib/ios_polyglot_cli/helpers/terminal.rb
ios_polyglot_cli-2.6.2 lib/ios_polyglot_cli/helpers/terminal.rb
ios_polyglot_cli-2.6.1 lib/ios_polyglot_cli/helpers/terminal.rb
ios_polyglot_cli-2.6.0 lib/ios_polyglot_cli/helpers/terminal.rb