David Heinemeier Hansson
95762cbbb3
Added shorthand for match 'products/overview' that expands to match 'products/overview', :to => 'products#overview', :as => 'products_overview'
2009-12-27 14:13:03 -08:00
Joshua Peek
f53c36350d
Expect Rack 1.1
2009-12-26 13:25:35 -06:00
David Heinemeier Hansson
38af368360
Merge
2009-12-24 15:24:57 -08:00
David Heinemeier Hansson
2b7256a42e
Extract Mapping class from monster match method
2009-12-24 15:23:39 -08:00
Sam Ruby
aa3565f3a6
Allow named_routes to be used with root, and with new DSL short-form.
...
The real use case it to make all of the following act the same:
root 'store#index', :as => 'store'
match '/' => 'store#index', :as => 'store'
match '/', :to => 'store#index', :as => 'store'
The test case provided deviates from this in order to demonstrate all three
forms in a single set of test routes.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-12-23 20:55:21 -08:00
Jeremy Kemper
4d3602a8c4
Routing: fix that route shorthand shouldn't ignore other options. Raise if :as option is given to root method since its name is always 'root'
2009-12-23 17:42:30 -08:00
Jeremy Kemper
24e1b55608
Fix bare string Rack response bodies
2009-12-23 13:06:53 -08:00
David Heinemeier Hansson
8e48a5ef0c
Add test for root
2009-12-21 21:49:36 -08:00
David Heinemeier Hansson
3ff9e9ee14
Its now possible to use match 'stuff' => 'what#stuff' instead of using the :to for simple routes
2009-12-20 20:37:36 -08:00
Yehuda Katz
e48b4c2dd0
:to => redirect() can take a String using 1.9-style interpolation or proc that takes the path parameters as a Hash
2009-12-20 14:07:32 -08:00
Joshua Peek
2419fae092
Pending tests for AD Response
2009-12-17 22:10:37 -06:00
Joshua Peek
3b44f35e24
Don't need response prepare!
2009-12-17 22:10:37 -06:00
Joshua Peek
2297eaed5b
"new" and "edit" name routes always need to be prepend to the
...
named_route [#3561 state:resolved]
2009-12-11 12:46:50 -06:00
Joshua Peek
ec5434c3c2
Check block arity passed to routes draw so you don't need to use
...
|map|
2009-12-09 20:46:32 -06:00
Joshua Peek
511cef296b
Tack format onto resource routes
2009-12-08 17:19:49 -06:00
Joshua Peek
2be5e088d2
Use new routing dsl in tests
2009-12-08 16:52:26 -06:00
Joshua Peek
ac711043ec
Fix ambiguous access_token scoping example
2009-12-08 16:15:25 -06:00
Joshua Peek
3d91d7f0a2
Routes added under resource collection should be prefixed with
...
resource collection name
2009-12-08 15:31:56 -06:00
Joshua Peek
1fc58a889d
Fixed named prefix scope in resource member and collection actions
2009-12-07 20:57:01 -06:00
Joshua Peek
5835447b6f
named_prefix doesn't join with "_"
2009-12-07 19:31:29 -06:00
Joshua Peek
e8489b43e2
Allow name_prefix to be pass into scope
2009-12-07 19:24:33 -06:00
Joshua Peek
40ad54e381
Allow scope to take :path and :controller options
2009-12-07 18:28:02 -06:00
Joshua Peek
075f50d62c
Fix some nested resource generation tests
2009-11-29 18:17:14 -06:00
Joshua Peek
5df26dd7a9
Add basic nested named route support to new routing dsl. Also add a
...
bunch of pending tests.
2009-11-19 09:04:53 -08:00
Jeremy Kemper
1ac8e0662f
Rack: HTTPS is either 'on' or 'off' as of 9b7a0569e4067d0c23a00fc24273436e85c56d7f
2009-11-10 16:57:55 -08:00
Jeremy Kemper
a595abff21
Unknown :format param should result in empty request.formats
2009-11-08 12:12:58 -08:00
Jeremy Kemper
425a02cece
Ruby 1.9: resolve constant lookup issues
2009-11-04 15:41:50 -08:00
Jeremy Kemper
52e2bbd5c0
Ruby 1.9: work around constant resolution behavior change :(
2009-11-04 14:51:54 -08:00
Joshua Peek
f950d0b4af
Fix simple resource named routes for new routing dsl
2009-11-03 11:23:22 -06:00
Joshua Peek
07da304ff8
Some more generation tests
2009-10-27 21:02:21 -05:00
Joshua Peek
43e0bc1c9f
Extract routing controller stub helper into abstract unit
2009-10-27 21:02:20 -05:00
Joshua Peek
e296ea056e
Enable named route tests
2009-10-27 21:02:20 -05:00
Joshua Peek
759f2ccc4c
Start migrating AC routing tests into dispatch folder
2009-10-27 21:02:20 -05:00
Joshua Peek
a5c82a9dfb
Start rewriting some internal tests to use the new routing dsl
2009-10-20 16:03:55 -05:00
Yehuda Katz
ef70ad5538
Fix a few more 1.9 bugs. Rack 1.0.1 is required for 1.9 compliance but not release, so bundling 1.0.1 from git
2009-10-15 17:16:42 -07:00
Jeffrey Hardy
a8dc9fd27b
CookieJar#delete should return the key's value, consistent with a Hash
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-10-14 11:50:51 -07:00
Joshua Peek
b480da5cd6
Coerce all out going body parts to Strings
2009-10-05 13:58:43 -05:00
Joshua Peek
84e94551f6
Add custom "with_routing" to internal tests to fix reseting session after using
...
with_routing. This only affects our internal AP tests.
2009-10-03 20:45:49 -05:00
Joshua Peek
acfeec5151
Allow integration test rack app to be set with "@app" ivar instead of using open_session
2009-09-26 20:51:05 -05:00
Joshua Peek
02413baabb
Fix skipping memcache tests if a memcache server isn't running
2009-09-26 20:02:47 -05:00
Joshua Peek
1f72700575
Move default middleware stack into initializer
2009-09-26 13:41:32 -05:00
Joshua Peek
0c638b3406
Clean up session integration tests so they don't reference AC::Dispatcher
2009-09-26 12:56:53 -05:00
Joshua Peek
ef58194129
Move Rails::Static into ActionDispatch
2009-09-26 11:37:42 -05:00
Joshua Peek
f5ace625fe
Ensure changes to I18n locale get reset during tests
2009-09-19 13:22:09 -05:00
Jay Pignata
e0f1a7dc19
If session_options[:id] is requested when using CookieStore, unmarshal the session to access it [ #2268 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-09-03 11:50:01 -05:00
Joshua Peek
a79790e1a5
rack-test 0.4.2 has rack 1.1.pre goodies, we'll use it instead
2009-08-31 23:08:20 -05:00
Joshua Peek
ba5995dcd9
Reset session in integration tests after changing routes to reload the middleware stack
2009-08-27 12:43:26 -05:00
Jay Pignata
679128da58
Adding a call to logger from params_parser to give detailed debug information when invalid xml or json is posted
...
[#2481 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-15 16:51:03 -07:00
Yehuda Katz
1310231c15
Got tests to pass with some more changes.
...
* request.formats is much simpler now
* For XHRs or Accept headers with a single item, we use the Accept header
* For other requests, we use params[:format] or fallback to HTML
* This is primarily to work around the fact that browsers provide completely
broken Accept headers, so we have to whitelist the few cases we can
specifically isolate and treat other requests as coming from the browser
* For APIs, we can support single-item Accept headers, which disambiguates
from the browsers
* Requests to an action that only has an XML template from the browser will
no longer find the template. This worked previously because most browsers
provide a catch-all */*, but this was mostly accidental behavior. If you
want to serve XML, either use the :xml format in links, or explicitly
specify the XML template: render "template.xml".
2009-08-15 12:32:02 -07:00
Yehuda Katz
02d9dd9000
Add some more caching to the lookup
2009-08-11 15:03:52 -07:00