Class: CiToolkit::GitlabBot::Credentials
- Inherits:
-
Object
- Object
- CiToolkit::GitlabBot::Credentials
- Defined in:
- lib/ci_toolkit/gitlab_bot.rb
Overview
Provides an endpoint and a private access token that can be used with the Gitlab client
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
-
#project_access_token ⇒ Object
readonly
Returns the value of attribute project_access_token.
Instance Method Summary collapse
-
#initialize(endpoint = ENV.fetch("GITLAB_API_URL", nil), project_access_token = ENV.fetch("GITLAB_PROJECT_ACCESS_TOKEN", nil)) ⇒ Credentials
constructor
A new instance of Credentials.
Constructor Details
#initialize(endpoint = ENV.fetch("GITLAB_API_URL", nil), project_access_token = ENV.fetch("GITLAB_PROJECT_ACCESS_TOKEN", nil)) ⇒ Credentials
Returns a new instance of Credentials.
14 15 16 17 18 19 20 |
# File 'lib/ci_toolkit/gitlab_bot.rb', line 14 def initialize( endpoint = ENV.fetch("GITLAB_API_URL", nil), project_access_token = ENV.fetch("GITLAB_PROJECT_ACCESS_TOKEN", nil) ) @endpoint = endpoint @project_access_token = project_access_token end |
Instance Attribute Details
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
12 13 14 |
# File 'lib/ci_toolkit/gitlab_bot.rb', line 12 def endpoint @endpoint end |
#project_access_token ⇒ Object (readonly)
Returns the value of attribute project_access_token.
12 13 14 |
# File 'lib/ci_toolkit/gitlab_bot.rb', line 12 def project_access_token @project_access_token end |