airbrake-ruby 6.1.1-java → 6.1.2-java

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e9b6912593d385ef6bf89acc4744a9b6f9fb605959299f8ae6b27b312758f47
4
- data.tar.gz: 1b835db3c660cdbfee82a3ef3a67a7237c83a66c3d153377a1fbc50ed4870840
3
+ metadata.gz: 2f885330e360e61f8b2779c9d03b98b2794ef6e9e2fa9453bbd15630513780c4
4
+ data.tar.gz: b054ea5189464b1ebf822812cb7192893fbf84ef085b57fdfca9ead3d3361c6d
5
5
  SHA512:
6
- metadata.gz: 5cc2026d845c74164b1809c271e41cf295bb711f65a64926a5fa38950b0008a262adfe78f8499264f295d59a37722c69aeeee28be5c8b0de9669f90e0570f207
7
- data.tar.gz: 6081c2a922b9334e31220a0f7d87309dd054a6d2ef5837f254d719a85dd4914a004f5fc6fe2f8adbffdd649f24320cb04973d0439e1a5b41665ee6217fa7e237
6
+ metadata.gz: a577980c05f36c8e1e90fdf9181e9cafd35dd6b66cca387f3c3250aac8eb7d3d0838d241ae19b93c383f10e00b2e862ab0154754b382e9c7a3d664bc40620d2c
7
+ data.tar.gz: ee6edd6c1a279ba33ca4e898198aff4147e07be36feb9aa165fd076668499a08cc41d8fc5158dff09ee9fc7d5732f0e5c87b4e3bc1ca57d39485651d0431082a
@@ -18,6 +18,9 @@ module Airbrake
18
18
  # @return [String]
19
19
  RUBY_31_ERROR_HIGHLIGHTING_DIVIDER = "\n\n".freeze
20
20
 
21
+ # @return [Hash] the options for +String#encode+
22
+ ENCODING_OPTIONS = { invalid: :replace, undef: :replace }.freeze
23
+
21
24
  def initialize(exception)
22
25
  @exception = exception
23
26
  end
@@ -25,7 +28,7 @@ module Airbrake
25
28
  def as_json
26
29
  unwind_exceptions.map do |exception|
27
30
  { type: exception.class.name,
28
- message: exception.message.split(RUBY_31_ERROR_HIGHLIGHTING_DIVIDER).first,
31
+ message: message(exception),
29
32
  backtrace: Backtrace.parse(exception) }
30
33
  end
31
34
  end
@@ -43,5 +46,14 @@ module Airbrake
43
46
 
44
47
  exception_list
45
48
  end
49
+
50
+ def message(exception)
51
+ return unless (msg = exception.message)
52
+
53
+ msg
54
+ .encode(Encoding::UTF_8, **ENCODING_OPTIONS)
55
+ .split(RUBY_31_ERROR_HIGHLIGHTING_DIVIDER)
56
+ .first
57
+ end
46
58
  end
47
59
  end
@@ -80,8 +80,8 @@ module Airbrake
80
80
  req['Authorization'] = "Bearer #{@config.project_key}"
81
81
  req['Content-Type'] = CONTENT_TYPE
82
82
  req['User-Agent'] =
83
- "#{Airbrake::NOTIFIER_INFO[:name]}/#{Airbrake::AIRBRAKE_RUBY_VERSION}" \
84
- " Ruby/#{RUBY_VERSION}"
83
+ "#{Airbrake::NOTIFIER_INFO[:name]}/#{Airbrake::AIRBRAKE_RUBY_VERSION} " \
84
+ "Ruby/#{RUBY_VERSION}"
85
85
 
86
86
  req
87
87
  end
@@ -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.1'.freeze
6
+ AIRBRAKE_RUBY_VERSION = '6.1.2'.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.1
4
+ version: 6.1.2
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-06-15 00:00:00.000000000 Z
11
+ date: 2022-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbtree-jruby
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  - !ruby/object:Gem::Version
114
114
  version: '0'
115
115
  requirements: []
116
- rubygems_version: 3.1.6
116
+ rubygems_version: 3.3.3
117
117
  signing_key:
118
118
  specification_version: 4
119
119
  summary: Ruby notifier for https://airbrake.io