Class: Sem::API::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/sem/api/base.rb

Constant Summary collapse

CREDENTIALS_PATH =
"~/.sem/credentials".freeze

Class Method Summary collapse

Class Method Details

.clientObject



6
7
8
9
10
11
12
13
14
# File 'lib/sem/api/base.rb', line 6

def self.client
  @client ||= begin
    path = File.expand_path(CREDENTIALS_PATH)

    auth_token = File.read(path).delete("\n")

    SemaphoreClient.new(auth_token)
  end
end