honeybadger 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -1
- data/lib/honeybadger/cli/main.rb +17 -6
- data/lib/honeybadger/version.rb +1 -1
- data/lib/honeybadger/worker.rb +4 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d010f2e523efe0185206367bd3d32bfd8984ea0b6e995432772eee392676a5a
|
4
|
+
data.tar.gz: bdef4e603e16d0b256f2288bd2b37ebe52affa9b7803c37ef0ebfbb7bd931f14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c0b7043750663369c7521b5987942b50dc472cd84bc90c5c773ec870b7e37676091bff5ad51a6c3725a608abd012063ccf510a83936ceb3a8b540e00c864739
|
7
|
+
data.tar.gz: 8653f1dd66da018309fd5dbb9f77f851a07be313822b79c830cd41b9f9222f602153dbb4314d174dac133521124ad27f5b44d984a3cf0f4e80b3c05baa78e5a8
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,14 @@ adheres to [Semantic Versioning](http://semver.org/).
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [4.1.0] - 2018-10-16
|
9
|
+
### Added
|
10
|
+
- Added flag `--skip-rails-load` to cli commands for optionally skipping Rails initialization when running from a Rails root.
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
- Added missing Backend::Server#check_in specs
|
14
|
+
- Fix a memory leak in the worker queue (jruby)
|
15
|
+
|
8
16
|
## [4.0.0] - 2018-08-21
|
9
17
|
### Added
|
10
18
|
- Added `before_notify` hooks to be defined, this allows setting up of multiple
|
@@ -80,7 +88,7 @@ adheres to [Semantic Versioning](http://semver.org/).
|
|
80
88
|
```ruby
|
81
89
|
Honeybadger.configure do |config|
|
82
90
|
config.before_notify do |notice|
|
83
|
-
notice.
|
91
|
+
notice.fingerprint = 'new fingerprint'
|
84
92
|
end
|
85
93
|
end
|
86
94
|
```
|
data/lib/honeybadger/cli/main.rb
CHANGED
@@ -24,8 +24,9 @@ module Honeybadger
|
|
24
24
|
|
25
25
|
class Main < Thor
|
26
26
|
def self.project_options
|
27
|
-
option :api_key,
|
28
|
-
option :environment,
|
27
|
+
option :api_key, required: false, aliases: :'-k', type: :string, desc: 'Api key of your Honeybadger application'
|
28
|
+
option :environment, required: false, aliases: [:'-e', :'-env'], type: :string, desc: 'Environment this command is being executed in (i.e. "production", "staging")'
|
29
|
+
option :skip_rails_load, required: false, type: :boolean, desc: 'Flag to skip rails initialization'
|
29
30
|
end
|
30
31
|
|
31
32
|
def help(*args, &block)
|
@@ -138,7 +139,7 @@ WELCOME
|
|
138
139
|
end
|
139
140
|
|
140
141
|
def build_config(options)
|
141
|
-
load_env
|
142
|
+
load_env(options)
|
142
143
|
|
143
144
|
config = Honeybadger.config
|
144
145
|
config.set(:report_data, true)
|
@@ -148,15 +149,25 @@ WELCOME
|
|
148
149
|
config
|
149
150
|
end
|
150
151
|
|
151
|
-
def load_env
|
152
|
+
def load_env(options)
|
152
153
|
# Initialize Rails when running from Rails root.
|
153
154
|
environment_rb = File.join(Dir.pwd, 'config', 'environment.rb')
|
154
|
-
|
155
|
-
|
155
|
+
if File.exist?(environment_rb)
|
156
|
+
load_rails_env_if_allowed(environment_rb, options)
|
157
|
+
end
|
156
158
|
# Ensure config is loaded (will be skipped if initialized by Rails).
|
157
159
|
Honeybadger.config.load!
|
158
160
|
end
|
159
161
|
|
162
|
+
def load_rails_env_if_allowed(environment_rb, options)
|
163
|
+
# Skip Rails initialization according to option flag
|
164
|
+
if options.has_key?('skip_rails_load') && fetch_value(options, 'skip_rails_load')
|
165
|
+
say("Skipping Rails initialization.")
|
166
|
+
else
|
167
|
+
load_rails_env(environment_rb)
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
160
171
|
def load_rails_env(environment_rb)
|
161
172
|
begin
|
162
173
|
require 'rails'
|
data/lib/honeybadger/version.rb
CHANGED
data/lib/honeybadger/worker.rb
CHANGED
@@ -19,12 +19,15 @@ module Honeybadger
|
|
19
19
|
attr_reader :max_size
|
20
20
|
|
21
21
|
def initialize(max_size)
|
22
|
+
@mutex = Mutex.new
|
22
23
|
@max_size = max_size
|
23
24
|
super()
|
24
25
|
end
|
25
26
|
|
26
27
|
def push(msg)
|
27
|
-
|
28
|
+
@mutex.synchronize do
|
29
|
+
super unless size >= max_size
|
30
|
+
end
|
28
31
|
end
|
29
32
|
end
|
30
33
|
|
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.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Honeybadger Industries LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Make managing application errors a more pleasant experience.
|
14
14
|
email:
|