Merge pull request #98 from travis-ci/ha-fix-doc-endpoints

Fix auto-generated endpoints text
This commit is contained in:
Konstantin Haase 2013-11-15 08:40:49 -08:00
commit d462e88909

View File

@ -16,7 +16,7 @@ class Travis::Api::App
namespace = route.namespace
controller = namespace.to_s.constantize
route_info = {
'uri' => (controller.prefix + route.http_path[1..-2]).gsub('//', '/'),
'uri' => (controller.prefix + route.http_path).gsub('//', '/'),
'verb' => route.http_verb,
'doc' => route.docstring,
'scope' => /scope\W+(\w+)/.match(route.source).try(:[], 1) || controller.default_scope.to_s