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

Don't add custom fields before controller #113

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

peterox
Copy link

@peterox peterox commented Jul 8, 2016

Also ensure custom fields are added when an exception is thrown from the controller

@peterox
Copy link
Author

peterox commented Jul 8, 2016

Fix for issue #114

@ernetas
Copy link

ernetas commented Mar 2, 2017

This seems to fix issues introduced in #60. E.g. after 0.7.1 we can add custom fields, but e.g. context is no longer available. I also have a feeling that this is related to #123.

payload[:status] = response.status
result
ensure
if self.respond_to?(:logtasher_add_custom_fields_to_payload)

Choose a reason for hiding this comment

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

i think it should be :logstasher_add_custom_fields_to_payload instead of :logtasher_add_custom_fields_to_payload

@@ -65,5 +65,44 @@ def subject.index(*args)
end
end
end

context "payload has custom fields defined" do
before :each do

Choose a reason for hiding this comment

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

:each part is redundant. before { some_code } is same as before(:each) { some_code }. This also applies to after blocks

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.

3 participants