Re: Versioned assets

2012-02-24 Thread Paul Stanton
well, it does when you change "before:AssetDispatcher" to "before:Asset" sorry. On 24/02/2012 3:19 PM, Steve Eynon wrote: This is an awesome idea, and works perfectly too. Thanks. --- "If at first you don't succeed, so much for skydiving!" On 22 February

Re: Versioned assets

2012-02-24 Thread Lance Java
Most of the time, you should avoid using the regex methods on the String class (split, matches, replace etc) as these will compile the java.util.regex.Pattern for every invocation. Instead, you should Pattern.compile(regex) once and save the result then use Pattern.matches(value). On Wednesday, 2

Re: Versioned assets

2012-02-23 Thread Steve Eynon
This is an awesome idea, and works perfectly too. Thanks. --- "If at first you don't succeed,    so much for skydiving!" On 22 February 2012 08:47, Paul Stanton wrote: > By the way all, > > Here is a solution which does not require any changes to tapestry code. All

Re: Versioned assets

2012-02-21 Thread Paul Stanton
By the way all, Here is a solution which does not require any changes to tapestry code. All code is free to use. 1. contribute a dispatcher to MasterDispatcher, just before the regular AssetDispatcher: public static void bind(ServiceBinder binder) { binder.bind(Dispatcher.cl

Re: Versioned assets

2012-02-21 Thread Paul Stanton
Didn't think there was a Jira yet, I'll try to get around to logging it later this week. On 22/02/2012 8:38 AM, Howard Lewis Ship wrote: Patches are best provided on JIRA; there's a checkbox that shows you have granted the rights to the patch& code to the Apache Software Foundation. Thanks!

Re: Versioned assets

2012-02-21 Thread Howard Lewis Ship
Patches are best provided on JIRA; there's a checkbox that shows you have granted the rights to the patch & code to the Apache Software Foundation. Thanks! On Tue, Feb 21, 2012 at 12:28 PM, Paul Stanton wrote: > Here's my implementation: > > // Copyright 2006, 2008, 2009, 2010, 2011 The Apache S

Re: Versioned assets

2012-02-21 Thread Paul Stanton
Here's my implementation: // Copyright 2006, 2008, 2009, 2010, 2011 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.

Re: Versioned assets

2012-02-21 Thread Lenny Primak
Sounds good to me. I, for example, use the Mercurial revision hash as the version number, so in a sense 'earlier/later' version does not make sense in my context, so if Tapestry would just redirect to the current version it would work great! On Feb 21, 2012, at 2:05 PM, Howard Lewis Ship wrote:

Re: Versioned assets

2012-02-21 Thread Howard Lewis Ship
I suspect the 302 redirect may be the correct solution, and Tapestry could support this pretty reasonably. The perfect solution would involve the following: - The version number if replaced with the SHA1 hash of the resource's (uncompressed) content - All CSS is dynamically rewritten to convert re

Re: Versioned assets

2012-02-19 Thread Paul Stanton
Hi Cezary, I think I have the same need as you. We use load balanced servers, and when upgrading we upgrade one at a time so that there is always a server running. But the side effect is that the upgraded server can receive requests for the old assets, and we don't want to fail in this case.

Re: Versioned assets

2011-03-23 Thread Martin Strand
ersion asset URL? Any non-matching version would be redirected? No, not fixed URLs. We want to take advantage of Tapestry's versioned assets but still let the application respond to requests for "old" asset URLs that have been published by previous versions of the application.

Re: Versioned assets

2011-03-23 Thread Thiago H. de Paula Figueiredo
On Wed, 23 Mar 2011 20:26:35 -0300, raulmt wrote: Cezary Biernacki wrote: On Thu, Mar 24, 2011 at 12:04 AM, Thiago H. de Paula Figueiredo < thiag...@gmail.com> wrote: > Why don't you set the application version symbol of your application to a > given value and never change it? Really?

Re: Versioned assets

2011-03-23 Thread Thiago H. de Paula Figueiredo
On Wed, 23 Mar 2011 20:18:16 -0300, Martin Strand wrote: Because that would defeat the purpose of automatic version management for /assets/ and we would have to rename every asset that changed between versions I'm not following you: if you use some Tapestry way to refer to assets, you

Re: Versioned assets

2011-03-23 Thread raulmt
VED_PERMANENTLY search engines should also update its references. Maybe none of these are ideal solutions, but my point is, to my understanding, redirects to current versions is a better solution than a not found. Regards, Raul. -- View this message in context: http://tapestry-users.832.n2

Re: Versioned assets

2011-03-23 Thread Martin Strand
Because that would defeat the purpose of automatic version management for /assets/ and we would have to rename every asset that changed between versions On Thu, 24 Mar 2011 00:04:29 +0100, Thiago H. de Paula Figueiredo wrote: Why don't you set the application version symbol of your appli

Re: Versioned assets

2011-03-23 Thread Cezary Biernacki
On Thu, Mar 24, 2011 at 12:04 AM, Thiago H. de Paula Figueiredo < thiag...@gmail.com> wrote: > Why don't you set the application version symbol of your application to a > given value and never change it? Really? It will cause all caching problems that version numbers are supposed to solve, will

Re: Versioned assets

2011-03-23 Thread Cezary Biernacki
> > > Perhaps the AssetDispatcher could check the requested version number and if > it doesn't match the app version, send a 302 redirect to the "correct" URL? > /assets/1.3/ctx/script.js --> /assets/1.2/ctx/script.js > > Or perhaps it should only deliver the asset if the requested version os > old

Re: Versioned assets

2011-03-23 Thread Thiago H. de Paula Figueiredo
Why don't you set the application version symbol of your application to a given value and never change it? On Wed, 23 Mar 2011 19:50:59 -0300, Martin Strand wrote: On Wed, 23 Mar 2011 22:43:55 +0100, raulmt wrote: I wanted to know if there is a reason why Tapestry couldn't just answer

Re: Versioned assets

2011-03-23 Thread Martin Strand
On Wed, 23 Mar 2011 22:43:55 +0100, raulmt wrote: I wanted to know if there is a reason why Tapestry couldn't just answer the requests for assets independently of the requested version. I believe that it is better to answer with a newer version than to just not answering at all… In AssetDis

Re: Versioned assets

2011-03-23 Thread raulmt
roblems in some way? Regards, Raul. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Versioned-assets-tp5421811p6202030.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsu

Re: Versioned assets

2010-09-09 Thread Howard Lewis Ship
xt: > http://tapestry-users.832.n2.nabble.com/Versioned-assets-tp5421811p5512040.html > Sent from the Tapestry Users mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.ap

Re: Versioned assets

2010-09-08 Thread LLTYK
Does putting it in the filename instead of the "directory" also have caveats? -- View this message in context: http://tapestry-users.832.n2.nabble.com/Versioned-assets-tp5421811p5512040.html Sent from the Tapestry Users mailing list archive at

Re: Versioned assets

2010-09-08 Thread Howard Lewis Ship
k up the > previous cached version, but if your app version changes and the file > doesn't, the url remains the same. > -- > View this message in context: > http://tapestry-users.832.n2.nabble.com/Versioned-assets-tp5421811p5506019.html > Sent from the Tapestr

Re: Versioned assets

2010-09-07 Thread Martin Strand
On Tue, 07 Sep 2010 13:14:02 +0200, LLTYK wrote: What it should do is instead insert some sort of hash of the file's contents in the url. Then whenever your file changes the browser won't pick up the previous cached version, but if your app version changes and the file doesn't, the url rema

Re: Versioned assets

2010-09-07 Thread LLTYK
context: http://tapestry-users.832.n2.nabble.com/Versioned-assets-tp5421811p5506019.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additio

Re: Versioned assets

2010-09-04 Thread raulmt
e.com/Versioned-assets-tp5421811p5498966.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org

Re: Versioned assets

2010-09-03 Thread based2
://wiki.apache.org/tapestry/Tapestry5ModuleRegistry http://people.apache.org/~uli/tapestry-site/frequently-asked-questions.html#FrequentlyAskedQuestions-HowdoIstoremypageclassesinadifferentpackage -- View this message in context: http://tapestry.1045711.n5.nabble.com/Versioned-assets-tp2634937p2802853.html

Versioned assets

2010-08-13 Thread raulmt
? Regards, Raul. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Versioned-assets-tp5421811p5421811.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users

Re: T5: some automagical way to export versioned assets to CDN?

2010-01-22 Thread Thiago H. de Paula Figueiredo
On Fri, 22 Jan 2010 09:44:48 -0200, britske wrote: Just to get this straight: That code takes care of rewiring the templates to use the correct asset-path right? Yes. But it doesn't take care of actually getting the updated assets to CDN in the first place? No, it doesn't. You would need

Re: T5: some automagical way to export versioned assets to CDN?

2010-01-22 Thread britske
#x27;d have to: > > - up the version in appmodule by hand. > > - create a new s3 bucket by hand (with the version-nr encoded in it) > > - ? copy/ move the versioned assets-directory created by Tapestry to the > > newly created S3- bucket ( I assume it is created on-the-fly on

Re: T5: some automagical way to export versioned assets to CDN?

2010-01-21 Thread Jun Tsai
tml-code to correct path. > > To do this manually I'd have to: > - up the version in appmodule by hand. > - create a new s3 bucket by hand (with the version-nr encoded in it) > - ? copy/ move the versioned assets-directory created by Tapestry to the > newly created S3- buc

T5: some automagical way to export versioned assets to CDN?

2010-01-21 Thread britske
s3 bucket linked to cloudfront. 2. point html-code to correct path. To do this manually I'd have to: - up the version in appmodule by hand. - create a new s3 bucket by hand (with the version-nr encoded in it) - ? copy/ move the versioned assets-directory created by Tapestry to the n