airbrake-ruby 4.6.0 → 6.2.2
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 +5 -5
- data/lib/airbrake-ruby/async_sender.rb +24 -109
- data/lib/airbrake-ruby/backlog.rb +123 -0
- data/lib/airbrake-ruby/backtrace.rb +8 -7
- data/lib/airbrake-ruby/benchmark.rb +1 -1
- data/lib/airbrake-ruby/code_hunk.rb +1 -1
- data/lib/airbrake-ruby/config/processor.rb +77 -0
- data/lib/airbrake-ruby/config/validator.rb +9 -3
- data/lib/airbrake-ruby/config.rb +78 -19
- data/lib/airbrake-ruby/context.rb +51 -0
- data/lib/airbrake-ruby/deploy_notifier.rb +1 -1
- data/lib/airbrake-ruby/file_cache.rb +6 -0
- data/lib/airbrake-ruby/filter_chain.rb +18 -1
- data/lib/airbrake-ruby/filters/context_filter.rb +4 -5
- data/lib/airbrake-ruby/filters/dependency_filter.rb +1 -0
- data/lib/airbrake-ruby/filters/exception_attributes_filter.rb +3 -3
- data/lib/airbrake-ruby/filters/gem_root_filter.rb +1 -0
- data/lib/airbrake-ruby/filters/git_last_checkout_filter.rb +7 -7
- data/lib/airbrake-ruby/filters/git_repository_filter.rb +11 -2
- data/lib/airbrake-ruby/filters/git_revision_filter.rb +3 -1
- data/lib/airbrake-ruby/filters/{keys_whitelist.rb → keys_allowlist.rb} +3 -3
- data/lib/airbrake-ruby/filters/{keys_blacklist.rb → keys_blocklist.rb} +3 -3
- data/lib/airbrake-ruby/filters/keys_filter.rb +41 -22
- data/lib/airbrake-ruby/filters/root_directory_filter.rb +1 -0
- data/lib/airbrake-ruby/filters/sql_filter.rb +35 -11
- data/lib/airbrake-ruby/filters/system_exit_filter.rb +1 -0
- data/lib/airbrake-ruby/filters/thread_filter.rb +6 -5
- data/lib/airbrake-ruby/grouppable.rb +12 -0
- data/lib/airbrake-ruby/ignorable.rb +1 -2
- data/lib/airbrake-ruby/inspectable.rb +2 -2
- data/lib/airbrake-ruby/loggable.rb +1 -1
- data/lib/airbrake-ruby/mergeable.rb +12 -0
- data/lib/airbrake-ruby/monotonic_time.rb +6 -1
- data/lib/airbrake-ruby/nested_exception.rb +22 -1
- data/lib/airbrake-ruby/notice.rb +12 -17
- data/lib/airbrake-ruby/notice_notifier.rb +15 -7
- data/lib/airbrake-ruby/performance_breakdown.rb +16 -9
- data/lib/airbrake-ruby/performance_notifier.rb +106 -54
- data/lib/airbrake-ruby/promise.rb +1 -0
- data/lib/airbrake-ruby/query.rb +20 -14
- data/lib/airbrake-ruby/queue.rb +65 -0
- data/lib/airbrake-ruby/remote_settings/callback.rb +44 -0
- data/lib/airbrake-ruby/remote_settings/settings_data.rb +116 -0
- data/lib/airbrake-ruby/remote_settings.rb +128 -0
- data/lib/airbrake-ruby/request.rb +14 -11
- data/lib/airbrake-ruby/response.rb +56 -5
- data/lib/airbrake-ruby/stat.rb +27 -34
- data/lib/airbrake-ruby/sync_sender.rb +43 -11
- data/lib/airbrake-ruby/tdigest.rb +52 -66
- data/lib/airbrake-ruby/thread_pool.rb +139 -0
- data/lib/airbrake-ruby/time_truncate.rb +2 -2
- data/lib/airbrake-ruby/timed_trace.rb +1 -3
- data/lib/airbrake-ruby/truncator.rb +10 -4
- data/lib/airbrake-ruby/version.rb +11 -1
- data/lib/airbrake-ruby.rb +157 -78
- metadata +122 -116
- data/spec/airbrake_spec.rb +0 -324
- data/spec/async_sender_spec.rb +0 -155
- data/spec/backtrace_spec.rb +0 -427
- data/spec/benchmark_spec.rb +0 -33
- data/spec/code_hunk_spec.rb +0 -115
- data/spec/config/validator_spec.rb +0 -184
- data/spec/config_spec.rb +0 -154
- data/spec/deploy_notifier_spec.rb +0 -48
- data/spec/file_cache.rb +0 -36
- data/spec/filter_chain_spec.rb +0 -92
- data/spec/filters/context_filter_spec.rb +0 -23
- data/spec/filters/dependency_filter_spec.rb +0 -12
- data/spec/filters/exception_attributes_filter_spec.rb +0 -50
- data/spec/filters/gem_root_filter_spec.rb +0 -41
- data/spec/filters/git_last_checkout_filter_spec.rb +0 -46
- data/spec/filters/git_repository_filter.rb +0 -61
- data/spec/filters/git_revision_filter_spec.rb +0 -126
- data/spec/filters/keys_blacklist_spec.rb +0 -225
- data/spec/filters/keys_whitelist_spec.rb +0 -194
- data/spec/filters/root_directory_filter_spec.rb +0 -39
- data/spec/filters/sql_filter_spec.rb +0 -219
- data/spec/filters/system_exit_filter_spec.rb +0 -14
- data/spec/filters/thread_filter_spec.rb +0 -277
- data/spec/fixtures/notroot.txt +0 -7
- data/spec/fixtures/project_root/code.rb +0 -221
- data/spec/fixtures/project_root/empty_file.rb +0 -0
- data/spec/fixtures/project_root/long_line.txt +0 -1
- data/spec/fixtures/project_root/short_file.rb +0 -3
- data/spec/fixtures/project_root/vendor/bundle/ignored_file.rb +0 -5
- data/spec/helpers.rb +0 -9
- data/spec/ignorable_spec.rb +0 -14
- data/spec/inspectable_spec.rb +0 -45
- data/spec/monotonic_time_spec.rb +0 -12
- data/spec/nested_exception_spec.rb +0 -73
- data/spec/notice_notifier_spec/options_spec.rb +0 -259
- data/spec/notice_notifier_spec.rb +0 -356
- data/spec/notice_spec.rb +0 -296
- data/spec/performance_breakdown_spec.rb +0 -12
- data/spec/performance_notifier_spec.rb +0 -435
- data/spec/promise_spec.rb +0 -197
- data/spec/query_spec.rb +0 -11
- data/spec/request_spec.rb +0 -11
- data/spec/response_spec.rb +0 -88
- data/spec/spec_helper.rb +0 -100
- data/spec/stashable_spec.rb +0 -23
- data/spec/stat_spec.rb +0 -47
- data/spec/sync_sender_spec.rb +0 -133
- data/spec/tdigest_spec.rb +0 -230
- data/spec/time_truncate_spec.rb +0 -13
- data/spec/timed_trace_spec.rb +0 -125
- data/spec/truncator_spec.rb +0 -238
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:
|
|
4
|
+
version: 6.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Airbrake Technologies, Inc.
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-10-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rbtree3
|
|
@@ -16,14 +16,112 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0.
|
|
19
|
+
version: '0.6'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '0.
|
|
26
|
+
version: '0.6'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: rspec
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '3'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '3'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rspec-its
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '1.2'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - "~>"
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '1.2'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: rake
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - "~>"
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '13'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - "~>"
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '13'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: pry
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - "~>"
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '0'
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - "~>"
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '0'
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: webmock
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - "~>"
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '3.8'
|
|
90
|
+
type: :development
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - "~>"
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '3.8'
|
|
97
|
+
- !ruby/object:Gem::Dependency
|
|
98
|
+
name: benchmark-ips
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
100
|
+
requirements:
|
|
101
|
+
- - "~>"
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: '2'
|
|
104
|
+
type: :development
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - "~>"
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: '2'
|
|
111
|
+
- !ruby/object:Gem::Dependency
|
|
112
|
+
name: yard
|
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
|
114
|
+
requirements:
|
|
115
|
+
- - "~>"
|
|
116
|
+
- !ruby/object:Gem::Version
|
|
117
|
+
version: '0.9'
|
|
118
|
+
type: :development
|
|
119
|
+
prerelease: false
|
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
+
requirements:
|
|
122
|
+
- - "~>"
|
|
123
|
+
- !ruby/object:Gem::Version
|
|
124
|
+
version: '0.9'
|
|
27
125
|
description: |
|
|
28
126
|
Airbrake Ruby is a plain Ruby notifier for Airbrake (https://airbrake.io), the
|
|
29
127
|
leading exception reporting service. Airbrake Ruby provides minimalist API that
|
|
@@ -40,11 +138,14 @@ extra_rdoc_files: []
|
|
|
40
138
|
files:
|
|
41
139
|
- lib/airbrake-ruby.rb
|
|
42
140
|
- lib/airbrake-ruby/async_sender.rb
|
|
141
|
+
- lib/airbrake-ruby/backlog.rb
|
|
43
142
|
- lib/airbrake-ruby/backtrace.rb
|
|
44
143
|
- lib/airbrake-ruby/benchmark.rb
|
|
45
144
|
- lib/airbrake-ruby/code_hunk.rb
|
|
46
145
|
- lib/airbrake-ruby/config.rb
|
|
146
|
+
- lib/airbrake-ruby/config/processor.rb
|
|
47
147
|
- lib/airbrake-ruby/config/validator.rb
|
|
148
|
+
- lib/airbrake-ruby/context.rb
|
|
48
149
|
- lib/airbrake-ruby/deploy_notifier.rb
|
|
49
150
|
- lib/airbrake-ruby/file_cache.rb
|
|
50
151
|
- lib/airbrake-ruby/filter_chain.rb
|
|
@@ -55,17 +156,19 @@ files:
|
|
|
55
156
|
- lib/airbrake-ruby/filters/git_last_checkout_filter.rb
|
|
56
157
|
- lib/airbrake-ruby/filters/git_repository_filter.rb
|
|
57
158
|
- lib/airbrake-ruby/filters/git_revision_filter.rb
|
|
58
|
-
- lib/airbrake-ruby/filters/
|
|
159
|
+
- lib/airbrake-ruby/filters/keys_allowlist.rb
|
|
160
|
+
- lib/airbrake-ruby/filters/keys_blocklist.rb
|
|
59
161
|
- lib/airbrake-ruby/filters/keys_filter.rb
|
|
60
|
-
- lib/airbrake-ruby/filters/keys_whitelist.rb
|
|
61
162
|
- lib/airbrake-ruby/filters/root_directory_filter.rb
|
|
62
163
|
- lib/airbrake-ruby/filters/sql_filter.rb
|
|
63
164
|
- lib/airbrake-ruby/filters/system_exit_filter.rb
|
|
64
165
|
- lib/airbrake-ruby/filters/thread_filter.rb
|
|
166
|
+
- lib/airbrake-ruby/grouppable.rb
|
|
65
167
|
- lib/airbrake-ruby/hash_keyable.rb
|
|
66
168
|
- lib/airbrake-ruby/ignorable.rb
|
|
67
169
|
- lib/airbrake-ruby/inspectable.rb
|
|
68
170
|
- lib/airbrake-ruby/loggable.rb
|
|
171
|
+
- lib/airbrake-ruby/mergeable.rb
|
|
69
172
|
- lib/airbrake-ruby/monotonic_time.rb
|
|
70
173
|
- lib/airbrake-ruby/nested_exception.rb
|
|
71
174
|
- lib/airbrake-ruby/notice.rb
|
|
@@ -74,72 +177,27 @@ files:
|
|
|
74
177
|
- lib/airbrake-ruby/performance_notifier.rb
|
|
75
178
|
- lib/airbrake-ruby/promise.rb
|
|
76
179
|
- lib/airbrake-ruby/query.rb
|
|
180
|
+
- lib/airbrake-ruby/queue.rb
|
|
181
|
+
- lib/airbrake-ruby/remote_settings.rb
|
|
182
|
+
- lib/airbrake-ruby/remote_settings/callback.rb
|
|
183
|
+
- lib/airbrake-ruby/remote_settings/settings_data.rb
|
|
77
184
|
- lib/airbrake-ruby/request.rb
|
|
78
185
|
- lib/airbrake-ruby/response.rb
|
|
79
186
|
- lib/airbrake-ruby/stashable.rb
|
|
80
187
|
- lib/airbrake-ruby/stat.rb
|
|
81
188
|
- lib/airbrake-ruby/sync_sender.rb
|
|
82
189
|
- lib/airbrake-ruby/tdigest.rb
|
|
190
|
+
- lib/airbrake-ruby/thread_pool.rb
|
|
83
191
|
- lib/airbrake-ruby/time_truncate.rb
|
|
84
192
|
- lib/airbrake-ruby/timed_trace.rb
|
|
85
193
|
- lib/airbrake-ruby/truncator.rb
|
|
86
194
|
- lib/airbrake-ruby/version.rb
|
|
87
|
-
- spec/airbrake_spec.rb
|
|
88
|
-
- spec/async_sender_spec.rb
|
|
89
|
-
- spec/backtrace_spec.rb
|
|
90
|
-
- spec/benchmark_spec.rb
|
|
91
|
-
- spec/code_hunk_spec.rb
|
|
92
|
-
- spec/config/validator_spec.rb
|
|
93
|
-
- spec/config_spec.rb
|
|
94
|
-
- spec/deploy_notifier_spec.rb
|
|
95
|
-
- spec/file_cache.rb
|
|
96
|
-
- spec/filter_chain_spec.rb
|
|
97
|
-
- spec/filters/context_filter_spec.rb
|
|
98
|
-
- spec/filters/dependency_filter_spec.rb
|
|
99
|
-
- spec/filters/exception_attributes_filter_spec.rb
|
|
100
|
-
- spec/filters/gem_root_filter_spec.rb
|
|
101
|
-
- spec/filters/git_last_checkout_filter_spec.rb
|
|
102
|
-
- spec/filters/git_repository_filter.rb
|
|
103
|
-
- spec/filters/git_revision_filter_spec.rb
|
|
104
|
-
- spec/filters/keys_blacklist_spec.rb
|
|
105
|
-
- spec/filters/keys_whitelist_spec.rb
|
|
106
|
-
- spec/filters/root_directory_filter_spec.rb
|
|
107
|
-
- spec/filters/sql_filter_spec.rb
|
|
108
|
-
- spec/filters/system_exit_filter_spec.rb
|
|
109
|
-
- spec/filters/thread_filter_spec.rb
|
|
110
|
-
- spec/fixtures/notroot.txt
|
|
111
|
-
- spec/fixtures/project_root/code.rb
|
|
112
|
-
- spec/fixtures/project_root/empty_file.rb
|
|
113
|
-
- spec/fixtures/project_root/long_line.txt
|
|
114
|
-
- spec/fixtures/project_root/short_file.rb
|
|
115
|
-
- spec/fixtures/project_root/vendor/bundle/ignored_file.rb
|
|
116
|
-
- spec/helpers.rb
|
|
117
|
-
- spec/ignorable_spec.rb
|
|
118
|
-
- spec/inspectable_spec.rb
|
|
119
|
-
- spec/monotonic_time_spec.rb
|
|
120
|
-
- spec/nested_exception_spec.rb
|
|
121
|
-
- spec/notice_notifier_spec.rb
|
|
122
|
-
- spec/notice_notifier_spec/options_spec.rb
|
|
123
|
-
- spec/notice_spec.rb
|
|
124
|
-
- spec/performance_breakdown_spec.rb
|
|
125
|
-
- spec/performance_notifier_spec.rb
|
|
126
|
-
- spec/promise_spec.rb
|
|
127
|
-
- spec/query_spec.rb
|
|
128
|
-
- spec/request_spec.rb
|
|
129
|
-
- spec/response_spec.rb
|
|
130
|
-
- spec/spec_helper.rb
|
|
131
|
-
- spec/stashable_spec.rb
|
|
132
|
-
- spec/stat_spec.rb
|
|
133
|
-
- spec/sync_sender_spec.rb
|
|
134
|
-
- spec/tdigest_spec.rb
|
|
135
|
-
- spec/time_truncate_spec.rb
|
|
136
|
-
- spec/timed_trace_spec.rb
|
|
137
|
-
- spec/truncator_spec.rb
|
|
138
195
|
homepage: https://airbrake.io
|
|
139
196
|
licenses:
|
|
140
197
|
- MIT
|
|
141
|
-
metadata:
|
|
142
|
-
|
|
198
|
+
metadata:
|
|
199
|
+
rubygems_mfa_required: 'true'
|
|
200
|
+
post_install_message:
|
|
143
201
|
rdoc_options: []
|
|
144
202
|
require_paths:
|
|
145
203
|
- lib
|
|
@@ -147,67 +205,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
147
205
|
requirements:
|
|
148
206
|
- - ">="
|
|
149
207
|
- !ruby/object:Gem::Version
|
|
150
|
-
version: '2.
|
|
208
|
+
version: '2.5'
|
|
151
209
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
210
|
requirements:
|
|
153
211
|
- - ">="
|
|
154
212
|
- !ruby/object:Gem::Version
|
|
155
213
|
version: '0'
|
|
156
214
|
requirements: []
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
signing_key:
|
|
215
|
+
rubygems_version: 3.3.26
|
|
216
|
+
signing_key:
|
|
160
217
|
specification_version: 4
|
|
161
218
|
summary: Ruby notifier for https://airbrake.io
|
|
162
|
-
test_files:
|
|
163
|
-
- spec/truncator_spec.rb
|
|
164
|
-
- spec/benchmark_spec.rb
|
|
165
|
-
- spec/helpers.rb
|
|
166
|
-
- spec/filters/exception_attributes_filter_spec.rb
|
|
167
|
-
- spec/filters/root_directory_filter_spec.rb
|
|
168
|
-
- spec/filters/sql_filter_spec.rb
|
|
169
|
-
- spec/filters/keys_whitelist_spec.rb
|
|
170
|
-
- spec/filters/system_exit_filter_spec.rb
|
|
171
|
-
- spec/filters/thread_filter_spec.rb
|
|
172
|
-
- spec/filters/dependency_filter_spec.rb
|
|
173
|
-
- spec/filters/context_filter_spec.rb
|
|
174
|
-
- spec/filters/git_last_checkout_filter_spec.rb
|
|
175
|
-
- spec/filters/git_revision_filter_spec.rb
|
|
176
|
-
- spec/filters/keys_blacklist_spec.rb
|
|
177
|
-
- spec/filters/gem_root_filter_spec.rb
|
|
178
|
-
- spec/filters/git_repository_filter.rb
|
|
179
|
-
- spec/spec_helper.rb
|
|
180
|
-
- spec/notice_spec.rb
|
|
181
|
-
- spec/config_spec.rb
|
|
182
|
-
- spec/performance_breakdown_spec.rb
|
|
183
|
-
- spec/tdigest_spec.rb
|
|
184
|
-
- spec/async_sender_spec.rb
|
|
185
|
-
- spec/stat_spec.rb
|
|
186
|
-
- spec/backtrace_spec.rb
|
|
187
|
-
- spec/notice_notifier_spec.rb
|
|
188
|
-
- spec/time_truncate_spec.rb
|
|
189
|
-
- spec/promise_spec.rb
|
|
190
|
-
- spec/config/validator_spec.rb
|
|
191
|
-
- spec/sync_sender_spec.rb
|
|
192
|
-
- spec/ignorable_spec.rb
|
|
193
|
-
- spec/deploy_notifier_spec.rb
|
|
194
|
-
- spec/performance_notifier_spec.rb
|
|
195
|
-
- spec/airbrake_spec.rb
|
|
196
|
-
- spec/nested_exception_spec.rb
|
|
197
|
-
- spec/timed_trace_spec.rb
|
|
198
|
-
- spec/request_spec.rb
|
|
199
|
-
- spec/filter_chain_spec.rb
|
|
200
|
-
- spec/response_spec.rb
|
|
201
|
-
- spec/file_cache.rb
|
|
202
|
-
- spec/code_hunk_spec.rb
|
|
203
|
-
- spec/fixtures/notroot.txt
|
|
204
|
-
- spec/fixtures/project_root/long_line.txt
|
|
205
|
-
- spec/fixtures/project_root/empty_file.rb
|
|
206
|
-
- spec/fixtures/project_root/code.rb
|
|
207
|
-
- spec/fixtures/project_root/short_file.rb
|
|
208
|
-
- spec/fixtures/project_root/vendor/bundle/ignored_file.rb
|
|
209
|
-
- spec/monotonic_time_spec.rb
|
|
210
|
-
- spec/inspectable_spec.rb
|
|
211
|
-
- spec/stashable_spec.rb
|
|
212
|
-
- spec/query_spec.rb
|
|
213
|
-
- spec/notice_notifier_spec/options_spec.rb
|
|
219
|
+
test_files: []
|
data/spec/airbrake_spec.rb
DELETED
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
RSpec.describe Airbrake do
|
|
2
|
-
it "gets initialized with a performance notifier" do
|
|
3
|
-
expect(described_class.performance_notifier).not_to be_nil
|
|
4
|
-
end
|
|
5
|
-
|
|
6
|
-
it "gets initialized with a notice notifier" do
|
|
7
|
-
expect(described_class.notice_notifier).not_to be_nil
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
it "gets initialized with a deploy notifier" do
|
|
11
|
-
expect(described_class.deploy_notifier).not_to be_nil
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
describe ".configure" do
|
|
15
|
-
before do
|
|
16
|
-
Airbrake::Config.instance = Airbrake::Config.new
|
|
17
|
-
described_class.reset
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
after { described_class.reset }
|
|
21
|
-
|
|
22
|
-
it "yields the config" do
|
|
23
|
-
expect do |b|
|
|
24
|
-
begin
|
|
25
|
-
described_class.configure(&b)
|
|
26
|
-
rescue Airbrake::Error
|
|
27
|
-
nil
|
|
28
|
-
end
|
|
29
|
-
end.to yield_with_args(Airbrake::Config)
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
it "sets logger to Airbrake::Loggable" do
|
|
33
|
-
logger = Logger.new(File::NULL)
|
|
34
|
-
described_class.configure do |c|
|
|
35
|
-
c.project_id = 1
|
|
36
|
-
c.project_key = '123'
|
|
37
|
-
c.logger = logger
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
expect(Airbrake::Loggable.instance).to eql(logger)
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
it "makes Airbrake configured" do
|
|
44
|
-
expect(described_class).not_to be_configured
|
|
45
|
-
|
|
46
|
-
described_class.configure do |c|
|
|
47
|
-
c.project_id = 1
|
|
48
|
-
c.project_key = '2'
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
expect(described_class).to be_configured
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
context "when a notifier was configured" do
|
|
55
|
-
before do
|
|
56
|
-
expect(described_class).to receive(:configured?).and_return(true)
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
it "closes previously configured notice notifier" do
|
|
60
|
-
expect(described_class).to receive(:close)
|
|
61
|
-
described_class.configure {}
|
|
62
|
-
end
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
context "when a notifier wasn't configured" do
|
|
66
|
-
before do
|
|
67
|
-
expect(described_class).to receive(:configured?).and_return(false)
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
it "doesn't close previously configured notice notifier" do
|
|
71
|
-
expect(described_class).not_to receive(:close)
|
|
72
|
-
described_class.configure {}
|
|
73
|
-
end
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
context "when called multiple times" do
|
|
77
|
-
it "doesn't overwrite performance notifier" do
|
|
78
|
-
described_class.configure {}
|
|
79
|
-
performance_notifier = described_class.performance_notifier
|
|
80
|
-
|
|
81
|
-
described_class.configure {}
|
|
82
|
-
expect(described_class.performance_notifier).to eql(performance_notifier)
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
it "doesn't overwrite notice notifier" do
|
|
86
|
-
described_class.configure {}
|
|
87
|
-
notice_notifier = described_class.notice_notifier
|
|
88
|
-
|
|
89
|
-
described_class.configure {}
|
|
90
|
-
expect(described_class.notice_notifier).to eql(notice_notifier)
|
|
91
|
-
end
|
|
92
|
-
|
|
93
|
-
it "doesn't overwrite deploy notifier" do
|
|
94
|
-
described_class.configure {}
|
|
95
|
-
deploy_notifier = described_class.deploy_notifier
|
|
96
|
-
|
|
97
|
-
described_class.configure {}
|
|
98
|
-
expect(described_class.deploy_notifier).to eql(deploy_notifier)
|
|
99
|
-
end
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
context "when blacklist_keys gets configured" do
|
|
103
|
-
before { allow(Airbrake.notice_notifier).to receive(:add_filter) }
|
|
104
|
-
|
|
105
|
-
it "adds blacklist filter" do
|
|
106
|
-
expect(Airbrake.notice_notifier).to receive(:add_filter)
|
|
107
|
-
.with(an_instance_of(Airbrake::Filters::KeysBlacklist))
|
|
108
|
-
described_class.configure { |c| c.blacklist_keys = %w[password] }
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
it "initializes blacklist with specified parameters" do
|
|
112
|
-
expect(Airbrake::Filters::KeysBlacklist).to receive(:new).with(%w[password])
|
|
113
|
-
described_class.configure { |c| c.blacklist_keys = %w[password] }
|
|
114
|
-
end
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
context "when whitelist_keys gets configured" do
|
|
118
|
-
before { allow(Airbrake.notice_notifier).to receive(:add_filter) }
|
|
119
|
-
|
|
120
|
-
it "adds whitelist filter" do
|
|
121
|
-
expect(Airbrake.notice_notifier).to receive(:add_filter)
|
|
122
|
-
.with(an_instance_of(Airbrake::Filters::KeysWhitelist))
|
|
123
|
-
described_class.configure { |c| c.whitelist_keys = %w[banana] }
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
it "initializes whitelist with specified parameters" do
|
|
127
|
-
expect(Airbrake::Filters::KeysWhitelist).to receive(:new).with(%w[banana])
|
|
128
|
-
described_class.configure { |c| c.whitelist_keys = %w[banana] }
|
|
129
|
-
end
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
context "when root_directory gets configured" do
|
|
133
|
-
before { allow(Airbrake.notice_notifier).to receive(:add_filter) }
|
|
134
|
-
|
|
135
|
-
it "adds root directory filter" do
|
|
136
|
-
expect(Airbrake.notice_notifier).to receive(:add_filter)
|
|
137
|
-
.with(an_instance_of(Airbrake::Filters::RootDirectoryFilter))
|
|
138
|
-
described_class.configure { |c| c.root_directory = '/my/path' }
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
it "initializes root directory filter with specified path" do
|
|
142
|
-
expect(Airbrake::Filters::RootDirectoryFilter)
|
|
143
|
-
.to receive(:new).with('/my/path')
|
|
144
|
-
described_class.configure { |c| c.root_directory = '/my/path' }
|
|
145
|
-
end
|
|
146
|
-
|
|
147
|
-
it "adds git revision filter" do
|
|
148
|
-
expect(Airbrake.notice_notifier).to receive(:add_filter)
|
|
149
|
-
.with(an_instance_of(Airbrake::Filters::GitRevisionFilter))
|
|
150
|
-
described_class.configure { |c| c.root_directory = '/my/path' }
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
it "initializes git revision filter with correct root directory" do
|
|
154
|
-
expect(Airbrake::Filters::GitRevisionFilter)
|
|
155
|
-
.to receive(:new).with('/my/path')
|
|
156
|
-
described_class.configure { |c| c.root_directory = '/my/path' }
|
|
157
|
-
end
|
|
158
|
-
|
|
159
|
-
it "adds git repository filter" do
|
|
160
|
-
expect(Airbrake.notice_notifier).to receive(:add_filter)
|
|
161
|
-
.with(an_instance_of(Airbrake::Filters::GitRepositoryFilter))
|
|
162
|
-
described_class.configure { |c| c.root_directory = '/my/path' }
|
|
163
|
-
end
|
|
164
|
-
|
|
165
|
-
it "initializes git repository filter with correct root directory" do
|
|
166
|
-
expect(Airbrake::Filters::GitRepositoryFilter)
|
|
167
|
-
.to receive(:new).with('/my/path')
|
|
168
|
-
described_class.configure { |c| c.root_directory = '/my/path' }
|
|
169
|
-
end
|
|
170
|
-
|
|
171
|
-
it "adds git last checkout filter" do
|
|
172
|
-
expect(Airbrake.notice_notifier).to receive(:add_filter)
|
|
173
|
-
.with(an_instance_of(Airbrake::Filters::GitLastCheckoutFilter))
|
|
174
|
-
described_class.configure { |c| c.root_directory = '/my/path' }
|
|
175
|
-
end
|
|
176
|
-
|
|
177
|
-
it "initializes git last checkout filter with correct root directory" do
|
|
178
|
-
expect(Airbrake::Filters::GitLastCheckoutFilter)
|
|
179
|
-
.to receive(:new).with('/my/path')
|
|
180
|
-
described_class.configure { |c| c.root_directory = '/my/path' }
|
|
181
|
-
end
|
|
182
|
-
end
|
|
183
|
-
end
|
|
184
|
-
|
|
185
|
-
describe "#reset" do
|
|
186
|
-
context "when Airbrake was previously configured" do
|
|
187
|
-
before do
|
|
188
|
-
expect(described_class).to receive(:configured?).and_return(true)
|
|
189
|
-
end
|
|
190
|
-
|
|
191
|
-
it "closes notice notifier" do
|
|
192
|
-
expect(described_class).to receive(:close)
|
|
193
|
-
subject.reset
|
|
194
|
-
end
|
|
195
|
-
end
|
|
196
|
-
end
|
|
197
|
-
|
|
198
|
-
describe "#notify_request" do
|
|
199
|
-
context "when :stash key is not provided" do
|
|
200
|
-
it "doesn't add anything to the stash of the request" do
|
|
201
|
-
expect(described_class.performance_notifier).to receive(:notify) do |request|
|
|
202
|
-
expect(request.stash).to be_empty
|
|
203
|
-
end
|
|
204
|
-
|
|
205
|
-
described_class.notify_request(
|
|
206
|
-
method: 'GET',
|
|
207
|
-
route: '/',
|
|
208
|
-
status_code: 200,
|
|
209
|
-
start_time: Time.now
|
|
210
|
-
)
|
|
211
|
-
end
|
|
212
|
-
end
|
|
213
|
-
|
|
214
|
-
context "when :stash key is provided" do
|
|
215
|
-
it "adds the value as the stash of the request" do
|
|
216
|
-
expect(described_class.performance_notifier).to receive(:notify) do |request|
|
|
217
|
-
expect(request.stash).to eq(request_id: 1)
|
|
218
|
-
end
|
|
219
|
-
|
|
220
|
-
described_class.notify_request(
|
|
221
|
-
{
|
|
222
|
-
method: 'GET',
|
|
223
|
-
route: '/',
|
|
224
|
-
status_code: 200,
|
|
225
|
-
start_time: Time.now
|
|
226
|
-
},
|
|
227
|
-
request_id: 1
|
|
228
|
-
)
|
|
229
|
-
end
|
|
230
|
-
end
|
|
231
|
-
end
|
|
232
|
-
|
|
233
|
-
describe "#notify_query" do
|
|
234
|
-
context "when :stash key is not provided" do
|
|
235
|
-
it "doesn't add anything to the stash of the query" do
|
|
236
|
-
expect(described_class.performance_notifier).to receive(:notify) do |query|
|
|
237
|
-
expect(query.stash).to be_empty
|
|
238
|
-
end
|
|
239
|
-
|
|
240
|
-
described_class.notify_query(
|
|
241
|
-
method: 'GET',
|
|
242
|
-
route: '/',
|
|
243
|
-
query: '',
|
|
244
|
-
start_time: Time.now
|
|
245
|
-
)
|
|
246
|
-
end
|
|
247
|
-
end
|
|
248
|
-
|
|
249
|
-
context "when :stash key is provided" do
|
|
250
|
-
it "adds the value as the stash of the query" do
|
|
251
|
-
expect(described_class.performance_notifier).to receive(:notify) do |query|
|
|
252
|
-
expect(query.stash).to eq(request_id: 1)
|
|
253
|
-
end
|
|
254
|
-
|
|
255
|
-
described_class.notify_query(
|
|
256
|
-
{
|
|
257
|
-
method: 'GET',
|
|
258
|
-
route: '/',
|
|
259
|
-
query: '',
|
|
260
|
-
start_time: Time.now
|
|
261
|
-
},
|
|
262
|
-
request_id: 1
|
|
263
|
-
)
|
|
264
|
-
end
|
|
265
|
-
end
|
|
266
|
-
end
|
|
267
|
-
|
|
268
|
-
describe "#notify_performance_breakdown" do
|
|
269
|
-
context "when :stash key is not provided" do
|
|
270
|
-
it "doesn't add anything to the stash of the performance breakdown" do
|
|
271
|
-
expect(described_class.performance_notifier).to receive(:notify) do |query|
|
|
272
|
-
expect(query.stash).to be_empty
|
|
273
|
-
end
|
|
274
|
-
|
|
275
|
-
described_class.notify_query(
|
|
276
|
-
method: 'GET',
|
|
277
|
-
route: '/',
|
|
278
|
-
query: '',
|
|
279
|
-
start_time: Time.now
|
|
280
|
-
)
|
|
281
|
-
end
|
|
282
|
-
end
|
|
283
|
-
|
|
284
|
-
context "when :stash key is provided" do
|
|
285
|
-
it "adds the value as the stash of the performance breakdown" do
|
|
286
|
-
expect(
|
|
287
|
-
described_class.performance_notifier
|
|
288
|
-
).to receive(:notify) do |performance_breakdown|
|
|
289
|
-
expect(performance_breakdown.stash).to eq(request_id: 1)
|
|
290
|
-
end
|
|
291
|
-
|
|
292
|
-
described_class.notify_performance_breakdown(
|
|
293
|
-
{
|
|
294
|
-
method: 'GET',
|
|
295
|
-
route: '/',
|
|
296
|
-
response_type: :html,
|
|
297
|
-
groups: {},
|
|
298
|
-
start_time: Time.now
|
|
299
|
-
},
|
|
300
|
-
request_id: 1
|
|
301
|
-
)
|
|
302
|
-
end
|
|
303
|
-
end
|
|
304
|
-
end
|
|
305
|
-
|
|
306
|
-
describe ".performance_notifier" do
|
|
307
|
-
it "returns a performance notifier" do
|
|
308
|
-
expect(described_class.performance_notifier)
|
|
309
|
-
.to be_an(Airbrake::PerformanceNotifier)
|
|
310
|
-
end
|
|
311
|
-
end
|
|
312
|
-
|
|
313
|
-
describe ".notice_notifier" do
|
|
314
|
-
it "returns a notice notifier" do
|
|
315
|
-
expect(described_class.notice_notifier).to be_an(Airbrake::NoticeNotifier)
|
|
316
|
-
end
|
|
317
|
-
end
|
|
318
|
-
|
|
319
|
-
describe ".deploy_notifier" do
|
|
320
|
-
it "returns a deploy notifier" do
|
|
321
|
-
expect(described_class.deploy_notifier).to be_an(Airbrake::DeployNotifier)
|
|
322
|
-
end
|
|
323
|
-
end
|
|
324
|
-
end
|