APItools / router.lua

A barebones router for Lua. It matches urls and executes lua functions.
MIT License
196 stars 47 forks source link

support for extracting params with an extension #2

Closed edan closed 9 years ago

edan commented 9 years ago

Thanks for this nice and useful router! I was using it in a few services and needed support for paths like /users/:id.json I am very new to lua and this was my least invasive solution. Let me know if this is the right way to go about it. Added some tests and the existing ones still pass.

kikito commented 9 years ago

Hi @edan,

Thanks for this pull request, it makes total sense to split by dots in addition to slashes. Your tests were also quite correct. I'm going to set some automated testing up and will try to release a new version of the library with the changes, and maybe something more.

Regards!

kikito commented 9 years ago

Update: I have released v1.0.0 of the router (the code did not change with regards to what you did), I have enabled Travis integration, and I have released router as a rock (so you can install it with luarocks now)

Again, thanks for contributing to this lib!

edan commented 9 years ago

Nice! Thanks for taking my change and thanks for making this!