honeybadger 4.0.0 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd1a07eb33ec42cce8c7c6d96bc3288e8d0279a972d4a7828116caae0f93bd8d
4
- data.tar.gz: 36cde090bab29995bcb96a34b53e69a6f7d2eb558b5829e68715a7a05e8f62b2
3
+ metadata.gz: 0d010f2e523efe0185206367bd3d32bfd8984ea0b6e995432772eee392676a5a
4
+ data.tar.gz: bdef4e603e16d0b256f2288bd2b37ebe52affa9b7803c37ef0ebfbb7bd931f14
5
5
  SHA512:
6
- metadata.gz: e2545a49f6d994af837afc5add427d9049a8a5f67170b7ee701b124a010f14783484d9ad10215ac5dfa5fc4e3058a4a8774dbd74463a61bfae556466b98a94a3
7
- data.tar.gz: 74907484ab440182d22054624c59c22cac00a07d14551efeaa2ff1df4f1fb60c08991a4fd13ef576589aaa671d7239d6762ed7aad8012c6af8c2dd1af22fcf07
6
+ metadata.gz: 8c0b7043750663369c7521b5987942b50dc472cd84bc90c5c773ec870b7e37676091bff5ad51a6c3725a608abd012063ccf510a83936ceb3a8b540e00c864739
7
+ data.tar.gz: 8653f1dd66da018309fd5dbb9f77f851a07be313822b79c830cd41b9f9222f602153dbb4314d174dac133521124ad27f5b44d984a3cf0f4e80b3c05baa78e5a8
@@ -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.exception_fingerprint = 'new fingerprint'
91
+ notice.fingerprint = 'new fingerprint'
84
92
  end
85
93
  end
86
94
  ```
@@ -24,8 +24,9 @@ module Honeybadger
24
24
 
25
25
  class Main < Thor
26
26
  def self.project_options
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")'
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
- load_rails_env(environment_rb) if File.exist?(environment_rb)
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'
@@ -1,4 +1,4 @@
1
1
  module Honeybadger
2
2
  # The current String Honeybadger version.
3
- VERSION = '4.0.0'.freeze
3
+ VERSION = '4.1.0'.freeze
4
4
  end
@@ -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
- super unless size == max_size
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.0.0
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-08-21 00:00:00.000000000 Z
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: