airbrake-ruby 6.1.0-java → 6.1.1-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/lib/airbrake-ruby/filters/git_last_checkout_filter.rb +1 -1
  3. data/lib/airbrake-ruby/nested_exception.rb +10 -1
  4. data/lib/airbrake-ruby/notice.rb +5 -3
  5. data/lib/airbrake-ruby/version.rb +1 -1
  6. metadata +4 -122
  7. data/spec/airbrake_spec.rb +0 -522
  8. data/spec/async_sender_spec.rb +0 -65
  9. data/spec/backtrace_spec.rb +0 -430
  10. data/spec/benchmark_spec.rb +0 -35
  11. data/spec/code_hunk_spec.rb +0 -124
  12. data/spec/config/processor_spec.rb +0 -167
  13. data/spec/config/validator_spec.rb +0 -204
  14. data/spec/config_spec.rb +0 -188
  15. data/spec/context_spec.rb +0 -54
  16. data/spec/deploy_notifier_spec.rb +0 -50
  17. data/spec/file_cache_spec.rb +0 -35
  18. data/spec/filter_chain_spec.rb +0 -124
  19. data/spec/filters/context_filter_spec.rb +0 -32
  20. data/spec/filters/dependency_filter_spec.rb +0 -14
  21. data/spec/filters/exception_attributes_filter_spec.rb +0 -52
  22. data/spec/filters/gem_root_filter_spec.rb +0 -44
  23. data/spec/filters/git_last_checkout_filter_spec.rb +0 -61
  24. data/spec/filters/git_repository_filter_spec.rb +0 -72
  25. data/spec/filters/git_revision_filter_spec.rb +0 -126
  26. data/spec/filters/keys_allowlist_spec.rb +0 -204
  27. data/spec/filters/keys_blocklist_spec.rb +0 -242
  28. data/spec/filters/root_directory_filter_spec.rb +0 -39
  29. data/spec/filters/sql_filter_spec.rb +0 -274
  30. data/spec/filters/system_exit_filter_spec.rb +0 -16
  31. data/spec/filters/thread_filter_spec.rb +0 -281
  32. data/spec/fixtures/notroot.txt +0 -7
  33. data/spec/fixtures/project_root/code.rb +0 -221
  34. data/spec/fixtures/project_root/empty_file.rb +0 -0
  35. data/spec/fixtures/project_root/long_line.txt +0 -1
  36. data/spec/fixtures/project_root/short_file.rb +0 -3
  37. data/spec/fixtures/project_root/vendor/bundle/ignored_file.rb +0 -5
  38. data/spec/helpers.rb +0 -9
  39. data/spec/ignorable_spec.rb +0 -14
  40. data/spec/inspectable_spec.rb +0 -45
  41. data/spec/loggable_spec.rb +0 -17
  42. data/spec/monotonic_time_spec.rb +0 -25
  43. data/spec/nested_exception_spec.rb +0 -73
  44. data/spec/notice_notifier/options_spec.rb +0 -269
  45. data/spec/notice_notifier_spec.rb +0 -361
  46. data/spec/notice_spec.rb +0 -300
  47. data/spec/performance_breakdown_spec.rb +0 -11
  48. data/spec/performance_notifier_spec.rb +0 -645
  49. data/spec/promise_spec.rb +0 -203
  50. data/spec/query_spec.rb +0 -11
  51. data/spec/queue_spec.rb +0 -18
  52. data/spec/remote_settings/callback_spec.rb +0 -162
  53. data/spec/remote_settings/settings_data_spec.rb +0 -348
  54. data/spec/remote_settings_spec.rb +0 -201
  55. data/spec/request_spec.rb +0 -9
  56. data/spec/response_spec.rb +0 -110
  57. data/spec/spec_helper.rb +0 -100
  58. data/spec/stashable_spec.rb +0 -23
  59. data/spec/stat_spec.rb +0 -39
  60. data/spec/sync_sender_spec.rb +0 -168
  61. data/spec/tdigest_spec.rb +0 -235
  62. data/spec/thread_pool_spec.rb +0 -196
  63. data/spec/time_truncate_spec.rb +0 -30
  64. data/spec/timed_trace_spec.rb +0 -127
  65. data/spec/truncator_spec.rb +0 -267
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 43fd8f74ef78e82c2ed46c8dc3ecd389a6c6ffcbdb8b20b22f1bf02e2ce4345d
4
- data.tar.gz: 63c8aa81c33948f26ead281e81769a274dbca9740880a420d62b4d951b352984
3
+ metadata.gz: 5e9b6912593d385ef6bf89acc4744a9b6f9fb605959299f8ae6b27b312758f47
4
+ data.tar.gz: 1b835db3c660cdbfee82a3ef3a67a7237c83a66c3d153377a1fbc50ed4870840
5
5
  SHA512:
6
- metadata.gz: 1e2f56b1d4af8f98cbb2c8026fc3b2f06178cff6be5fcfe42117693038be80a27513c6b235dc8b8a47900ee66aed4cadc5c0fd4e7c442fcf0f10af97b6df5a5b
7
- data.tar.gz: 59bf1fd79c2467401aabc0c352397d82bae83805cb54ccac40c5ca132dfcfdefa5281a8ba11dc96f67d569405837af61aeb05a22ce9e2f3425d0ecc4a1c69251
6
+ metadata.gz: 5cc2026d845c74164b1809c271e41cf295bb711f65a64926a5fa38950b0008a262adfe78f8499264f295d59a37722c69aeeee28be5c8b0de9669f90e0570f207
7
+ data.tar.gz: 6081c2a922b9334e31220a0f7d87309dd054a6d2ef5837f254d719a85dd4914a004f5fc6fe2f8adbffdd649f24320cb04973d0439e1a5b41665ee6217fa7e237
@@ -27,7 +27,7 @@ module Airbrake
27
27
  @git_path = File.join(root_directory, '.git')
28
28
  @weight = 116
29
29
  @last_checkout = nil
30
- @deploy_username = ENV['AIRBRAKE_DEPLOY_USERNAME']
30
+ @deploy_username = ENV.fetch('AIRBRAKE_DEPLOY_USERNAME', nil)
31
31
  end
32
32
 
33
33
  # @macro call_filter
@@ -9,6 +9,15 @@ module Airbrake
9
9
  # can unwrap. Exceptions that have a longer cause chain will be ignored
10
10
  MAX_NESTED_EXCEPTIONS = 3
11
11
 
12
+ # On Ruby 3.1+, the error highlighting gem can produce messages that can
13
+ # span multiple lines. We don't display multiline error messages in the
14
+ # title of the notice in the Airbrake dashboard. Therefore, we want to strip
15
+ # out the higlighting part so that the errors look consistent. The full
16
+ # message with the exception will be attached to the notice body.
17
+ #
18
+ # @return [String]
19
+ RUBY_31_ERROR_HIGHLIGHTING_DIVIDER = "\n\n".freeze
20
+
12
21
  def initialize(exception)
13
22
  @exception = exception
14
23
  end
@@ -16,7 +25,7 @@ module Airbrake
16
25
  def as_json
17
26
  unwind_exceptions.map do |exception|
18
27
  { type: exception.class.name,
19
- message: exception.message,
28
+ message: exception.message.split(RUBY_31_ERROR_HIGHLIGHTING_DIVIDER).first,
20
29
  backtrace: Backtrace.parse(exception) }
21
30
  end
22
31
  end
@@ -49,16 +49,17 @@ module Airbrake
49
49
  # @api private
50
50
  def initialize(exception, params = {})
51
51
  @config = Airbrake::Config.instance
52
+ @truncator = Airbrake::Truncator.new(PAYLOAD_MAX_SIZE)
53
+
52
54
  @payload = {
53
55
  errors: NestedException.new(exception).as_json,
54
- context: context,
56
+ context: context(exception),
55
57
  environment: {
56
58
  program_name: $PROGRAM_NAME,
57
59
  },
58
60
  session: {},
59
61
  params: params,
60
62
  }
61
- @truncator = Airbrake::Truncator.new(PAYLOAD_MAX_SIZE)
62
63
 
63
64
  stash[:exception] = exception
64
65
  end
@@ -118,7 +119,7 @@ module Airbrake
118
119
 
119
120
  private
120
121
 
121
- def context
122
+ def context(exception)
122
123
  {
123
124
  version: @config.app_version,
124
125
  versions: @config.versions,
@@ -132,6 +133,7 @@ module Airbrake
132
133
  hostname: HOSTNAME,
133
134
 
134
135
  severity: DEFAULT_SEVERITY,
136
+ error_message: @truncator.truncate(exception.message),
135
137
  }.merge(CONTEXT).delete_if { |_key, val| val.nil? || val.empty? }
136
138
  end
137
139
 
@@ -3,7 +3,7 @@
3
3
  module Airbrake
4
4
  # @return [String] the library version
5
5
  # @api public
6
- AIRBRAKE_RUBY_VERSION = '6.1.0'.freeze
6
+ AIRBRAKE_RUBY_VERSION = '6.1.1'.freeze
7
7
 
8
8
  # @return [Hash{Symbol=>String}] the information about the notifier library
9
9
  # @since v5.0.0
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: 6.1.0
4
+ version: 6.1.1
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: 2022-04-13 00:00:00.000000000 Z
11
+ date: 2022-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbtree-jruby
@@ -93,65 +93,6 @@ files:
93
93
  - lib/airbrake-ruby/timed_trace.rb
94
94
  - lib/airbrake-ruby/truncator.rb
95
95
  - lib/airbrake-ruby/version.rb
96
- - spec/airbrake_spec.rb
97
- - spec/async_sender_spec.rb
98
- - spec/backtrace_spec.rb
99
- - spec/benchmark_spec.rb
100
- - spec/code_hunk_spec.rb
101
- - spec/config/processor_spec.rb
102
- - spec/config/validator_spec.rb
103
- - spec/config_spec.rb
104
- - spec/context_spec.rb
105
- - spec/deploy_notifier_spec.rb
106
- - spec/file_cache_spec.rb
107
- - spec/filter_chain_spec.rb
108
- - spec/filters/context_filter_spec.rb
109
- - spec/filters/dependency_filter_spec.rb
110
- - spec/filters/exception_attributes_filter_spec.rb
111
- - spec/filters/gem_root_filter_spec.rb
112
- - spec/filters/git_last_checkout_filter_spec.rb
113
- - spec/filters/git_repository_filter_spec.rb
114
- - spec/filters/git_revision_filter_spec.rb
115
- - spec/filters/keys_allowlist_spec.rb
116
- - spec/filters/keys_blocklist_spec.rb
117
- - spec/filters/root_directory_filter_spec.rb
118
- - spec/filters/sql_filter_spec.rb
119
- - spec/filters/system_exit_filter_spec.rb
120
- - spec/filters/thread_filter_spec.rb
121
- - spec/fixtures/notroot.txt
122
- - spec/fixtures/project_root/code.rb
123
- - spec/fixtures/project_root/empty_file.rb
124
- - spec/fixtures/project_root/long_line.txt
125
- - spec/fixtures/project_root/short_file.rb
126
- - spec/fixtures/project_root/vendor/bundle/ignored_file.rb
127
- - spec/helpers.rb
128
- - spec/ignorable_spec.rb
129
- - spec/inspectable_spec.rb
130
- - spec/loggable_spec.rb
131
- - spec/monotonic_time_spec.rb
132
- - spec/nested_exception_spec.rb
133
- - spec/notice_notifier/options_spec.rb
134
- - spec/notice_notifier_spec.rb
135
- - spec/notice_spec.rb
136
- - spec/performance_breakdown_spec.rb
137
- - spec/performance_notifier_spec.rb
138
- - spec/promise_spec.rb
139
- - spec/query_spec.rb
140
- - spec/queue_spec.rb
141
- - spec/remote_settings/callback_spec.rb
142
- - spec/remote_settings/settings_data_spec.rb
143
- - spec/remote_settings_spec.rb
144
- - spec/request_spec.rb
145
- - spec/response_spec.rb
146
- - spec/spec_helper.rb
147
- - spec/stashable_spec.rb
148
- - spec/stat_spec.rb
149
- - spec/sync_sender_spec.rb
150
- - spec/tdigest_spec.rb
151
- - spec/thread_pool_spec.rb
152
- - spec/time_truncate_spec.rb
153
- - spec/timed_trace_spec.rb
154
- - spec/truncator_spec.rb
155
96
  homepage: https://airbrake.io
156
97
  licenses:
157
98
  - MIT
@@ -172,67 +113,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
113
  - !ruby/object:Gem::Version
173
114
  version: '0'
174
115
  requirements: []
175
- rubygems_version: 3.2.32
116
+ rubygems_version: 3.1.6
176
117
  signing_key:
177
118
  specification_version: 4
178
119
  summary: Ruby notifier for https://airbrake.io
179
- test_files:
180
- - spec/airbrake_spec.rb
181
- - spec/async_sender_spec.rb
182
- - spec/backtrace_spec.rb
183
- - spec/benchmark_spec.rb
184
- - spec/code_hunk_spec.rb
185
- - spec/config/processor_spec.rb
186
- - spec/config/validator_spec.rb
187
- - spec/config_spec.rb
188
- - spec/context_spec.rb
189
- - spec/deploy_notifier_spec.rb
190
- - spec/file_cache_spec.rb
191
- - spec/filter_chain_spec.rb
192
- - spec/filters/context_filter_spec.rb
193
- - spec/filters/dependency_filter_spec.rb
194
- - spec/filters/exception_attributes_filter_spec.rb
195
- - spec/filters/gem_root_filter_spec.rb
196
- - spec/filters/git_last_checkout_filter_spec.rb
197
- - spec/filters/git_repository_filter_spec.rb
198
- - spec/filters/git_revision_filter_spec.rb
199
- - spec/filters/keys_allowlist_spec.rb
200
- - spec/filters/keys_blocklist_spec.rb
201
- - spec/filters/root_directory_filter_spec.rb
202
- - spec/filters/sql_filter_spec.rb
203
- - spec/filters/system_exit_filter_spec.rb
204
- - spec/filters/thread_filter_spec.rb
205
- - spec/fixtures/notroot.txt
206
- - spec/fixtures/project_root/code.rb
207
- - spec/fixtures/project_root/empty_file.rb
208
- - spec/fixtures/project_root/long_line.txt
209
- - spec/fixtures/project_root/short_file.rb
210
- - spec/fixtures/project_root/vendor/bundle/ignored_file.rb
211
- - spec/helpers.rb
212
- - spec/ignorable_spec.rb
213
- - spec/inspectable_spec.rb
214
- - spec/loggable_spec.rb
215
- - spec/monotonic_time_spec.rb
216
- - spec/nested_exception_spec.rb
217
- - spec/notice_notifier/options_spec.rb
218
- - spec/notice_notifier_spec.rb
219
- - spec/notice_spec.rb
220
- - spec/performance_breakdown_spec.rb
221
- - spec/performance_notifier_spec.rb
222
- - spec/promise_spec.rb
223
- - spec/query_spec.rb
224
- - spec/queue_spec.rb
225
- - spec/remote_settings/callback_spec.rb
226
- - spec/remote_settings/settings_data_spec.rb
227
- - spec/remote_settings_spec.rb
228
- - spec/request_spec.rb
229
- - spec/response_spec.rb
230
- - spec/spec_helper.rb
231
- - spec/stashable_spec.rb
232
- - spec/stat_spec.rb
233
- - spec/sync_sender_spec.rb
234
- - spec/tdigest_spec.rb
235
- - spec/thread_pool_spec.rb
236
- - spec/time_truncate_spec.rb
237
- - spec/timed_trace_spec.rb
238
- - spec/truncator_spec.rb
120
+ test_files: []