Commit Graph

1199 Commits

Author SHA1 Message Date
Joshua Peek
5b025a1d11 Revert 5b7527ca "Failing test for routes with member & requirement" [#2054 state:wontfix] 2009-03-13 17:13:18 -05:00
Joshua Peek
eced3d8c55 Update rack to fix multipart uploads with an empty file [#1945 state:resolved] 2009-03-13 17:13:10 -05:00
Jeremy Kemper
91d2740595 Return body parts directly to Rack rather than building a response string ourselves. Allows Rack middleware to orchestrate response building. 2009-03-12 21:47:34 -07:00
Mike Gunderloy
d771e7d17f Handle irregular plurals in polymorphic_urls [#2212 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-12 17:02:07 +00:00
Donald Parish
be7b64b35a Support MD5 passwords for Digest auth and use session_options[:secret] in nonce [#2209 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-12 13:24:54 +00:00
Mislav Marohnić
fa45540cdb Ensure correct content type is declared after cache hits on actions with string cache keys [#1585 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-10 23:31:19 +00:00
Joshua Peek
224a534400 reset_session should force a new session id to be generated [#2173] 2009-03-09 22:46: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
Tom Stuart
5c87e9addd Ensure shallow routes respects namespace [#1356 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-07 22:50:58 +00:00
Joshua Peek
ea8488caef Fixed simplified render with nested models [#2042 state:resolved] 2009-03-07 14:05:18 -06:00
Matt Jones
87e8b16246 fix HTML fallback for explicit templates [#2052 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-03-07 13:32:46 -06:00
Pratik Naik
272c2d2e9c Ensure assert_select works with XML namespaced attributes [#1547 state:resolved] [Jon Yurek] 2009-03-07 16:13:34 +00:00
Johan Sørensen
c071123b3e Ensure expires_in without a :public key sets the Cache-Control header to private. [#2095 state:resolved]
This fixes a regression introduced in f2a32bd0, which wasn't exposed due to two
test methods having the same name.

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-07 12:18:10 +00:00
thedarkone
3191535ff0 Fix layouts with absolute paths [#2134 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-03-05 18:49:22 -06:00
Mike Gunderloy
5b7527ca44 Failing test for routes with member & requirement [#2054 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-03-05 18:46:59 -06: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
Mike Gunderloy
ce56c5daa8 Allow routes with a trailing slash to be recognized
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#2039 state:committed]
2009-03-04 14:27:39 +13:00
Gregg Pollack
f2a32bd0de Added ability to pass in :public => true to fresh_when, stale?, and expires_in to make the request proxy cachable [#2095 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2009-02-28 10:33:42 +01:00
Matt Jones
b35562f432 correctly handle layouts for AJAX requests and regular js files [#2052 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-02-24 10:38:07 -06:00
moro
b6c8379834 Expected cookie value should also be escaped.
Ruby 1.9 compat for test.

[#1965 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-02-21 21:11:50 -08: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
Sven Fuchs
8c5cc66a83 make action_controller/layouts pick templates from the current instance's view_paths instead of the class view_paths [#1974 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-02-20 14:19:45 -06:00
Joshua Peek
69c049f5ab Move development mode reloading up the stack to avoid issues with class reloading in middleware 2009-02-20 12:04:57 -06:00
Sven Fuchs
53fe301a42 Lazy evaluate middleware arguments [#2028 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-02-20 10:50:21 -06:00
Joshua Peek
9702636a08 Lazy evaluate ActionController session store middleware class to pickup custom plugin session stores [#2001 state:resolved] 2009-02-19 21:21:34 -06:00
Joshua Peek
f8ea9f85d4 Fix templates reloading in development when using custom view path [#2012 state:resolved] 2009-02-19 20:55:56 -06:00
Donald Parish
86d8f92282 Fixed http digest authentication to use credentials URI passed from client. [#1848 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-02-16 20:20:23 +01:00
thedarkone
3942cb406e Port fast reloadable templates from rails-dev-boost. 2009-02-12 13:04:12 -06:00
Mike Gunderloy
b1d41bdfb0 Remove space from the test name [#1953 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-02-12 17:47:52 +01:00
Joshua Peek
524d8edf68 Update bundled Rack for Ruby 1.9 spec changes 2009-02-07 16:18:09 -06:00
Joshua Peek
0edb0a4fac Deprecate ActionController::Response#set_cookie :http_only option infavor of :httponly 2009-02-07 15:37:54 -06:00
Joshua Peek
2277fbedbe Temporarily bundle Rack 1.0 prerelease for testing 2009-02-07 00:08:28 -06:00
José Valim
24f2e676f7 Added support to dashed locales in templates localization [#1888 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-02-06 23:23:50 -06:00
Joshua Peek
43c09383ce Ensure session id is set in session options hash [#1880 state:resolved] 2009-02-06 23:16:58 -06:00
Eugene Pimenov
ae36fcedce Ruby 1.9 compat: call bytesize for content_length
[#1881 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-02-06 10:28:09 -08:00
Adam McCrea
06182ea02e implicitly rendering a js response should not use the default layout [#1844 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-02-05 15:23:05 -06:00
Jeremy Kemper
278186534c Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha. 2009-02-03 18:40:22 -08:00
Yehuda Katz
9744f687cc Add support for pending 2009-02-02 11:49:32 -08:00
Yehuda Katz
44cdf0c5fe Some merge cleanup 2009-02-02 09:54:23 -08:00
José Valim
2ecc678ed6 Added localized rescue (404.da.html) [#1835 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2009-02-02 17:56:22 +01:00
Joshua Peek
5b5d0e325d Use Rack::Head middleware to ensure the body is discarded for HEAD requests 2009-02-01 01:01:49 -06:00
Joshua Peek
63b4fe53ab Remove ancient tests for CGI parsing bug 2009-01-31 23:51:42 -06:00
Joshua Peek
28b65c9120 Removed Prototype specific Safari 2 AJAX hack.
The normal null character stripper is still there.
2009-01-31 23:51:41 -06:00
Tarmo Tänav
80747e9db1 Removed map.resources :only/:except inheritance
It's very rare for these options to apply identically to nested child resources, and with this inheritance on it's very difficult to have a child resource with more actions than the parent.

This reverts commit 2ecec6052f7f290252a9fd9cc27ec804c7aad36c.

Signed-off-by: Michael Koziarski <michael@koziarski.com>

[#1826 state:committed]
2009-02-01 14:47:56 +13:00
Yehuda Katz
3030bc90c9 Merge commit 'rails/3-0-unstable'
Conflicts:

	actionpack/lib/action_controller/base.rb
	actionpack/lib/action_dispatch/http/mime_type.rb
	actionpack/lib/action_dispatch/http/request.rb
	actionpack/lib/action_view/base.rb
	actionpack/lib/action_view/paths.rb
	actionpack/test/controller/session/cookie_store_test.rb
	actionpack/test/dispatch/rack_test.rb
	actionpack/test/dispatch/request_test.rb
2009-01-30 11:30:27 -08:00
Scott Taylor
2dedb5b03a Controller, response, and request should all refer to same session, even after a call to session_reset [#1823 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-01-29 19:39:48 -06:00
Mike Gaffney
1b79683171 Deprecation tests for f17c876 [#1801 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-01-29 19:37:38 -06:00
Gregg Kellogg
306cc2b920 Implement HTTP Digest authentication. [#1230 state:resolved] [Gregg Kellogg, Pratik Naik]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-01-29 16:01:59 +00:00
Joshua Peek
85750f22c9 Move dispatch related tests into test/dispatch 2009-01-28 22:50:46 -06:00
Pratik Naik
a1a9889b06 Move basic auth test controller inside the test class 2009-01-29 01:59:55 +00:00
Nathan de Vries
32eeb3e521 Ensure that when UrlWriter is included in multiple classes, the default_url_options of one don't affect the other. [#1277 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-01-28 19:31:48 +00:00
Pratik Naik
2ae8d3079b Session cookie header should always be set if :expire_after option is specified 2009-01-28 05:05:48 +00:00
Joshua Peek
319ae4628f Move HTTP libs and middleware into ActionDispatch component 2009-01-27 18:54:01 -06:00
Joshua Peek
a0f2b1d95d Reorganize ActionController folder structure 2009-01-27 18:17:39 -06:00
Joshua Peek
093f758bd0 Restore implicit rendering for XHR requests that want a HTML template [#1590 state:resolved] 2009-01-27 14:09:11 -06:00
Pratik Naik
57b156b338 Dont use Memoizable for ActionController::Request 2009-01-27 17:26:37 +00:00
Yehuda Katz
eb9af20b7c Begin unifying the interface between ActionController and ActionView 2009-01-22 16:18:10 -06:00
Joshua Peek
a8ad6568f9 Allow empty files to be uploaded 2009-01-20 20:34:35 -06:00
Joshua Peek
7e4d13d357 Add MiddlewareStack#swap
config.middleware.swap ActionController::Session::CookieStore, MySessionStore
2009-01-20 20:19:52 -06:00
Mislav Marohnić
01f06fc7f4 Don't let empty Tempfiles come through as uploaded files [#1785 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-01-20 12:38:25 -06:00
Cody Fauser
c090e5e075 Restore cookie store httponly default to true. Remove extraneous dup of options on initialization [#1784 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-01-20 11:50:43 -06:00
Pratik Naik
68fdfde003 Improve HTTP Basic authentication tests 2009-01-18 19:21:34 +00:00
Joshua Peek
ff0a2678c4 Build query string and POST params parser on top of Rack::Request. Also switch our multipart parser to use Racks. Moved XML, JSON, and YAML parsers into ActionController::ParamsParser middleware [#1661 state:resolved] 2009-01-17 20:29:50 -06:00
Joshua Peek
aab760c3df Add test coverage for fixing Safari 2 trailing null character 2009-01-17 20:03:22 -06:00
Joshua Peek
9775c25824 Update multipart tests to expose (another) bug in Rack's multipart parser 2009-01-13 17:21:45 -06:00
Joshua Peek
1adc1496f9 Add RewindableInput wrapper to fix issues with middleware that impolitely eat up non-rewindable input 2009-01-13 16:09:51 -06:00
Bryan Ash
5a43908c74 Explicitly read as binary in multipart_body for Windows [#1065 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-01-13 14:42:43 -06:00
Pratik Naik
c99ef814b0 Revert "HTTP Digest authentication [#1230 state:resolved]"
This reverts commit 45dee3842d68359a189fe7c0729359bd5a905ea4.

Reasons :

1. The code is not working in it's current state
2. Should not be using exceptions for flow control
2009-01-13 16:13:42 +00:00
Joshua Peek
18cb0493d1 Refactor request urlencoded params parsing tests 2009-01-10 16:02:03 -06:00
Joshua Peek
9fe69b225c Moved query string parsing tests into the request tests folder 2009-01-10 11:39:57 -06:00
Joshua Peek
92dbf5ba83 Refactor request multipart params parsing tests 2009-01-10 11:32:38 -06:00
Joshua Peek
40a75a5091 Refactor request xml params parsing tests 2009-01-09 16:05:27 -06:00
Joshua Peek
38a723e6ea Refactor request json params parsing tests 2009-01-09 15:43:32 -06:00
Joshua Peek
ac4bf1180a Ensure we override Rack::Request's POST method too 2009-01-09 13:12:39 -06:00
Joshua Peek
282c1d6159 Refactor request query string parsing tests 2009-01-09 12:52:59 -06:00
Jeremy Kemper
074414883c Remove Content-Length header from :no_content responses 2009-01-07 15:55:28 -08:00
Jeremy Kemper
c90572e3ab Use instance_eval instead of adding an accessor to the class 2009-01-07 14:49:12 -08:00
Jeremy Kemper
35fa007313 Include process methods in ActionController::TestCase only. No need to alias_method_chain :process either. 2009-01-07 14:49:05 -08:00
Joshua Peek
b7ea4add86 Bump Rack version to 0.9 2009-01-06 15:20:57 -06:00
Joshua Peek
f00e86d7e9 Memoize request accessors on the Rack env so other request objects have access to the same cache [#1668 state:resolved] 2009-01-04 12:15:15 -06:00
Joshua Peek
ed2e776bde Move metal above method piggybacking middleware and add some test coverage 2009-01-03 23:02:29 -06:00
Joshua Peek
f7ee082bb3 Add failing test for file uploads with unrewindable input 2009-01-02 18:46:01 -06:00
Joshua Peek
104898fcb7 Revert to the good old days when AssetTag didn't cause anyone problems 2009-01-02 13:40:23 -06:00
Laszlo Bacsi
606176a55b Fixed call_with_exception for Routing Errors [#1684 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-01-02 10:46:48 -06:00
Jeremy Kemper
2e1132fad8 Test that exceptions raised in filters are properly rescued 2008-12-30 18:06:56 -08:00
Pratik Naik
82443ecfad Merge commit 'fred/pullable' 2008-12-30 17:50:17 +00:00
Joshua Peek
5d89605c11 Make router and controller classes better rack citizens 2008-12-28 15:31:03 -06:00
Joshua Peek
45dee3842d HTTP Digest authentication [#1230 state:resolved] 2008-12-28 15:13:16 -06:00
Pratik Naik
fec0ea9d6d Request#env['SERVER_NAME'] does not contain port number 2008-12-28 17:07:13 +00:00
Mark Reginald James
5138f755ff Fixed incorrect parsing of query parameters with mixed-depth nesting inside an array [#1622 state:resolved]
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com>
2008-12-28 01:15:48 +00:00
Yaroslav Markin
fdaa9ed033 Fix ActionPack build on Windows: we really should not test anything regarding symlinks on Windows.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-12-27 17:33:13 +00:00
Pratik Naik
f4f8923cf0 Merge commit 'fred/pullable' 2008-12-26 21:56:21 +00:00
Frederick Cheung
dce0da77e7 Fix assert_select_rjs not checking id for inserts [#540 state:resolved] 2008-12-26 18:25:32 +00:00
Frederick Cheung
d7b6e48c70 Fix randomly failing cookie store tests
Marshal.dump(Marshal.load(marshaled_hash)) is not guarenteed to be equal to marshaled_hash
because of the lack of ordering of hash
2008-12-26 18:25:03 +00:00
Pratik Naik
80307c8b0a Make ActionController#render(symbol) behave same as ActionController#render(string) [#1435] 2008-12-26 01:12:11 +00:00
Pratik Naik
cd1d6e8768 Make ActionController#render(string) work as a shortcut for render :action => string. [#1435]
Examples:
  # Instead of render(:action => 'other_action')
  render('other_action')

Note : Argument must not have any '/'
2008-12-25 23:05:34 +00:00