File tree Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 66
77 Rails users will be able to use ` bin/rails generate sentry ` to generate their ` config/initializers/sentry.rb ` file.
88
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+
914## 5.17.3
1015
1116### Internal
Original file line number Diff line number Diff line change @@ -135,7 +135,8 @@ def update_from_options(
135135 tags : nil ,
136136 user : nil ,
137137 level : nil ,
138- fingerprint : nil
138+ fingerprint : nil ,
139+ **options
139140 )
140141 self . contexts . merge! ( contexts ) if contexts
141142 self . extra . merge! ( extra ) if extra
Original file line number Diff line number Diff line change 336336 subject . generate_propagation_context ( env )
337337 end
338338 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
339365end
You can’t perform that action at this time.
0 commit comments