Class: QAT::Reporter::Xray::Publisher::Base
- Inherits:
-
Object
- Object
- QAT::Reporter::Xray::Publisher::Base
- Includes:
- Logger
- Defined in:
- lib/qat/reporter/xray/publisher/base.rb
Overview
QAT::Reporter::Xray::Publisher::Base integrator class
Defined Under Namespace
Classes: Client
Instance Attribute Summary collapse
-
#base_url ⇒ Object
readonly
Returns the value of attribute base_url.
-
#cloud_xray_api_credentials ⇒ Object
readonly
Returns the value of attribute cloud_xray_api_credentials.
-
#default_cloud_api_url ⇒ Object
readonly
Returns the value of attribute default_cloud_api_url.
-
#default_headers ⇒ Object
readonly
Get the default headers for Xray (‘password’ in Xray API is password).
-
#login_credentials ⇒ Object
readonly
Returns the value of attribute login_credentials.
Instance Method Summary collapse
-
#create_issue(data) ⇒ Object
Creates a Jira issue.
-
#initialize ⇒ Base
constructor
Initializes Xray Publisher url and login information.
Constructor Details
#initialize ⇒ Base
Initializes Xray Publisher url and login information
19 20 21 22 23 24 |
# File 'lib/qat/reporter/xray/publisher/base.rb', line 19 def initialize @base_url = QAT::Reporter::Xray::Config.jira_url @login_credentials = QAT::Reporter::Xray::Config.login_credentials @default_cloud_api_url = QAT::Reporter::Xray::Config.xray_default_api_url @cloud_xray_api_credentials = QAT::Reporter::Xray::Config.cloud_xray_api_credentials end |
Instance Attribute Details
#base_url ⇒ Object (readonly)
Returns the value of attribute base_url.
16 17 18 |
# File 'lib/qat/reporter/xray/publisher/base.rb', line 16 def base_url @base_url end |
#cloud_xray_api_credentials ⇒ Object (readonly)
Returns the value of attribute cloud_xray_api_credentials.
16 17 18 |
# File 'lib/qat/reporter/xray/publisher/base.rb', line 16 def cloud_xray_api_credentials @cloud_xray_api_credentials end |
#default_cloud_api_url ⇒ Object (readonly)
Returns the value of attribute default_cloud_api_url.
16 17 18 |
# File 'lib/qat/reporter/xray/publisher/base.rb', line 16 def default_cloud_api_url @default_cloud_api_url end |
#default_headers ⇒ Object (readonly)
Get the default headers for Xray (‘password’ in Xray API is password)
33 34 35 |
# File 'lib/qat/reporter/xray/publisher/base.rb', line 33 def default_headers @default_headers end |
#login_credentials ⇒ Object (readonly)
Returns the value of attribute login_credentials.
16 17 18 |
# File 'lib/qat/reporter/xray/publisher/base.rb', line 16 def login_credentials @login_credentials end |
Instance Method Details
#create_issue(data) ⇒ Object
Creates a Jira issue
27 28 29 |
# File 'lib/qat/reporter/xray/publisher/base.rb', line 27 def create_issue(data) Client.new(base_url).post('/rest/api/2/issue', data.to_json, default_headers) end |