Class: CircleciDeploymentNotifier::NewRelic
- Inherits:
-
Object
- Object
- CircleciDeploymentNotifier::NewRelic
- Defined in:
- lib/circleci_deployment_notifier/new_relic.rb
Overview
Sends deployment notification to New Relic. Builds the message using a BuildInfo object.
Instance Method Summary collapse
-
#initialize(new_relic_api_key:, new_relic_app_id:, build_info:) ⇒ NewRelic
constructor
A new instance of NewRelic.
-
#send ⇒ Boolean
Sends the deployment notification to New Relic.
Constructor Details
#initialize(new_relic_api_key:, new_relic_app_id:, build_info:) ⇒ NewRelic
14 15 16 17 18 |
# File 'lib/circleci_deployment_notifier/new_relic.rb', line 14 def initialize(new_relic_api_key:, new_relic_app_id:, build_info:) self.new_relic_api_key = new_relic_api_key self.new_relic_app_id = new_relic_app_id self.build_info = build_info end |
Instance Method Details
#send ⇒ Boolean
Sends the deployment notification to New Relic.
23 24 25 |
# File 'lib/circleci_deployment_notifier/new_relic.rb', line 23 def send http_response.code == 201 end |