Class: Api::Clients::Mend
- Inherits:
-
Object
- Object
- Api::Clients::Mend
- Defined in:
- lib/api/clients/mend.rb
Constant Summary collapse
- MEND_API =
"https://saas.whitesourcesoftware.com/api/v1.4"
- ORG_TOKEN =
ENV["MEND_ORG_TOKEN"]
- USER_KEY =
ENV["MEND_USER_KEY"]
Instance Attribute Summary collapse
-
#gitlab_url ⇒ Object
Returns the value of attribute gitlab_url.
-
#product ⇒ Object
Returns the value of attribute product.
-
#project ⇒ Object
Returns the value of attribute project.
Instance Method Summary collapse
-
#initialize(product:, project:, gitlab_url:) ⇒ Mend
constructor
Public: - product: product name - project: project name - gitlab_url: gitlab project url.
-
#project_tags ⇒ Object
Public: get project tags.
-
#tag_project! ⇒ Object
Public: tag the project with gitlab url.
Constructor Details
#initialize(product:, project:, gitlab_url:) ⇒ Mend
Public:
-
product: product name
-
project: project name
-
gitlab_url: gitlab project url
22 23 24 25 26 |
# File 'lib/api/clients/mend.rb', line 22 def initialize(product:, project:, gitlab_url:) @gitlab_url = gitlab_url @product = product @project = project end |
Instance Attribute Details
#gitlab_url ⇒ Object
Returns the value of attribute gitlab_url.
11 12 13 |
# File 'lib/api/clients/mend.rb', line 11 def gitlab_url @gitlab_url end |
#product ⇒ Object
Returns the value of attribute product.
11 12 13 |
# File 'lib/api/clients/mend.rb', line 11 def product @product end |
#project ⇒ Object
Returns the value of attribute project.
11 12 13 |
# File 'lib/api/clients/mend.rb', line 11 def project @project end |
Instance Method Details
#project_tags ⇒ Object
Public: get project tags
34 35 36 |
# File 'lib/api/clients/mend.rb', line 34 def post_call()["projectTags"].first["tags"] end |
#tag_project! ⇒ Object
Public: tag the project with gitlab url
29 30 31 |
# File 'lib/api/clients/mend.rb', line 29 def tag_project! save_project_tag tag: "gitlab-url", value: gitlab_url end |