lib/gooddata/commands/auth.rb
# Ask for credentials and store them
Ask for credentials and store them
Ask for credentials and store them
def store(credentials_file_path = Helpers::AuthHelper.credentials_file)
          puts 'This will store credntials to GoodData in an enencrypted form to your harddrive to file ~/.gooddata.'
          overwrite = GoodData::CLI.terminal.ask('Do you want to continue? (y/n)')
          return if overwrite != 'y'
          credentials = ask_for_credentials
          ovewrite = if File.exist?(credentials_file_path)
                       GoodData::CLI.terminal.ask('Overwrite existing stored credentials (y/n)')
                     else
                       'y'
                     end
          if ovewrite == 'y'
            Helpers::AuthHelper.write_credentials(credentials, credentials_file_path)
          else
            puts 'Aborting...'
          end
        end
def store ( credentials_file_path = Helpers :: AuthHelper . credentials_file ) puts 'This will store credntials to GoodData in an enencrypted form to your harddrive to file ~/.gooddata.' overwrite = GoodData :: CLI . terminal . ask ( 'Do you want to continue? (y/n)' ) return if overwrite != 'y' credentials = ask_for_credentials ovewrite = if File . exist? ( credentials_file_path ) GoodData :: CLI . terminal . ask ( 'Overwrite existing stored credentials (y/n)' ) else 'y' end if ovewrite == 'y' Helpers :: AuthHelper . write_credentials ( credentials , credentials_file_path ) else puts 'Aborting...' end end
Ask for credentials and store them
Ask for credentials and store them
credentials_file_path
credentials_file