Yehuda Katz + Carl Lerche
0515256fd3
Accept Symbol for contoller name [ #2855 state:resolved]
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>
2009-07-01 11:16:18 -07:00
Yehuda Katz + Carl Lerche
86fc43fd58
ActionPack components should no longer have undeclared dependencies.
...
* Tests can be run in isolation
* Dependencies added
* A few tests modified to avoid depending on AS deps
not depended on my files they were testing
2009-06-08 13:34:07 -07:00
Jeremy Kemper
f9bd10054c
Sidestep need for Kernel#silence_warnings
2009-05-30 11:59:17 -07:00
Eduard Bondarenko
61c471eebb
Add % to RESERVED_PCHAR [ #2574 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-05-27 14:53:05 -05:00
Pratik Naik
b77602824a
Add some more tests to the test_new_base_on_old_tests task
2009-05-23 01:46:37 +02:00
Joshua Peek
00d1a57e9f
Start moving TestRequest and TestResponse into ActionDispatch
2009-04-30 17:26:03 -05:00
Andrew Bloom
90dba00822
Ensure blank path_prefix works as expected [ #2122 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-09 15:27:13 +00:00
Jeremy Kemper
1c36172c13
Ruby 1.9 compat: rename deprecated assert_raises to assert_raise.
...
[#1617 state:resolved]
2009-03-08 13:11:58 -07:00
Mike Gunderloy
5e0f6214d2
Support OPTIONS verb in route conditions [ #1727 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-08 12:37:17 +00:00
Joshua Peek
638b3b15a1
Generating routes with optional format segment does not inherit params format [ #2043 state:resolved]
2009-03-04 14:37:59 -06:00
Andrew White
3248553d32
Fix requirements regexp for path segments
...
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1772 state:committed]
2009-02-22 15:35:22 +13:00
Andrew White
f7a0a394f4
Remove hardcoded number_of_capturesin ControllerSegment to allow regexp requirements with capturing parentheses
...
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1887 state:committed]
2009-02-22 15:34:01 +13:00
moro
bfe7d518a7
fix test data, should specify encoding to use multibyte chars on Ruby 1.9
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-02-20 18:25:19 -08:00
Jeremy Kemper
278186534c
Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha.
2009-02-03 18:40:22 -08:00
Joshua Peek
5d89605c11
Make router and controller classes better rack citizens
2008-12-28 15:31:03 -06:00
David Heinemeier Hansson
40b40c4870
Added support for multiple routes files and made draw not clear the map so they can be additive
2008-11-26 15:57:36 +01:00
Joshua Peek
31ce92f7b5
Use autoload instead of explicit requires for ActionController
2008-11-23 16:35:47 -06:00
Gabe da Silveira
917428bcce
Make optimized named routes respect all reserved options and tie it into UrlRewriter::RESERVED_OPTIONS so it's DRY
...
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-11-18 22:47:33 +01:00
Tom Stuart
e28ad77bba
Allow use of :path_prefix and :name_prefix outside of namespaced routes. [ #1188 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-10-08 14:56:52 +01:00
Matt Jones
7e6cda15f8
Ensure routing optimizations are cleared when new routes are added [ #981 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-09-07 10:21:34 -05:00
Luke Melia
7ce03db778
Fixes optimised named routes generating question mark followed by nothing when provided an empty hash as the last argument.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#481 state:committed]
2008-08-31 19:42:01 +02:00
Jeremy Kemper
766fb54c8f
Fix indentation
2008-08-28 12:35:47 -07:00
Brennan Dunn
9cc8c0a0a1
Routes may be restricted to lists of HTTP methods instead of a single method or :any.
...
[#407 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-08-28 12:29:49 -07:00
Joshua Peek
a5db148825
Prepare Route#generate and Route#recognize early. Also refactor segments a bit to try to make immutable.
2008-07-28 13:41:42 -05:00
Joshua Peek
e0513e33c4
Routing whitespace cleanup
2008-07-28 13:38:20 -05:00
Joshua Peek
a87462afcb
AbstractRequest.relative_url_root is no longer automatically configured by a HTTP header. It can now be set in your configuration environment with config.action_controller.relative_url_root
2008-07-24 13:41:51 -05:00
Tom Ward
d39485078e
Raise ArgumentError if an invalid method is specified as part of a route's conditions. Also raise an error if HEAD is specified as the method, as rails routes all HEAD requests through the equivalent GET, though doesn't return the response body [ #182 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-07-18 20:19:03 -05:00
Tarmo Tänav
a37d065f85
Use :namespace instead of :path_prefix for finding controller. [ #544 state:resolved]
...
:namespace is supposed to be the module where controller exists.
:path_prefix can contain anything, including variables, which
makes it unsuitable for determining the module for a controller.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-03 16:11:50 +01:00
Joshua Peek
d5539958a8
Wrap CGIResponse, LegacyRouteSet, Route, RouteSet and RouteLoading tests inside mocha block.
2008-06-07 23:42:05 -05:00
Joshua Peek
c08547d226
Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ActiveSupport [ #238 state:resolved]
2008-06-03 13:32:53 -05:00
Sven Fuchs
345f030c5b
Ensure routing generator works with non-string keys. [ #172 state:resolved]
...
Make sure that (with recent correction to globbed parameter escaping) non-string
values can still be passed route generation helpers for globbed route segments.
For example, foo_path([1, 2, 3]) should still work for a route like map.foo "*globbed"
by implicitely calling to_s on the Fixnums.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-16 17:36:09 +01:00
Chris Roos
6776edccf6
Escape globbed parameters in routes correctly.
...
:controller => 'glob', :action=> 'show', :additional => ['foo/bar', 'baz']
Should generate /glob/show/foo%2Fbar/baz not /glob/show/foo/bar/baz
2008-05-10 14:55:41 +12:00
David Heinemeier Hansson
926f4648f0
Made the location of the routes file configurable with config.routes_configuration_file (Scott Fleckenstein) [ #88 state:resolved]
2008-05-01 17:26:31 -05:00
David Heinemeier Hansson
db3a60eb92
Added support for regexp flags like ignoring case in the :requirements part of routes declarations ( closes #11421 ) [NeilW]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9115 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 20:01:21 +00:00
Jeremy Kemper
f2840f508d
Fix an edge case with extra periods in Routing.normalize_paths. Closes #11337 [cavalle, veejar]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9069 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-21 22:44:04 +00:00
Michael Koziarski
6e165b8940
Make it simpler to make the root route an alias for another route. Closes #10818 [bscofield]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8738 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-26 08:41:19 +00:00
Jeremy Kemper
630c643f5b
Add timing test for large restful route recognition. References #10835 [oleganza]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8673 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 05:24:44 +00:00
Jeremy Kemper
07fcac508a
Ruby 1.9 compat: don't rely on Array#to_s to flatten and join as string
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8590 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-07 08:12:34 +00:00
Jeremy Kemper
9d755f1983
require abstract_unit directly since test is in load path
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8564 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:32:06 +00:00
Jeremy Kemper
f85089aabb
Fixes for standalone tests
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8406 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 02:29:04 +00:00
David Heinemeier Hansson
2af36bbbd4
Fix typos ( closes #10378 )
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8301 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-05 18:54:41 +00:00
Michael Koziarski
6a611e1e95
Make sure the optimisation code for routes doesn't get used if :host, :anchor or :port are provided in the hash arguments. [pager, Koz] Closes #10292
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8227 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-28 04:11:37 +00:00
David Heinemeier Hansson
5e94f053cb
Fixed to_s bug with namespace routes ( closes #10283 ) [johnb]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8216 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-26 22:41:28 +00:00
David Heinemeier Hansson
9e76b59c85
Fixed that named routes living under resources shouldn't have double slashes ( closes #10198 ) [isaacfeliu]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8206 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-25 22:24:23 +00:00
Michael Koziarski
0c12d6c6dc
Ensure that the routing optimisation code isn't used when additional arguments are passed to the named route. Closes #10209 [bscofield, Koz]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8169 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-20 21:25:25 +00:00
Jeremy Kemper
ae8179f05c
Expand Routes::DynamicSegment test coverage. Closes #7122 [Kevin Clark]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7898 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-15 04:27:31 +00:00
Michael Koziarski
bd03bf9f5e
Make sure that custom inflections are picked up by map.resources by triggering a routing reload when new inflections are defined. Closes #9815 [mislav, kampers]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7849 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-13 03:28:35 +00:00
Rick Olson
904df818d6
Move ActionController::Routing.optimise_named_routes to ActionController::Base.optimise_named_routes. Now you can set it in the config.
...
ActionController::Routing::DynamicSegment#interpolation_chunk should call #to_s on all values before calling URI.escape. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7724 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-03 05:47:41 +00:00
Michael Koziarski
9660360d6b
Re-enable Routing optimisation code for _url methods, add defined?(request) to the guard conditions
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7673 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-28 20:57:39 +00:00
David Heinemeier Hansson
e3b49c052b
Fixed spelling errors ( closes #9706 ) [tarmo/rmm5t]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7666 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-28 14:18:47 +00:00