From 89da7ae3b6c36e0ba7bbda993af35fe879c19720 Mon Sep 17 00:00:00 2001 From: Sinan Keskin Date: Sun, 28 Feb 2021 19:15:48 +0300 Subject: [PATCH] Fix capture_exception signature --- lib/uniform_notifier/sentry.rb | 2 +- spec/uniform_notifier/sentry_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/uniform_notifier/sentry.rb b/lib/uniform_notifier/sentry.rb index 55c57f3..4382d23 100644 --- a/lib/uniform_notifier/sentry.rb +++ b/lib/uniform_notifier/sentry.rb @@ -16,7 +16,7 @@ def _out_of_channel_notify(data) opt = UniformNotifier.sentry if UniformNotifier.sentry.is_a?(Hash) exception = Exception.new(message) - Sentry.capture_exception(exception, opt) + Sentry.capture_exception(exception, **opt) end end end diff --git a/spec/uniform_notifier/sentry_spec.rb b/spec/uniform_notifier/sentry_spec.rb index 580cd21..34a11a6 100644 --- a/spec/uniform_notifier/sentry_spec.rb +++ b/spec/uniform_notifier/sentry_spec.rb @@ -12,7 +12,7 @@ class Sentry end it 'should notify sentry' do - expect(Sentry).to receive(:capture_exception).with(UniformNotifier::Exception.new('notify sentry'), {}) + expect(Sentry).to receive(:capture_exception).with(UniformNotifier::Exception.new('notify sentry')) UniformNotifier.sentry = true UniformNotifier::SentryNotifier.out_of_channel_notify(title: 'notify sentry')