I'm against the change because it means that you cannot nest URLMap
inside URLMap.
But it seems like I'm in the minority, I'll implement the method in my
own code and amend Rack to use merge!.
Not sure if that's spec-worthy, we can mention it in any case without
enforcing it outside the rack codebase.
The patch will be pushed tomorrow if nobody has any other opinions.
--
Michael Fellinger
CTO, The Rubyists, LLC
> On Sat, May 1, 2010 at 4:33 PM, Tim Connor <timoc...@gmail.com> wrote:
>> Merge not only creates an additional unneeded hash, this creation of
>> said extra hash prevents any earlier called middleware from accessing
>> anything set by the lower:
>>
>> http://github.com/rack/rack/issues#issue/18
>
> I'm against the change because it means that you cannot nest URLMap
> inside URLMap.
I don't get this. Why?
Konstantin
On Sat, May 1, 2010 at 4:33 PM, Tim Connor <timoc...@gmail.com> wrote:I'm against the change because it means that you cannot nest URLMap
> Merge not only creates an additional unneeded hash, this creation of
> said extra hash prevents any earlier called middleware from accessing
> anything set by the lower:
>
> http://github.com/rack/rack/issues#issue/18
inside URLMap.
Konstantin
On Jun 8, 2010, at 20:14 , Michael Fellinger wrote:
I just checked, and the test for nesting passes.
Here is the test: http://github.com/rack/rack/blob/master/test/spec_rack_urlmap.rb#L128-148
SCRIPT_NAME is appended when nesting and only modified if an appropriate app is found.
Konstantin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
iQEcBAEBAgAGBQJMDpCnAAoJEM+qkfuqK1IXVHoIANk4n7EE0rB/3JkePO1eGNer
DTQRtrBWtj8KU8FYA4Cpu8r/EiSES/8LqkbGGIMxCh8SQK+xSo+ntq1/zws4IqzJ
wy9kRufJNovhgu7tHIUaRCR5zI0KdPii1030S/upBHlEWmUauR9ZDyQ1mA8WNmZg
Hx935a+iHQYmIFZ6UXtincrfu83QEO7f4xIY2YvzonNZaD6iRMmufZHvMX/8o6ag
lyYnwYZlmqNVtqZNADD5CnMOD8tbv8J3LOB54PDA+3trCqWrzqrnBGACV/jBhId8
9s9jGxE5REkb/mjLTjLPbj+shOdVxxYj5OSrgO0aF7tCawuBSbxzmW015qEgJeU=
=AU5v
-----END PGP SIGNATURE-----
I think a somewhat related issue, especially when using a cascade, is that the values don't get reseted.
This should fix the issue: http://github.com/rkh/rack/commit/47506242f26bb9642766bb35048cc8d4da6ddaeb
Konstantin
I think this could introduce a lot of hard to find bugs, but I cannot prove it.
In doubt, let's try it on HEAD.
On Jun 8, 2010 8:15 PM, "Michael Fellinger" <m.fel...@gmail.com> wrote:
On Sat, May 1, 2010 at 4:33 PM, Tim Connor <timoc...@gmail.com> wrote:
> Merge not only creates an...
Good, I think this would work in the majority of cases.
Of course, it will still cause headaches for someone, but it solves my
issues and doesn't use merge.
I committed the patches I found in rkh/rack, thanks to Tim and Konstantin.
The first parent is at:
http://github.com/rack/rack/commit/09779a2a4965886b5814231074
I committed the patches I found in rkh/rack, thanks to Tim and Konstantin.
The first parent is at:
http://github.com/rack/rack/commit/09779a2a4965886b5814231074