Return-Path: Delivered-To: apmail-incubator-abdera-dev-archive@locus.apache.org Received: (qmail 69655 invoked from network); 19 Jun 2008 19:53:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Jun 2008 19:53:13 -0000 Received: (qmail 57406 invoked by uid 500); 19 Jun 2008 19:53:15 -0000 Delivered-To: apmail-incubator-abdera-dev-archive@incubator.apache.org Received: (qmail 57304 invoked by uid 500); 19 Jun 2008 19:53:15 -0000 Mailing-List: contact abdera-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: abdera-dev@incubator.apache.org Delivered-To: mailing list abdera-dev@incubator.apache.org Received: (qmail 57293 invoked by uid 99); 19 Jun 2008 19:53:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jun 2008 12:53:15 -0700 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of chrise@esha.com designates 207.7.107.246 as permitted sender) Received: from [207.7.107.246] (HELO georgia.textdrive.com) (207.7.107.246) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jun 2008 19:52:25 +0000 Received: from [10.0.0.216] (unknown [75.150.41.177]) by georgia.textdrive.com (Postfix) with ESMTP id 7E8F034B24 for ; Thu, 19 Jun 2008 19:52:13 +0000 (GMT) Message-Id: From: Christopher Elkins To: abdera-dev@incubator.apache.org In-Reply-To: <18016416.post@talk.nabble.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v924) Subject: Re: Route matching too liberal? Date: Thu, 19 Jun 2008 12:52:12 -0700 References: <47ABCD89.10400@anconafamily.com> <47ABD8B8.4070705@gmail.com> <17993519.post@talk.nabble.com> <485A71C6.4000707@gmail.com> <18016416.post@talk.nabble.com> X-Mailer: Apple Mail (2.924) X-Virus-Checked: Checked by ClamAV on apache.org Hi, See the patch in ABDERA-178, which probably fixes that failure. (BTW, the patch in ABDERA-176 probably fixes the test failure in the features extension.) -- Christopher Elkins On Jun 19, 2008, at 12:32 PM, ed_ruder wrote: > > James, > > Sure. > > I've downloaded the Abdera source (as of yesterday), but "mvn install" > doesn't build successfully--it fails running tests for "Abdera > Server". Is > this a known problem? Building using "ant -f build/build.xml" > succeeds. "ant > f build/build.xml test" says it succeeds, but several tests fail > (throwing > exceptions). It would be nice to be able to count on the tests, not to > mention be able to add some of my own for this change. > > Maybe there's something I've not set up correctly? > > Ed > > P.S. I ran "mvn clean" then "mvn -fae install" and this was the > summary: > > [INFO] > ------------------------------------------------------------------------ > [INFO] Reactor Summary: > [INFO] > ------------------------------------------------------------------------ > [INFO] Apache Abdera ......................................... SUCCESS > [4.413s] > [INFO] I18N Libraries ........................................ SUCCESS > [3.467s] > [INFO] Abdera Core ........................................... SUCCESS > [1.264s] > [INFO] Abdera Parser ......................................... SUCCESS > [6.538s] > [INFO] Abdera Client ......................................... SUCCESS > [1.832s] > [INFO] Abdera Server ......................................... FAILED > [2.590s] > [INFO] Abdera Spring Integration ............................. SKIPPED > (dependency build failed or was skipped) > [INFO] Abdera Adapters ....................................... SKIPPED > (dependency build failed or was skipped) > [INFO] Abdera JCR Adapter .................................... SKIPPED > (dependency build failed or was skipped) > [INFO] Abdera CouchDB Adapter ................................ SKIPPED > (dependency build failed or was skipped) > [INFO] Abdera Filesystem Adapter ............................. SKIPPED > (dependency build failed or was skipped) > [INFO] Abdera JDBC Adapter ................................... SKIPPED > (dependency build failed or was skipped) > [INFO] Abdera Security ....................................... SKIPPED > (dependency build failed or was skipped) > [INFO] Abdera Extensions - GData ............................. SUCCESS > [0.648s] > [INFO] Abdera Extensions - Geo ............................... SUCCESS > [0.514s] > [INFO] Abdera Extensions - HTML .............................. SUCCESS > [0.522s] > [INFO] Abdera Extensions - Main .............................. SUCCESS > [1.130s] > [INFO] Abdera Extensions - JSON .............................. SKIPPED > (dependency build failed or was skipped) > [INFO] Abdera Extensions - Media ............................. SUCCESS > [1.770s] > [INFO] Abdera Extensions - OAuth ............................. SUCCESS > [1.205s] > [INFO] Abdera Extensions - OpenSearch ........................ SUCCESS > [0.978s] > [INFO] Abdera Extensions - Serializer ........................ SKIPPED > (dependency build failed or was skipped) > [INFO] Abdera Extensions - Sharing ........................... SUCCESS > [1.254s] > [INFO] Abdera Extensions - WSSE .............................. SUCCESS > [0.733s] > [INFO] Abdera Bundle Jar ..................................... SKIPPED > (dependency build failed or was skipped) > [INFO] Abdera Extensions - Features .......................... FAILED > [1.017s] > [INFO] Abdera Extensions ..................................... SUCCESS > [0.031s] > [INFO] Abdera Examples ....................................... SKIPPED > (dependency build failed or was skipped) > [INFO] > ------------------------------------------------------------------------ > [INFO] Error for project: Abdera Server (during install) > [INFO] > ------------------------------------------------------------------------ > [INFO] There are test failures. > > Please refer to /Users/edruder/Dev/hi5/abdera/server/target/surefire- > reports > for the individual test results. > [INFO] > ------------------------------------------------------------------------ > [INFO] Error for project: Abdera Extensions - Features (during > install) > [INFO] > ------------------------------------------------------------------------ > [INFO] There are test failures. > > > > James M Snell wrote: >> >> Works for me. Would you be interested in writing up a patch and >> submitting it to jira? If not, I could work up the change but it may >> take a few days longer as I'm trying disparately to get caught up on >> some day job stuff. >> >> - James >> >> ed_ruder wrote: >>> James, >>> >>> I'm not very familiar with Abdera, but I have browsed the source a >>> bit >>> after >>> hitting the same limitation that Jim reported, while working on >>> Shindig. >>> I >>> *think* that a simple change in RouteManager could alleviate some >>> (and >>> for >>> me, I think, all) of the limitation. >>> >>> When resolving a route, Rails walks through its routes in the >>> order that >>> they are defined. RouteManager walks through the targets.entrySet, >>> which >>> is >>> unordered. If RouteManager kept a targets List<> instead of a >>> targets >>> Map<>, >>> it could walk through the routes in order. (There would need to be >>> a new >>> class defined, to hold both the Route and TargetType, but it would >>> be >>> very >>> simple.) >>> >>> To work around the limitation Jim describes, a client would define a >>> /base/:collection/:entry route before the /base/:collection route. >>> >>> WDYT? >>> >>> Ed >>> >>> >>> James M Snell wrote: >>>> Ruby matching can span segments if a default value for the missing >>>> variables is provided. We, however, don't have default values >>>> for our >>>> variables. It would make sense for us to tighten up the matching >>>> rules. >>>> >>>> - James >>>> >>>> Jim Ancona wrote: >>>>> I have run into some problems with my Routes matching >>>>> unexpectedly. >>>>> Before filing a bug, I thought I'd ask for feedback on whether the >>>>> current behavior is correct. >>>>> >>>>> The current algorithm attempts to match the non-variable parts >>>>> of the >>>>> pattern, setting the variable to whatever is in between. >>>>> >>>>> So the pattern "/base/:collection/" matches both "/base/test/" and >>>>> "/base/test/123/". In the second case, the value of the collection >>>>> variable is "test/123". In my opinion, not allowing matches to >>>>> span URI >>>>> segments would be less prone to unintuitive results. >>>>> >>>>> FWIW, a quick glance at some docs on Ruby Routes seems to >>>>> indicate that >>>>> they do not span URI path segments. >>>>> >>>>> Thoughts? >>>>> >>>>> Jim