honeybadger 4.7.3 → 4.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/honeybadger/agent.rb +23 -0
- data/lib/honeybadger/backend/base.rb +9 -0
- data/lib/honeybadger/singleton.rb +1 -0
- data/lib/honeybadger/util/revision.rb +1 -1
- data/lib/honeybadger/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3ec66f5016be98ed5d5a4d805a7dca2069a1c585ac10809813acd999a4f96eb
|
4
|
+
data.tar.gz: d7a4179a6bfad487e789749ca3e38d90bc84cc4bfa1b4fbc2ce48b48a233023c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5b6a551d2d3fe7feca0d4c9c02878e476a5478532475a50b46f84801ede717ea7909903c8b267f33cf62fd1dac22d8258905e86fc764f372ce63bd7bdfcd400
|
7
|
+
data.tar.gz: d143a769fe1407606480ca83415e63c937bf7d26d3ce1cbf436eefad84542c9079b6eb8659bbb31d10fadc9baa03a38e96601e7d5e08f8e8cea9a1a0fee26ebc
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,13 @@ adheres to [Semantic Versioning](http://semver.org/).
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [4.8.0] - 2021-03-16
|
9
|
+
### Fixed
|
10
|
+
- Suppress any error output from the `git rev-parse` command. ([#394](https://github.com/honeybadger-io/honeybadger-ruby/pull/394))
|
11
|
+
|
12
|
+
### Added
|
13
|
+
- Support deployment tracking in code (#397, @danleyden)
|
14
|
+
|
8
15
|
## [4.7.3] - 2021-02-10
|
9
16
|
### Fixed
|
10
17
|
- Don't enable Lambda plugin in non-Lambda execution environments
|
data/lib/honeybadger/agent.rb
CHANGED
@@ -190,6 +190,29 @@ module Honeybadger
|
|
190
190
|
response.success?
|
191
191
|
end
|
192
192
|
|
193
|
+
# Track a new deployment
|
194
|
+
#
|
195
|
+
# @example
|
196
|
+
# Honeybadger.track_deployment(revision: 'be2ceb6')
|
197
|
+
#
|
198
|
+
# @param [String] :env The environment name. Defaults to the current configured environment.
|
199
|
+
# @param [String] :revision The VCS revision being deployed. Defaults to the currently configured revision.
|
200
|
+
# @param [String] :local_username The name of the user who performed the deploy.
|
201
|
+
# @param [String] :repository The base URL of the VCS repository. It should be HTTPS-style.
|
202
|
+
#
|
203
|
+
# @return [Boolean] true if the deployment was successfully tracked and false
|
204
|
+
# otherwise.
|
205
|
+
def track_deployment(env: nil, revision: nil, local_username: nil, repository: nil)
|
206
|
+
opts = {
|
207
|
+
env: env || config[:env],
|
208
|
+
revision: revision || config[:revision],
|
209
|
+
local_username: local_username,
|
210
|
+
repository: repository
|
211
|
+
}
|
212
|
+
response = backend.track_deployment(opts)
|
213
|
+
response.success?
|
214
|
+
end
|
215
|
+
|
193
216
|
# Save global context for the current request.
|
194
217
|
#
|
195
218
|
# @example
|
@@ -99,6 +99,15 @@ module Honeybadger
|
|
99
99
|
raise NotImplementedError, 'must define #check_in on subclass.'
|
100
100
|
end
|
101
101
|
|
102
|
+
# Track a deployment
|
103
|
+
# @example
|
104
|
+
# backend.track_deployment({ revision: 'be2ceb6' })
|
105
|
+
#
|
106
|
+
# @param [#to_json] payload The JSON payload containing all deployment data.
|
107
|
+
def track_deployment(payload)
|
108
|
+
notify(:deploys, payload)
|
109
|
+
end
|
110
|
+
|
102
111
|
private
|
103
112
|
|
104
113
|
attr_reader :config
|
@@ -37,6 +37,7 @@ module Honeybadger
|
|
37
37
|
def_delegator :'Honeybadger::Agent.instance', :add_breadcrumb
|
38
38
|
def_delegator :'Honeybadger::Agent.instance', :breadcrumbs
|
39
39
|
def_delegator :'Honeybadger::Agent.instance', :clear!
|
40
|
+
def_delegator :'Honeybadger::Agent.instance', :track_deployment
|
40
41
|
|
41
42
|
# @!macro [attach] def_delegator
|
42
43
|
# @!method $2(...)
|
data/lib/honeybadger/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: honeybadger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Honeybadger Industries LLC
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Make managing application errors a more pleasant experience.
|
14
14
|
email:
|
@@ -135,7 +135,7 @@ homepage: https://github.com/honeybadger-io/honeybadger-ruby
|
|
135
135
|
licenses:
|
136
136
|
- MIT
|
137
137
|
metadata: {}
|
138
|
-
post_install_message:
|
138
|
+
post_install_message:
|
139
139
|
rdoc_options:
|
140
140
|
- "--markup=tomdoc"
|
141
141
|
- "--main=README.md"
|
@@ -153,8 +153,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
153
|
- !ruby/object:Gem::Version
|
154
154
|
version: '0'
|
155
155
|
requirements: []
|
156
|
-
rubygems_version: 3.
|
157
|
-
signing_key:
|
156
|
+
rubygems_version: 3.1.4
|
157
|
+
signing_key:
|
158
158
|
specification_version: 4
|
159
159
|
summary: Error reports you can be happy about.
|
160
160
|
test_files: []
|