deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [2/2] git commit: Core: Make Deltacloud able to run under JRuby
Date Fri, 03 Aug 2012 09:00:07 GMT
Core: Make Deltacloud able to run under JRuby


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

Branch: refs/heads/master
Commit: 459128678e6fbcb3262a940a07cada7a14c3088c
Parents: 7c20547
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Thu Aug 2 15:43:17 2012 +0200
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Thu Aug 2 15:43:17 2012 +0200

----------------------------------------------------------------------
 server/bin/deltacloudd          |    4 +++-
 server/lib/deltacloud/server.rb |    4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/45912867/server/bin/deltacloudd
----------------------------------------------------------------------
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
 

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/45912867/server/lib/deltacloud/server.rb
----------------------------------------------------------------------
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


Mime
View raw message