deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core] Core: Make Deltacloud able to run under JRuby
Date Thu, 02 Aug 2012 13:45:22 GMT
From: Michal Fojtik <mfojtik@redhat.com>


Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/bin/deltacloudd          |    4 +++-
 server/lib/deltacloud/server.rb |    4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/server/bin/deltacloudd b/server/bin/deltacloudd
index 81488a1..abe1def 100755
--- a/server/bin/deltacloudd
+++ b/server/bin/deltacloudd
@@ -193,7 +193,9 @@ unless have_thin
   app = Rack::Builder.new {
     use Rack::CommonLogger # apache-like logging
     use Rack::Reloader if options[:env] == "development"
-    set :root, $top_srcdir # Set Sinatra root since we can't chdir to ../
+    unless RUBY_PLATFORM == 'java'
+      set :root, $top_srcdir # Set Sinatra root since we can't chdir to ../
+    end
     run inner_app
   }.to_app
 
diff --git a/server/lib/deltacloud/server.rb b/server/lib/deltacloud/server.rb
index 3e3e84e..c60edfa 100644
--- a/server/lib/deltacloud/server.rb
+++ b/server/lib/deltacloud/server.rb
@@ -31,7 +31,9 @@ module Deltacloud
   class API < Collections::Base
 
     # Enable logging
-    use Deltacloud[:deltacloud].logger
+    # NOTE: Jruby use different logging mechanism not complatible with our
+    # logger.
+    use Deltacloud[:deltacloud].logger unless RUBY_PLATFORM == 'java'
     use Rack::Date
     use Rack::ETag
     use Rack::MatrixParams
-- 
1.7.10.2


Mime
View raw message