Sha256: c4e9c7d70f8174ff781461c3dbc279715fce7f8197dc316e7d0f63fd19484b6e

Contents?: true

Size: 488 Bytes

Versions: 47

Compression:

Stored size: 488 Bytes

Contents

# frozen_string_literal: true

require 'uffizzi'
require 'uffizzi/auth_helper'

module Uffizzi
  class Cli::Logout
    include ApiClient

    def initialize(options)
      @options = options
    end

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

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

      AuthHelper.sign_out
      Uffizzi.ui.say('You have been successfully logged out')
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
uffizzi-cli-2.4.11 lib/uffizzi/cli/logout.rb
uffizzi-cli-2.4.10 lib/uffizzi/cli/logout.rb
uffizzi-cli-2.4.9 lib/uffizzi/cli/logout.rb
uffizzi-cli-2.4.8 lib/uffizzi/cli/logout.rb
uffizzi-cli-2.4.7 lib/uffizzi/cli/logout.rb
uffizzi-cli-2.4.6 lib/uffizzi/cli/logout.rb
uffizzi-cli-2.4.5 lib/uffizzi/cli/logout.rb
uffizzi-cli-2.4.4 lib/uffizzi/cli/logout.rb
uffizzi-cli-2.4.3 lib/uffizzi/cli/logout.rb
uffizzi-cli-2.4.2 lib/uffizzi/cli/logout.rb
uffizzi-cli-2.4.1 lib/uffizzi/cli/logout.rb
uffizzi-cli-2.4.0 lib/uffizzi/cli/logout.rb
uffizzi-cli-2.3.4 lib/uffizzi/cli/logout.rb
uffizzi-cli-2.3.3 lib/uffizzi/cli/logout.rb
uffizzi-cli-2.3.2 lib/uffizzi/cli/logout.rb
uffizzi-cli-2.3.1 lib/uffizzi/cli/logout.rb
uffizzi-cli-2.3.0 lib/uffizzi/cli/logout.rb
uffizzi-cli-2.2.2 lib/uffizzi/cli/logout.rb
uffizzi-cli-2.2.1 lib/uffizzi/cli/logout.rb
uffizzi-cli-2.2.0 lib/uffizzi/cli/logout.rb