From ecdf0b9c3aa0026d3285bd815c97cfdd90ceb73f Mon Sep 17 00:00:00 2001
From: Sven Fuchs <me@svenfuchs.com>
Date: Wed, 10 Oct 2012 18:51:05 +0200
Subject: [PATCH] fix negation

---
 Gemfile.lock                 | 4 ++--
 lib/travis/web/app/assets.rb | 9 +++------
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/Gemfile.lock b/Gemfile.lock
index 480445de..0c5d60cc 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -43,7 +43,7 @@ GIT
 
 GIT
   remote: git://github.com/travis-ci/travis-api.git
-  revision: 8abd6fa15076c6403477bda39f8d78ebe10c504d
+  revision: d17439513f159633f640546d276327f7b63c1030
   specs:
     travis-api (0.0.1)
       backports (~> 2.5)
@@ -61,7 +61,7 @@ GIT
 
 GIT
   remote: git://github.com/travis-ci/travis-core.git
-  revision: 46fcb22ff1517d73e7a6425a7fc1f876ef771281
+  revision: 71ee475483af3db1f3073f65e474284565a24f5b
   branch: sf-travis-api
   specs:
     travis-core (0.0.1)
diff --git a/lib/travis/web/app/assets.rb b/lib/travis/web/app/assets.rb
index 05316d15..1df3df12 100644
--- a/lib/travis/web/app/assets.rb
+++ b/lib/travis/web/app/assets.rb
@@ -11,17 +11,14 @@ class Travis::Web::App
 
     def call(env)
       path = env['PATH_INFO']
-      if !asset?(path)
-        app.call(map_env(env, config.version))
-      else
-        app.call(env)
-      end
+      env = map_env(env, config.version) if asset?(path)
+      app.call(env)
     end
 
     private
 
       def asset?(path)
-        path !~ Travis::Web::App::ASSET_DIRS
+        path =~ Travis::Web::App::ASSET_DIRS
       end
   end
 end