0.01
No commit activity in last 3 years
No release in over 3 years
combines assets to server 1 file
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 0
>= 0
 Project Readme

rack-combobot Build Status

Asset combinator for rack

Installation

gem install rack-combobot

Path

Point your frontend to /combobot?script1.js&script2.js to get script1.js and script2.js combined.

Usage in Rack apps (config.ru)

require 'rack'
require 'rack-combobot'
require 'my-app'

use Rack::Combobot, :root => '/public'
run MyApp

Usage in Rails apps

In your config/application.rb

config.middleware.use 'Rack::Combobot', :root => "#{Rails.root}/public"

Expires header

Add expires header

config.middleware.use 'Rack::Combobot', :root => "#{Rails.root}/public", :expires => Time.gm(2020)

To bust the cache, simple add a unique string to your request like so /combobot/BUSTINGSRING?script1.js&script2.js.

Without query string

If you environment doesn't allow having the file names in the query string (Like on CloudFront). Combobot will accept the file names as part of the url, but they have to start with &.