sideshowcoder / canned

Server to respond with fake API responses, by using a directory of files for finding out what to say!
213 stars 46 forks source link

Split the multiple responses with saner regex #61

Closed sideshowcoder closed 9 years ago

sideshowcoder commented 9 years ago

The current regex is kind of unwieldy and using lookahead makes this quite simple todo

sideshowcoder commented 9 years ago

@kevinschumacher hey just a question, I tried a little refactoring and started creating objects for the passing to the different parts. I think this will ease moving to your suggested changes much easier.

@simonprickett does this work for you? I changed the split to be based \\!also I made a small chnage to allow seperated statusCodes per response per file, instead of a global one. as I think this was actually a bug.

kevinschumacher commented 9 years ago

looks good to me :thumbsup: