Commit Graph

348 Commits

Author SHA1 Message Date
David Heinemeier Hansson
d1575ae1b9 Change Object#either? to Object#among? -- thanks to @jamesarosen for the suggestion! 2011-04-12 00:23:07 +02:00
Prem Sichanugrist
d6edaeeaf8 Fix failing test case on master
It turned out that I overlook at some replacements ..
2011-04-10 22:40:21 -07:00
Prem Sichanugrist
a9f3c9da01 Using Object#in? and Object#either? in various places
There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?.
2011-04-11 03:17:09 +08:00
Santiago Pastorino
03d561ad77 Revert "Use freeze instead of close!"
This reverts commit 29592a7f09.
2011-04-07 09:26:04 -03:00
Santiago Pastorino
17205435f8 cookies here 2011-04-07 09:20:35 -03:00
Santiago Pastorino
29592a7f09 Use freeze instead of close! 2011-04-06 20:53:48 -03:00
Santiago Pastorino
9f765f4e09 Delete useless arguments 2011-04-06 19:18:41 -03:00
Santiago Pastorino
ed04243629 Delete useless env variable 2011-04-06 19:15:33 -03:00
Santiago Pastorino
0d45567362 Add tests to verify that signed and permanent cookies raises if someone tries
to modify the cookies when it was already streamed back to the client
or converted to HTTP headers
2011-04-06 19:12:35 -03:00
Santiago Pastorino
0c5aded092 raise if someone tries to modify the cookies when it was already streamed back to the client or converted to HTTP headers 2011-04-06 15:47:58 -03:00
Sebastian Martinez
52351bcfeb Remove 'warning: ambiguous first argument' when running ActionPack tests
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-03-29 10:23:10 -03:00
Prem Sichanugrist
84a4ef63a4 Move mapper_test to the appropriate location
It seems like in 89c5b9aee7 Aaron actually put the test in action_dispatch folder. However, there's already a `test/dispatch` directory which I think it's more appropriate.

Signed-off-by: Andrew White <andyw@pixeltrix.co.uk>
2011-03-29 10:12:17 +01:00
Josh Kalderimis
5170d210e8 correction to the outputted controller name in the diagnostics error template, test included
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-03-24 19:43:48 -03:00
Prem Sichanugrist & Xavier Noria
68802d0fbe Filter sensitive query string parameters in the log [#6244 state:committed]
This provides more safety to applications that put secret information in the query string, such as API keys or SSO tokens.

Signed-off-by: Xavier Noria <fxn@hashref.com>
2011-03-11 00:16:18 +01:00
Andrew White
31f09f9dbc Improve testing of cookies in functional tests:
- cookies can be set using string or symbol keys
- cookies are preserved across calls to get, post, etc.
- cookie names and values are escaped
- cookies can be cleared using @request.cookies.clear

[#6272 state:resolved]
2011-03-06 12:49:44 +00:00
Andrew White
e00867bc43 Raise ArgumentError if route name is invalid [#6517 state:resolved] 2011-03-06 07:08:50 +00:00
Aaron Patterson
1f2e7214aa make sure string keys are always looked up from the class cache 2011-03-02 10:11:28 -08:00
Aaron Patterson
9198372421 Ruby 1.8: Y U NO FUN? 2011-03-02 09:43:27 -08:00
Aaron Patterson
7b6bfe84f3 refactor Reference to a ClassCache object, fix lazy lookup in Middleware so that anonymous classes are supported 2011-03-01 17:20:35 -08:00
Andrew White
ccc678b49e Add test to prevent regression on namespace root nested in a resource
[#6389 state:resolved]
2011-02-14 06:12:22 +00:00
Andrew White
460a341682 Fix named route helper for routes nested inside deeply nested resources
[#6416 state:resolved]
2011-02-14 02:56:09 +00:00
Andrew White
385be358cf Fix assert_recognizes with block constraints [#5805 state:resolved] 2011-02-13 23:24:46 +00:00
José Valim
6b1018526f Use Mime::Type references. 2011-02-08 14:14:26 -08:00
Aaron Patterson
ea25224046 cleaning up some warnings on 1.9.3 2011-02-07 16:44:27 -08:00
german
adbae9aab8 fixed bug with nested resources within shallow scope
[#6372 state:committed]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-04 17:07:51 -02:00
brainopia
8491f16e12 Add tld_length option when using domain :all in cookies
Signed-off-by: José Valim <jose.valim@gmail.com>
2011-01-21 13:13:51 +01:00
brainopia
91a4193ee0 Support list of possible domains for cookies
Signed-off-by: José Valim <jose.valim@gmail.com>
2011-01-21 13:13:43 +01:00
José Valim
d6efd3cfc2 Don't deprecate to_prepare. 2010-12-23 19:21:14 +01:00
José Valim
819b8cae40 Clean up callbacks should also be called on exceptions. 2010-12-23 19:17:02 +01:00
José Valim
0cbfd6c28d Small changes on AD::Reloader. 2010-12-20 12:43:02 +01:00
John Firebaugh
435bccda93 Replace AD::Callbacks.to_prepare with AD::Reloader.to_prepare
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-20 12:43:02 +01:00
John Firebaugh
0f7c970e4f Introduce ActionDispatch::Reloader
Based on the implementation on the 2-3-stable branch, patches by Hongli
Lai <hongli@phusion.nl>, and helpful suggestions from José Valim.

Hongli Lai's patches included locking around the request cycle; this is
now handled by Rack::Lock (https://github.com/rack/rack/issues/issue/87/).

[#2873]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-20 12:43:02 +01:00
brainopia
ebc47465a5 Fix edge cases for domain :all option on cookie store
Dont set explicit domain for cookies if host is not a domain name

[#6002 state:committed]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-12-16 01:49:30 +05:30
José Valim
28cf77203b Check if the routes object really responds to define_mount_prefix. 2010-12-09 13:15:25 +01:00
José Valim
78afe68afb Merge remote branch 'joshk/redirect_routing'
Conflicts:
	actionpack/CHANGELOG
	actionpack/lib/action_controller/metal/mime_responds.rb

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-03 12:27:50 +01:00
Josh Kalderimis
1e26bda095 Added documentation explaining the new additional supported syntaxes for the routing redirect method, a small changelog note, and two extra tests for path interpolation when using the hash option syntax. 2010-11-30 17:55:33 +01:00
Josh Kalderimis
0bda6f1ec6 The redirect routing method now allows for a hash of options which only changes the relevant parts of the url, or an object which responds to call can be supplied so common redirect rules can be easily reused. This commit includes a change where url generation from parts has been moved to AD::Http::URL as a class method. 2010-11-30 16:36:01 +01:00
José Valim
31906eecdf Fix tests on 1.9.2. 2010-11-28 12:48:50 +01:00
José Valim
a4c360e8c7 trailing star mimes should respect the order in which mime types are defined. 2010-11-28 11:54:00 +01:00
José Valim
731ca00b48 Dynamically generaeted helpers on collection should not clobber resources url helper [#6028 state:resolved] 2010-11-25 11:50:29 +01:00
Neeraj Singh
18adbe9347 process text/* if it appears in the middle of
HTTP_ACCEPT parameter
2010-11-25 04:38:51 +08:00
Neeraj Singh
5c9abb6cca processing image/* is an odditity because there is
a test case which expects image/* to not to be
expanded. So I am leaving image/* as it is and
process only text/* and application/*
2010-11-25 04:38:50 +08:00
Neeraj Singh
b52a6ba169 clean up test by using unregister method 2010-11-25 04:38:50 +08:00
Neeraj Singh
e870883625 unregister method implementation and test 2010-11-25 04:38:47 +08:00
Josh Kalderimis
e39138478b port_string bought back to life as it is part of the public api
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-24 10:34:18 +01:00
Josh Kalderimis
2fe43b694f :subdomain, :domain and :tld_length options can now be used in url_for, allowing for easy manipulation of the host during link generation.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-23 09:54:42 +01:00
Aaron Patterson
4395d493c5 sort lists before comparing them 2010-11-22 15:51:29 -08:00
Neeraj Singh
21fd93cedd make test more resilient to future changes by not
testing the count and not testing the internal value
of the registered mime type.

Ideally all mime type registration should be cleaned up
in teardown.

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:15 +01:00
Neeraj Singh
23ea19e20d rename star star to just one star
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:14 +01:00
Neeraj Singh
c9147ebfa0 cleanup Mime::LOOKUP after registering image/gif
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:14 +01:00