fun_with_flags_ui
fun_with_flags_ui copied to clipboard
Removed namespace option
Closes #12
I could not get this plug to work without these changes as the redirects were really unexpected, especially when hosting the application in a nested route.
If I add the following line to my Plug.Router at /api/admin:
forward "/fun_with_flags", to: FunWithFlags.UI.Router
The fun with flags endpoint will automatically be available at /api/admin/fun_with_flags
Some notes:
- I was not able to run the unit tests since I do not have a Redis instance. I adjusted them the best I could but you probably will want to run them yourself before merging this.
- This is most likely a breaking change, requiring a major version upgrade if you follow SemVer
- I did not test this with Phoenix as I do not use Phoenix, only raw Plug with Ecto.
- This was inspired by the way the Bamboo Mailer does this, which I found very easy to integrate: https://github.com/thoughtbot/bamboo/blob/master/lib/bamboo/plug/sent_email_viewer/email_preview_plug.ex#L107
I might follow up with a smaller unrelated PR later, but this is a really important change for me.
Thank you for your time and I apologize for the inconvenience of you having to test my PR :)
Oops, I just noticed that there already is an open PR for this with #15 - Is there any ETA on getting any of these two PRs merged? Thank you for your time. I understand that maintaining open source projects can be a big time effort down the road.