A bug introduced by Rails upgrade

View: New views
3 Messages — Rating Filter:   Alert me  

A bug introduced by Rails upgrade

by Alexey Verkhovsky-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
Cruisecontrolrb-developers@...
http://rubyforge.org/mailman/listinfo/cruisecontrolrb-developers

Re: A bug introduced by Rails upgrade

by Chad Woolley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Sep 29, 2009 at 5:27 PM, Alexey Verkhovsky
<alexey.verkhovsky@...> 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
Cruisecontrolrb-developers@...
http://rubyforge.org/mailman/listinfo/cruisecontrolrb-developers

Re: A bug introduced by Rails upgrade

by Alexey Verkhovsky-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

already fixed.

On Tue, Sep 29, 2009 at 7:28 PM, Chad Woolley <thewoolleyman@...> wrote:
On Tue, Sep 29, 2009 at 5:27 PM, Alexey Verkhovsky
<alexey.verkhovsky@...> 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
Cruisecontrolrb-developers@...
http://rubyforge.org/mailman/listinfo/cruisecontrolrb-developers



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


_______________________________________________
Cruisecontrolrb-developers mailing list
Cruisecontrolrb-developers@...
http://rubyforge.org/mailman/listinfo/cruisecontrolrb-developers