deltacloud-dev mailing list archives

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

Just to clarify, using this patch *ALL* our unit tests are passing
for me under JRuby 1.6.6.

There some smaller issues which this patch does not address:

1. You need to 'gem install jruby-ssl' to make 'aws' gem work
2. You need to remove 'thin' from Gemfile, because thin is not
   compatible with JRuby.

 -- Michal

Michal Fojtik
http://deltacloud.org
mfojtik@redhat.com



On Aug 2, 2012, at 3:45 PM, mfojtik@redhat.com wrote:

> 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