module PortalModule::Command::ClientAccess
Private Instance Methods
client()
click to toggle source
# File lib/portal_module/command/client_access.rb, line 23 def client return @client unless @client.nil? @client = PortalModule.client @client.env = options[:environment] unless options[:environment].nil? user, pass = credentials if user.empty? || pass.empty? say "missing credentials", :red return end @client.user = user @client.password = pass @client end
credentials()
click to toggle source
# File lib/portal_module/command/client_access.rb, line 11 def credentials config = PortalModule.configuration user, pass = config.user_credentials if user.nil? || pass.nil? user = ask "username for #{config.current_env} environment:" pass = ask "password:", echo: false # Force a new line - hiding the echo on the password eats the new line. say "\n" end [user, pass] end