radiospiel / imgio

An image asset resizer along the lines of sencha.io
25 stars 1 forks source link

Rewrote imgio to use sinatra-synchrony #4

Closed Overbryd closed 12 years ago

Overbryd commented 12 years ago

Hello,

first of all, I really like this project. It does what I want it to do, in a really nice way. Therefore I am really happy to contribute to it.

When you are looking at this Pull Request, you may think: "WTF is going on here?"

This is the natural reaction to a pull request where the whole project has been turned upside down. But the integration of sinatra-synchrony made a lot of things obsolete. For example Goliath. That is why I have removed it completely from the project.

In other places I saw that some stuff was just too much. I removed the mime_types.rb, because I think this can be solved with Sinatra's settings. I have combined all routes to one single route. The regexp wasn't readable anyway, so why not use one route to rule them all (fit, fill, scale_down). I cleared up the regexp, now it is much nicer with Sinatra's params[:captures]. And some other minor changes.

Feel free to pull this request in or not.

On the bottomline, I think there is still one issue to be solved: Benchmarking. Somebody needs to battle test this thing.

radiospiel commented 12 years ago

hey lukas, I merged your code back. I had to massage the code a bit, because

a) imgio should work in a sync mode - not everyone has control over their server infrastructure, and a thin server is sometimes out of the question; and b) should work with 1.8.7 too.

I guess this is all nice and shiny now. Check out the master branch.

Thx again. /eno