deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject git commit: Fix for DTACLOUD-425 - url_for bug
Date Thu, 24 Jan 2013 16:51:28 GMT
Updated Branches:
  refs/heads/master f51b1275e -> 5a492088f


Fix for DTACLOUD-425 - url_for bug

https://issues.apache.org/jira/browse/DTACLOUD-425


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/5a492088
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/5a492088
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/5a492088

Branch: refs/heads/master
Commit: 5a492088f06cdad57641f089b18c4dd46b3aa43e
Parents: f51b127
Author: marios <marios@redhat.com>
Authored: Wed Jan 23 12:34:42 2013 +0200
Committer: marios <marios@redhat.com>
Committed: Thu Jan 24 18:50:47 2013 +0200

----------------------------------------------------------------------
 server/lib/deltacloud/helpers/rabbit_helper.rb |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/5a492088/server/lib/deltacloud/helpers/rabbit_helper.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/helpers/rabbit_helper.rb b/server/lib/deltacloud/helpers/rabbit_helper.rb
index 8f6e264..a8ae4f5 100644
--- a/server/lib/deltacloud/helpers/rabbit_helper.rb
+++ b/server/lib/deltacloud/helpers/rabbit_helper.rb
@@ -64,7 +64,6 @@ module Sinatra::Rabbit
                          end
 
     helper_method_name += '_url'
-
     [Proc.new do
       define_method helper_method_name do |*args|
         if (opts = args.first).kind_of? Hash
@@ -76,7 +75,7 @@ module Sinatra::Rabbit
         else
           path = operation.full_path
         end
-        path.slice!(root_url)
+        path.slice!(root_url) if path.start_with?(root_url)
         url(path)
       end unless respond_to?(helper_method_name)
     end, helper_method_name]


Mime
View raw message