incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@redhat.com
Subject [PATCH 3/7] Rakefile (routes:api, routes:cimi): print routes for both frontends
Date Mon, 10 Oct 2011 23:16:38 GMT
From: David Lutterkort <lutter@redhat.com>


Signed-off-by: David Lutterkort <lutter@redhat.com>
---
 server/Rakefile |   24 +++++++++++++++++++-----
 1 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/server/Rakefile b/server/Rakefile
index 6a17fcc..a74cbce 100644
--- a/server/Rakefile
+++ b/server/Rakefile
@@ -26,6 +26,9 @@ begin
 rescue LoadError
 end
 
+$top_srcdir = File.dirname(__FILE__)
+$:.unshift File.join($top_srcdir, 'lib')
+
 begin
   require 'cucumber'
   require 'cucumber/rake/task'
@@ -91,14 +94,25 @@ Gem::PackageTask.new(spec) do |pkg|
   pkg.need_tar = true
 end
 
-desc "List all REST routes defined through Rabbit"
-task :routes do
-  require 'server.rb'
-  Sinatra::Rabbit::routes.each do |m, path|
-    puts sprintf("\033[1;30m%-8s\033[0m %s", m.to_s.upcase, path)
+namespace :routes do
+  desc "List all REST routes for the Deltacloud API"
+  task :api do
+    require 'deltacloud/server.rb'
+    Sinatra::Rabbit::routes.each do |m, path|
+      puts sprintf("\033[1;30m%-8s\033[0m %s", m.to_s.upcase, path)
+    end
+  end
+
+  desc "List all REST routes for the CIMI API"
+  task :cimi do
+    require 'cimi/server.rb'
+    Sinatra::Rabbit::routes.each do |m, path|
+      puts sprintf("\033[1;30m%-8s\033[0m %s", m.to_s.upcase, path)
+    end
   end
 end
 
+
 namespace :mock do
   namespace :fixtures do
     desc "Setup Mock driver fixtures"
-- 
1.7.6


Mime
View raw message