-
Notifications
You must be signed in to change notification settings - Fork 2
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
Make rails dependency an optional #9
Comments
@fiscal-cliff, I can do #8 to simplify this task for you |
1.0.0a would not be launched immediately, but version should be bumped 1.0.0a would be affected by big back-incompatible changes in #9, so it would be a good time to increment majorest version. Hovewer, i'll increment it now to simplify Changelog usage.
I managed to sort out this issue module SimpleNotifierPatch
def compose_message(exception, env, options)
SimpleEmailExceptionNotifier::Message.compose do |m|
m.print_summary(exception)
m.print_section('Backtrace', exception.backtrace)
m.print_section('Request log', Lamian.logger.dump.split("\n")) # <<< !!!
unless env.empty?
m.print_request(Rack::Request.new(env)) if defined?(Rack::Request)
m.print_section('Environment', filter_env(env))
end
m.print_section('Data', extract_data(env, options))
end
end
end
ExceptionNotifier::SimpleEmailNotifier.prepend(SimpleNotifierPatch) I would advice you to look up alternatives for ExceptionNotifier since this solution looks extremely dirty. |
ExceptionNotifier-related stuff could be moved to rails-only section in this case, same as it's views and rails engine. |
OK, that's just kinda demo, proof of concept
…On Mon, Jan 16, 2017, 00:14 Alexandr Smirnov ***@***.***> wrote:
@fiscal-cliff <https://github.com/fiscal-cliff>
I would advice you to look up alternatives for ExceptionNotifier since
this solution looks extremely dirty.
ExceptionNotifier-related stuff could be moved to rails-only section in
this case, same as it's views and rails engine.
Also, consider use Lamian.dump instead of Lamian.logger.dump, because
Lamian.logger is part of private api and this comands do same stuff
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFRVLlYXwIhpDzx5KrPqH-GtOly38Mzpks5rSowzgaJpZM4LY0Gt>
.
|
* prepared version dump to next release 1.0.0a would not be launched immediately, but version should be bumped 1.0.0a would be affected by big back-incompatible changes in #9, so it would be a good time to increment majorest version. Hovewer, i'll increment it now to simplify Changelog usage. * Added Changelog.md * added doc:coverage task into rake default to check yard coverage * done * fixed bugs and updated json dependency for ruby 2.4 compatibility * update travis build matrix to actual supported versions * updated rubocop to 0.49
I will not add non-rails support untill i need it in production. However, pull requests are welcome Core functionality is rails-independent, same is middleware itself. Rails engine should be required in "lamian/rails" and readme should be updated. Exception notifier API is not required in non-rails for oblivious reasons (exception_notifier bound to rails), so i suggest to add API for Raven |
Idea:
@fiscal-cliff offered some help, would you do all this work for me?
The text was updated successfully, but these errors were encountered: