[Nitro] PATCH: (2) template escape backslashes & RELEASES rdoc fix

Bryan Soto bryan.a.soto at gmail.com
Wed Jan 4 02:34:19 EST 2006


#{glycerin}/nitro/proto/public/scaffold/edit.xhtml:5

The line is: <a href="#{request.uri.gsub(/\/all$/, '')}">Show editable</a>

The patch is basically converting "/\/all$/" into "/\\/all$/" quoting the
backslash used as a quoting character thus causing the syntax error.

At the very least, it's a new test case. I'm not quite sure what to do about
it though...

On 1/3/06, Bryan Soto <bryan.a.soto at gmail.com> wrote:
>
> Hi,
>
> I tried out the template-escape patch against an app and got the
> following:
>
> home/bryan/checkout/darcs/dev-nitro/nitro/lib/nitro/scaffolding.rb:110:in
> `module_eval':
> (eval):37:in `module_eval': compile error (SyntaxError)
> (eval):24: unknown regexp options - all
> (eval):24: syntax error
>     <a href="#{request.uri.gsub(/\\/all$/, '')}">Show editable</a>
>                                          ^
> (eval):24: syntax error
>     <a href="#{request.uri.gsub(/\\/all$/, '')}">Show editable</a>
>                                               ^
> (eval):29: syntax error
>   ^; end ; @out << %^
>    ^
> (eval):36: syntax error from
> /home/bryan/checkout/darcs/dev-nitro/nitro/lib/nitro/scaffolding.rb:110:in
> `define_controller_action'
>         from
> /home/bryan/checkout/darcs/dev-nitro/nitro/lib/nitro/scaffolding.rb:160:in
> `scaffold_controller'
>         from
> /home/bryan/checkout/darcs/dev-nitro/nitro/lib/nitro/scaffolding.rb:123:in
> `scaffold'
>         from
> /home/bryan/checkout/darcs/dev-nitro/nitro/lib/nitro/scaffolding.rb:306:in
> `compile_scaffolding_code'
>         from
> /home/bryan/checkout/darcs/dev-nitro/nitro/lib/nitro/scaffolding.rb:305:in
> `compile_scaffolding_code'
>         from
> /home/bryan/checkout/darcs/dev-nitro/nitro/lib/nitro/controller.rb:161:in
> `mounted'
>         from
> /home/bryan/checkout/darcs/dev-nitro/nitro/lib/nitro/dispatcher.rb:89:in
> `mount'
>         from
> /home/bryan/checkout/darcs/dev-nitro/nitro/lib/nitro/dispatcher.rb:68:in
> `mount'
>         from
> /home/bryan/checkout/darcs/dev-nitro/nitro/lib/nitro/dispatcher.rb:42:in
> `initialize'
>         from
> /home/bryan/checkout/darcs/dev-nitro/nitro/lib/nitro/server.rb:89:in `start'
>         from
> /home/bryan/checkout/darcs/dev-nitro/nitro/lib/nitro/server.rb:121:in `run'
>         from /home/bryan/checkout/darcs/dev-nitro/nitro/lib/nitro.rb:73:in
> `run'
>         from run.rb:31
>
> Attached run.rb should help you duplicate if you're interested in
> reproducing the error.
>
> Substitute #{glycerin} as appropriate.
>
> RUBYOPT=-rubygems ruby
> -I#{glycerin}/glue/lib:#{glycerin}/nitro/lib:#{glycerin}nitro/src:#{glycerin}/og/lib
> run.rb
>
> Just be sure to include nitro/src in the include path for part/admin.
>
> I'll try to look into it tonight if someone doesn't beat me to it. :)
>
> Bryan
>
>
> On 1/3/06, Peter Abrahamsen <rainhead at gmail.com> wrote:
>
> > I sent these to George a few days ago, but sending here as per the
> > new procedure.
> >
> > The first one makes sure \'s in templates aren't eaten by Template
> > processing. The second one makes rdoc work again by fixing some
> > syntax in the nitro/doc/RELEASES file.
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > Nitro-general mailing list
> > Nitro-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/nitro-general
> >
> >
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060104/703f1601/attachment.html 


More information about the Nitro-general mailing list