Sha256: 2a96abc04908ce952c4ba6f00fe44a33e0bd434934b86ced549c27dd1dc3ab5c

Contents?: true

Size: 430 Bytes

Versions: 8

Compression:

Stored size: 430 Bytes

Contents

# frozen_string_literal: true

require 'uffizzi'
require 'uffizzi/auth_helper'

module Uffizzi
  class CLI::Logout
    include ApiClient

    def run
      return Uffizzi.ui.say('You are not logged in') unless Uffizzi::AuthHelper.signed_in?

      hostname = ConfigFile.read_option(:hostname)
      destroy_session(hostname)

      ConfigFile.delete
      Uffizzi.ui.say('You have been successfully logged out')
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
uffizzi-cli-0.4.0 lib/uffizzi/cli/logout.rb
uffizzi-cli-0.3.8 lib/uffizzi/cli/logout.rb
uffizzi-cli-0.3.7 lib/uffizzi/cli/logout.rb
uffizzi-cli-0.3.6 lib/uffizzi/cli/logout.rb
uffizzi-cli-0.3.5 lib/uffizzi/cli/logout.rb
uffizzi-cli-0.3.4 lib/uffizzi/cli/logout.rb
uffizzi-cli-0.3.3 lib/uffizzi/cli/logout.rb
uffizzi-cli-0.3.2 lib/uffizzi/cli/logout.rb