Return-Path: X-Original-To: apmail-deltacloud-dev-archive@www.apache.org Delivered-To: apmail-deltacloud-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 00B0B911A for ; Thu, 2 Aug 2012 13:56:07 +0000 (UTC) Received: (qmail 57564 invoked by uid 500); 2 Aug 2012 13:56:06 -0000 Delivered-To: apmail-deltacloud-dev-archive@deltacloud.apache.org Received: (qmail 57550 invoked by uid 500); 2 Aug 2012 13:56:06 -0000 Mailing-List: contact dev-help@deltacloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltacloud.apache.org Delivered-To: mailing list dev@deltacloud.apache.org Received: (qmail 57542 invoked by uid 99); 2 Aug 2012 13:56:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2012 13:56:06 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mfojtik@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2012 13:56:01 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q72DteEX018898 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 2 Aug 2012 09:55:40 -0400 Received: from dhcp-29-121.brq.redhat.com (dhcp-29-121.brq.redhat.com [10.34.29.121]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q72DtbU6014252 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Thu, 2 Aug 2012 09:55:39 -0400 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1485\)) Subject: Re: [PATCH core] Core: Make Deltacloud able to run under JRuby From: Michal Fojtik In-Reply-To: <1343915122-69192-1-git-send-email-mfojtik@redhat.com> Date: Thu, 2 Aug 2012 15:56:40 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <5DEAB768-431C-4CCE-9B7A-47C8EF732EAC@redhat.com> References: <1343915122-69192-1-git-send-email-mfojtik@redhat.com> To: dev@deltacloud.apache.org X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Virus-Checked: Checked by ClamAV on apache.org 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 >=20 >=20 > Signed-off-by: Michal fojtik > --- > server/bin/deltacloudd | 4 +++- > server/lib/deltacloud/server.rb | 4 +++- > 2 files changed, 6 insertions(+), 2 deletions(-) >=20 > 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 =3D Rack::Builder.new { > use Rack::CommonLogger # apache-like logging > use Rack::Reloader if options[:env] =3D=3D "development" > - set :root, $top_srcdir # Set Sinatra root since we can't chdir to = ../ > + unless RUBY_PLATFORM =3D=3D 'java' > + set :root, $top_srcdir # Set Sinatra root since we can't chdir = to ../ > + end > run inner_app > }.to_app >=20 > 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 >=20 > # Enable logging > - use Deltacloud[:deltacloud].logger > + # NOTE: Jruby use different logging mechanism not complatible = with our > + # logger. > + use Deltacloud[:deltacloud].logger unless RUBY_PLATFORM =3D=3D = 'java' > use Rack::Date > use Rack::ETag > use Rack::MatrixParams > --=20 > 1.7.10.2 >=20