Open jacquescrocker opened 13 years ago
+1 For the Rack middleware.
+1 For the Rack middleware. There is also https://github.com/juliocesar/rack-pagespeed.
Added functional middleware here: https://github.com/railsjedi/jammit/tree/rack_middleware
Jammit::Middleware
I didn't replace the Rails one because I didnt understand how to deal with the page_caching. However it should be testable on Rails by manually adding the Jammit::Middleware
to your Rack middleware list. That will preempt the controller action so if it still works solid, then we can eventually remove the old controller implementation.
I packaged it up via a jammit wrapper gem here: https://github.com/railsjedi/jammit-sinatra
gem "jammit-sinatra", ">= 0.6.0"
Will be nice to eventually merge these changes into the main jammit repo, but for now the wrapper gem should work well.
+1
+1
+1
thanks for all the up votes. if you get a chance please try the middleware on https://github.com/railsjedi/jammit-sinatra and let me know if it can be improved. would love to get some users and solidify the codebase
+1
+1 from me as well. @railsjedi: Do you have the page caching figured out?
Edit: Do you have a branch that I can try merging to master?
For those still interested, I added a small update to exploring Jammit::Rack here: https://github.com/documentcloud/jammit/pull/251
and a demo app here: https://github.com/mulderp/jammit_test/blob/master/config.ru
I need to complete the integration with the Packager still, but it would be interesting to hear more thoughts about the current approach, what would be important? what would be a blocker?
I'm currently trying to get Jammit working within a Sinatra app. I think if we switch the ActionController stuff to use Rack middleware instead, then it would work across any Rack web framework (Rails included)
Interested in this change? Should I work on this in a fork or create a wrapper gem?
Thanks