Class: KExt::Github::GitHubConfiguration

Inherits:
Object
  • Object
show all
Includes:
KLog::Logging, KUtil::Data::InstanceVariablesToH
Defined in:
lib/k_ext/github/github_configuration.rb

Overview

GitHub Configuration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGitHubConfiguration

Returns a new instance of GitHubConfiguration.



26
27
28
29
30
# File 'lib/k_ext/github/github_configuration.rb', line 26

def initialize
  @user = ENV.fetch('GH_USER') { ENV.fetch('GITHUB_USER', nil) }
  @personal_access_token = ENV.fetch('GITHUB_PERSONAL_ACCESS_TOKEN', nil)
  @personal_access_token_delete = ENV.fetch('GITHUB_PERSONAL_ACCESS_TOKEN_DELETE', nil)
end

Instance Attribute Details

#personal_access_tokenObject

Returns the value of attribute personal_access_token.



23
24
25
# File 'lib/k_ext/github/github_configuration.rb', line 23

def personal_access_token
  @personal_access_token
end

#personal_access_token_deleteObject

Returns the value of attribute personal_access_token_delete.



24
25
26
# File 'lib/k_ext/github/github_configuration.rb', line 24

def personal_access_token_delete
  @personal_access_token_delete
end

#userObject

Returns the value of attribute user.



22
23
24
# File 'lib/k_ext/github/github_configuration.rb', line 22

def user
  @user
end

Instance Method Details

#debugObject



32
33
34
35
36
37
# File 'lib/k_ext/github/github_configuration.rb', line 32

def debug
  log.section_heading 'GitHub Configuration'
  log.kv 'user', user
  log.kv 'personal_access_token', '***'
  log.kv 'personal_access_token_delete', '***'
end