Class: Api::Clients::Sonarqube
- Inherits:
-
Object
- Object
- Api::Clients::Sonarqube
- Defined in:
- lib/api/clients/sonarqube.rb
Constant Summary collapse
- SQ_API =
"https://sonarqube.sportradar.ag/api"
- TOKEN =
ENV["SQ_TOKEN"]
- USER =
ENV["SQ_USER"]
Instance Attribute Summary collapse
-
#gitlab_url ⇒ Object
Returns the value of attribute gitlab_url.
-
#project ⇒ Object
Returns the value of attribute project.
Instance Method Summary collapse
-
#initialize(project:, gitlab_url:) ⇒ Sonarqube
constructor
Public: - project: project key - gitlab_url: gitlab project url.
-
#link_project! ⇒ Object
Public: create link of project with gitlab’s url.
-
#project_links ⇒ Object
Public: get project links.
Constructor Details
#initialize(project:, gitlab_url:) ⇒ Sonarqube
Public:
-
project: project key
-
gitlab_url: gitlab project url
20 21 22 23 |
# File 'lib/api/clients/sonarqube.rb', line 20 def initialize(project:, gitlab_url:) @gitlab_url = gitlab_url @project = project end |
Instance Attribute Details
#gitlab_url ⇒ Object
Returns the value of attribute gitlab_url.
11 12 13 |
# File 'lib/api/clients/sonarqube.rb', line 11 def gitlab_url @gitlab_url end |
#project ⇒ Object
Returns the value of attribute project.
11 12 13 |
# File 'lib/api/clients/sonarqube.rb', line 11 def project @project end |
Instance Method Details
#link_project! ⇒ Object
Public: create link of project with gitlab’s url
26 27 28 29 |
# File 'lib/api/clients/sonarqube.rb', line 26 def link_project! return if project_has_link? post_call save_link_url end |
#project_links ⇒ Object
Public: get project links
32 33 34 |
# File 'lib/api/clients/sonarqube.rb', line 32 def project_links get_call(get_links_url)["links"] end |