incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From razor...@gmail.com
Subject [PATCH core] On server/lib/sinatra/rabbit.rb: Fixed the variable declaration in a more ruby way On server/server.rb: Fixed on line 72 the redirect, because it's a permanent redirect and not a 302.
Date Fri, 10 Dec 2010 11:46:23 GMT
From: Francesco Vollero <francesco.vollero@gmail.com>

---
 server/lib/sinatra/rabbit.rb |    2 +-
 server/server.rb             |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/lib/sinatra/rabbit.rb b/server/lib/sinatra/rabbit.rb
index 05bd6c5..e843366 100644
--- a/server/lib/sinatra/rabbit.rb
+++ b/server/lib/sinatra/rabbit.rb
@@ -72,7 +72,7 @@ module Sinatra
       end
 
       def path(args = {})
-        l_prefix = args[:prefix] ? args[:prefix] : prefix
+        l_prefix = args[:prefix] || prefix
         if @member
           if standard?
             "#{l_prefix}/#{@collection.name}/:id"
diff --git a/server/server.rb b/server/server.rb
index 9585f9b..6b446ba 100644
--- a/server/server.rb
+++ b/server/server.rb
@@ -69,7 +69,7 @@ end
 Sinatra::Application.register Sinatra::RespondTo
 
 # Redirect to /api
-get '/' do redirect url_for('/api'); end
+get '/' do redirect url_for('/api'), 301; end
 
 get '/api/drivers\/?' do
   respond_to do |format|
-- 
1.7.3.3


Mime
View raw message