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

Add some system for telling the developer to fix certain things in their emails #93

Open
Mange opened this issue Aug 25, 2014 · 1 comment
Labels
Milestone

Comments

@Mange
Copy link
Owner

Mange commented Aug 25, 2014

Roadie should have some form of reporting system where it can scan an email for bad patterns and tell the user about it.

Suggestions for "warnings":

  1. Report on invalid URLs
  2. Warn about <form>, etc. in the email

Reporting should be transparent and optional. Ideas on implementation:

  • Test modules. Include them, run the assertions on the email.
    • This would be better served with another gem, right? roadie-doctor or something crazy like that..?
    • Doesn't help with detecting problems in production, where dynamic helpers might've ruined something that would appear okay in test.
  • Callback for both enabling and for handling problems.
    • Makes it very optional. Sadly, also a bit of a threshold to climb to enable it.
    • See code sample 1 below.
  • Store it on Document, when enabled.
    • Easier to enable and you can report it however you want afterwards. Might be more useful for more people since it's possible to send all of them in a single message.
    • See code sample 2 below.
# Sample 1
unless RACK_ENV == "production"
  document.report_problems = ->(error, doc) {
    My.logger.warn error
  }
end

# Sample 2
document.report_problems = true
html = document.transform
document.problems #=> [#<Roadie::Problem "Invalid URL: ...">]
@Mange Mange added this to the Version 3.2 milestone Aug 25, 2014
@Mange Mange added the feature label Nov 11, 2014
@Mange
Copy link
Owner Author

Mange commented Apr 4, 2018

This will probably not happen due to maintenance mode.

Maybe someone else wants to pick this up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant