airbrake-ruby 5.1.1-java → 5.2.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/airbrake-ruby/config.rb +14 -7
- data/lib/airbrake-ruby/config/processor.rb +2 -1
- data/lib/airbrake-ruby/file_cache.rb +1 -1
- data/lib/airbrake-ruby/filters/thread_filter.rb +1 -2
- data/lib/airbrake-ruby/grouppable.rb +1 -1
- data/lib/airbrake-ruby/mergeable.rb +1 -1
- data/lib/airbrake-ruby/remote_settings.rb +1 -1
- data/lib/airbrake-ruby/remote_settings/callback.rb +1 -1
- data/lib/airbrake-ruby/remote_settings/settings_data.rb +1 -1
- data/lib/airbrake-ruby/version.rb +2 -2
- data/spec/config/processor_spec.rb +9 -0
- data/spec/config_spec.rb +1 -0
- data/spec/filters/thread_filter_spec.rb +1 -1
- data/spec/tdigest_spec.rb +1 -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: f03821ae0b7ff2d1e1e0b7e1122e2fc8368c4cabd4fac5d623530dd7eafac33c
|
4
|
+
data.tar.gz: cf2234bd6fc61e439796b0f664163a12fdd4c39c4256a1c469f06dd1f8132de3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9980a80ea62fe7602ae7d689e3b35f439370d781b4d4001e4960b18705465fc3bed7f7a49b67eeb7249253c55c58a1ba9b87485979fd9cdb4c320c2a7e1aa67a
|
7
|
+
data.tar.gz: d13b77d0f959ff3a5326f054b8df67c9402b216038afd25672df8b6803623ac135bb5366739687fc5c234ae2e127d075828f747bb945d9ba4d48f3f354775f17
|
data/lib/airbrake-ruby/config.rb
CHANGED
@@ -121,15 +121,21 @@ module Airbrake
|
|
121
121
|
# @return [Boolean] true if the library should send error reports to
|
122
122
|
# Airbrake, false otherwise
|
123
123
|
# @api public
|
124
|
-
# @since
|
124
|
+
# @since v5.0.0
|
125
125
|
attr_accessor :error_notifications
|
126
126
|
|
127
|
-
# @return [String] the host
|
128
|
-
# configuration options
|
129
|
-
# @api
|
130
|
-
# @since
|
127
|
+
# @return [String] the host which should be used for fetching remote
|
128
|
+
# configuration options
|
129
|
+
# @api public
|
130
|
+
# @since v5.0.0
|
131
131
|
attr_accessor :remote_config_host
|
132
132
|
|
133
|
+
# @return [String] true if notifier should periodically fetch remote
|
134
|
+
# configuration, false otherwise
|
135
|
+
# @api public
|
136
|
+
# @since v5.2.0
|
137
|
+
attr_accessor :remote_config
|
138
|
+
|
133
139
|
class << self
|
134
140
|
# @return [Config]
|
135
141
|
attr_writer :instance
|
@@ -142,7 +148,7 @@ module Airbrake
|
|
142
148
|
|
143
149
|
# @param [Hash{Symbol=>Object}] user_config the hash to be used to build the
|
144
150
|
# config
|
145
|
-
# rubocop:disable Metrics/AbcSize
|
151
|
+
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
146
152
|
def initialize(user_config = {})
|
147
153
|
self.proxy = {}
|
148
154
|
self.queue_size = 100
|
@@ -173,10 +179,11 @@ module Airbrake
|
|
173
179
|
self.query_stats = true
|
174
180
|
self.job_stats = true
|
175
181
|
self.error_notifications = true
|
182
|
+
self.remote_config = true
|
176
183
|
|
177
184
|
merge(user_config)
|
178
185
|
end
|
179
|
-
# rubocop:enable Metrics/AbcSize
|
186
|
+
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength
|
180
187
|
|
181
188
|
# The full URL to the Airbrake Notice API. Based on the +:error_host+ option.
|
182
189
|
# @return [URI] the endpoint address
|
@@ -3,7 +3,7 @@ module Airbrake
|
|
3
3
|
# Processor is a helper class, which is responsible for setting default
|
4
4
|
# config values, default notifier filters and remote configuration changes.
|
5
5
|
#
|
6
|
-
# @since
|
6
|
+
# @since v5.0.0
|
7
7
|
# @api private
|
8
8
|
class Processor
|
9
9
|
# @param [Airbrake::Config] config
|
@@ -41,6 +41,7 @@ module Airbrake
|
|
41
41
|
|
42
42
|
# @return [Airbrake::RemoteSettings]
|
43
43
|
def process_remote_configuration
|
44
|
+
return unless @config.remote_config
|
44
45
|
return unless @project_id
|
45
46
|
return if @config.environment == 'test'
|
46
47
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
module Airbrake
|
4
4
|
# @return [String] the library version
|
5
5
|
# @api public
|
6
|
-
AIRBRAKE_RUBY_VERSION = '5.
|
6
|
+
AIRBRAKE_RUBY_VERSION = '5.2.0'.freeze
|
7
7
|
|
8
8
|
# @return [Hash{Symbol=>String}] the information about the notifier library
|
9
|
-
# @since
|
9
|
+
# @since v5.0.0
|
10
10
|
# @api public
|
11
11
|
NOTIFIER_INFO = {
|
12
12
|
name: 'airbrake-ruby'.freeze,
|
@@ -72,6 +72,15 @@ RSpec.describe Airbrake::Config::Processor do
|
|
72
72
|
described_class.new(config).process_remote_configuration
|
73
73
|
end
|
74
74
|
end
|
75
|
+
|
76
|
+
context "when the config disables the remote_config option" do
|
77
|
+
let(:config) { Airbrake::Config.new(project_id: 123, remote_config: false) }
|
78
|
+
|
79
|
+
it "doesn't set remote settings" do
|
80
|
+
expect(Airbrake::RemoteSettings).not_to receive(:poll)
|
81
|
+
described_class.new(config).process_remote_configuration
|
82
|
+
end
|
83
|
+
end
|
75
84
|
end
|
76
85
|
|
77
86
|
describe "#add_filters" do
|
data/spec/config_spec.rb
CHANGED
@@ -26,6 +26,7 @@ RSpec.describe Airbrake::Config do
|
|
26
26
|
its(:query_stats) { is_expected.to eq(true) }
|
27
27
|
its(:job_stats) { is_expected.to eq(true) }
|
28
28
|
its(:error_notifications) { is_expected.to eq(true) }
|
29
|
+
its(:remote_config) { is_expected.to eq(true) }
|
29
30
|
|
30
31
|
its(:remote_config_host) do
|
31
32
|
is_expected.to eq('https://notifier-configs.airbrake.io')
|
data/spec/tdigest_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airbrake-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.2.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Airbrake Technologies, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbtree-jruby
|