File tree 3 files changed +33
-1
lines changed
3 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 6
6
7
7
Rails users will be able to use ` bin/rails generate sentry ` to generate their ` config/initializers/sentry.rb ` file.
8
8
9
+ ### Bug Fixes
10
+
11
+ - Don't throw error on arbitrary arguments being passed to ` capture_event ` options [ #2301 ] ( https://github.com/getsentry/sentry-ruby/pull/2301 )
12
+ - Fixes [ #2299 ] ( https://github.com/getsentry/sentry-ruby/issues/2299 )
13
+
9
14
## 5.17.3
10
15
11
16
### Internal
Original file line number Diff line number Diff line change @@ -135,7 +135,8 @@ def update_from_options(
135
135
tags : nil ,
136
136
user : nil ,
137
137
level : nil ,
138
- fingerprint : nil
138
+ fingerprint : nil ,
139
+ **options
139
140
)
140
141
self . contexts . merge! ( contexts ) if contexts
141
142
self . extra . merge! ( extra ) if extra
Original file line number Diff line number Diff line change 336
336
subject . generate_propagation_context ( env )
337
337
end
338
338
end
339
+
340
+ describe '#update_from_options' do
341
+ it 'updates data from arguments' do
342
+ subject . update_from_options (
343
+ contexts : { context : 1 } ,
344
+ extra : { foo : 42 } ,
345
+ tags : { tag : 2 } ,
346
+ user : { name : 'jane' } ,
347
+ level : :info ,
348
+ fingerprint : 'ABCD'
349
+ )
350
+
351
+ expect ( subject . contexts ) . to include ( context : 1 )
352
+ expect ( subject . extra ) . to eq ( { foo : 42 } )
353
+ expect ( subject . tags ) . to eq ( { tag : 2 } )
354
+ expect ( subject . user ) . to eq ( { name : 'jane' } )
355
+ expect ( subject . level ) . to eq ( :info )
356
+ expect ( subject . fingerprint ) . to eq ( 'ABCD' )
357
+ end
358
+
359
+ it 'does not throw when arbitrary options passed' do
360
+ expect do
361
+ subject . update_from_options ( foo : 42 )
362
+ end . not_to raise_error
363
+ end
364
+ end
339
365
end
You can’t perform that action at this time.
0 commit comments