A bug introduced by Rails upgrade

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

A bug introduced by Rails upgrade

Alexey Verkhovsky-2
This code in BuildsController#artifact:

  redirect_to :path => (params[:path] + '/index.html')

now redirects to something like http://ci.scribd.com/builds/scribd-rcov/9f93094/coverage%2Findex.html

Note the URI-escaped slash character before index.html. I'm pretty certain it wasn't happening at some earlier time.
Relevant routes.rb entry:
  map.build_artifact 'builds/:project/:build/*path', :controller => 'builds', :action => 'artifact', :build => /[^\/]+/

Not sure how to fix this yet. Any suggestions?

--
Alexey Verkhovsky
http://alex-verkhovsky.blogspot.com/
CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com]


_______________________________________________
Cruisecontrolrb-developers mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/cruisecontrolrb-developers
Reply | Threaded
Open this post in threaded view
|

Re: A bug introduced by Rails upgrade

Chad Woolley
On Tue, Sep 29, 2009 at 5:27 PM, Alexey Verkhovsky
<[hidden email]> wrote:

> This code in BuildsController#artifact:
>
>   redirect_to :path => (params[:path] + '/index.html')
>
> now redirects to something like
> http://ci.scribd.com/builds/scribd-rcov/9f93094/coverage%2Findex.html
>
> Note the URI-escaped slash character before index.html. I'm pretty certain
> it wasn't happening at some earlier time.
> Relevant routes.rb entry:
>   map.build_artifact 'builds/:project/:build/*path', :controller =>
> 'builds', :action => 'artifact', :build => /[^\/]+/
>
> Not sure how to fix this yet. Any suggestions?

Is it the regexp in the route?  Maybe remove that and have a
controller action to do the same logic and redirect?  Or else figure
out why the regexp is breaking?
_______________________________________________
Cruisecontrolrb-developers mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/cruisecontrolrb-developers
Reply | Threaded
Open this post in threaded view
|

Re: A bug introduced by Rails upgrade

Alexey Verkhovsky-2
already fixed.

On Tue, Sep 29, 2009 at 7:28 PM, Chad Woolley <[hidden email]> wrote:
On Tue, Sep 29, 2009 at 5:27 PM, Alexey Verkhovsky
<[hidden email]> wrote:
> This code in BuildsController#artifact:
>
>   redirect_to :path => (params[:path] + '/index.html')
>
> now redirects to something like
> http://ci.scribd.com/builds/scribd-rcov/9f93094/coverage%2Findex.html
>
> Note the URI-escaped slash character before index.html. I'm pretty certain
> it wasn't happening at some earlier time.
> Relevant routes.rb entry:
>   map.build_artifact 'builds/:project/:build/*path', :controller =>
> 'builds', :action => 'artifact', :build => /[^\/]+/
>
> Not sure how to fix this yet. Any suggestions?

Is it the regexp in the route?  Maybe remove that and have a
controller action to do the same logic and redirect?  Or else figure
out why the regexp is breaking?
_______________________________________________
Cruisecontrolrb-developers mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/cruisecontrolrb-developers



--
Alexey Verkhovsky
http://alex-verkhovsky.blogspot.com/
CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com]


_______________________________________________
Cruisecontrolrb-developers mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/cruisecontrolrb-developers