Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

airbrake-ruby: fix add_filter block API #10

Merged
merged 2 commits into from
Dec 22, 2015
Merged

airbrake-ruby: fix add_filter block API #10

merged 2 commits into from
Dec 22, 2015

Conversation

kyrylo
Copy link
Contributor

@kyrylo kyrylo commented Dec 22, 2015

Fixes #8 (add_filter throwing exception)

Fixes #8 (add_filter throwing exception)
@@ -6,7 +6,7 @@
end

before do
described_class.configure do |c|
@notifier = described_class.configure do |c|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this be more consistent as a let or subject?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let or subject cache their values, don't they? Here we need to reset the notifier to make sure that we always use a fresh one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks. Replaced with let!. PTAL

@kyrylo
Copy link
Contributor Author

kyrylo commented Dec 22, 2015

PTAL

@@ -5,12 +5,14 @@
'https://airbrake.io/api/v3/projects/113743/notices?key=fd04e13d806a90f96614ad8e529b2822'
end

before do
let!(:notifier) do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need the !, here, unless I'm missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise some tests start failing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see it now :-)

@zefer
Copy link
Contributor

zefer commented Dec 22, 2015

LGTM

kyrylo added a commit that referenced this pull request Dec 22, 2015
airbrake-ruby: fix add_filter block API
@kyrylo kyrylo merged commit bc648c9 into master Dec 22, 2015
@kyrylo kyrylo deleted the fix-add-filter branch December 22, 2015 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants