From 5c8035b7a8a243a2ed68672beb707c0c8a818213 Mon Sep 17 00:00:00 2001 From: Konstantin Haase Date: Tue, 16 Oct 2012 19:15:16 +0200 Subject: [PATCH] add back rack-cache --- Gemfile | 1 + Gemfile.lock | 3 +++ lib/travis/web/app.rb | 2 ++ 3 files changed, 6 insertions(+) diff --git a/Gemfile b/Gemfile index beeec19f..3d983993 100644 --- a/Gemfile +++ b/Gemfile @@ -4,6 +4,7 @@ source :rubygems gem 'unicorn' gem 'rack-ssl', '~> 1.3' +gem 'rack-cache' group :development, :test do gem 'rake', '~> 0.9.2' diff --git a/Gemfile.lock b/Gemfile.lock index c2df00be..5846f4fb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -44,6 +44,8 @@ GEM listen (0.5.3) multi_json (1.3.6) rack (1.4.1) + rack-cache (1.2) + rack (>= 0.4) rack-ssl (1.3.2) rack raindrops (0.10.0) @@ -69,6 +71,7 @@ DEPENDENCIES compass debugger foreman + rack-cache rack-ssl (~> 1.3) rake (~> 0.9.2) rake-pipeline! diff --git a/lib/travis/web/app.rb b/lib/travis/web/app.rb index 0bb41775..6cf55f68 100644 --- a/lib/travis/web/app.rb +++ b/lib/travis/web/app.rb @@ -1,5 +1,6 @@ require 'rack' require 'rack/ssl' +require 'rack/cache' require 'delegate' require 'time' @@ -105,6 +106,7 @@ class Travis::Web::App def builder builder = Rack::Builder.new builder.use Rack::SSL if environment == 'production' + builder.use Rack::Cache builder.use Rack::Deflater builder.use Rack::Head builder.use Rack::ConditionalGet