Closed ujifgc closed 11 years ago
Thanks, I will have a look at it asap but I think the problem doing so is that your assets won't be preprocessed at all (ex. sass files, coffee-script). Am I wrong?
Also, it seems like this change only apply to combined assets (package), not other routes, ideally I would change it for both cases.
Yes, it's a partial solution, serves only files that don't need preprocessing. I'm gonna try and figure out the rest on this weekend.
This solution is exactly for the problem where you get a combined file with number of \n
equal to the number of individual asset files to be combined.
As for individual assets serving, I think it is unfixable by design, because before a request gets to sinatra-assetpack it must go through before
filters of sinatra. Usually there comes authorization, simple or not, and the request is just failed. If we could only add a before filter before authorization, but this is too much tampering with routing, I think.
This is why I suggest in #68 that asset preprocessing should be split apart from routing, that would resolve the issues we are having, but this is indeed is a big design modification.
If a file exists and it's in supported format, it will be served without Rack::Test request.