Commit Graph

319 Commits

Author SHA1 Message Date
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
Neeraj Singh
4154c659fe fix test
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:14 +01:00
Neeraj Singh
b798a59bd5 test for text/*, application/* and image/*
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:13 +01:00
Aaron Patterson
c52e2cf4b3 delegating path and open to internal tempfile 2010-11-18 10:10:25 -08:00
Josh Kalderimis
e1e780a31d Brought the domain method in AD http url inline with subdomain where @@tld_length is used by default. Also set the default value of @@tld_length to 1. 2010-11-16 18:57:51 +08:00
David Trasbo
990f52ebd7 Make cookies hash in ActionDispatch::TestProcess indifferent access [#5761 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-11-07 14:48:51 -02:00
Andrew White
d446392f76 Add additional HTTP request methods from the following RFCs:
* Hypertext Transfer Protocol -- HTTP/1.1
  http://www.ietf.org/rfc/rfc2616.txt)

* HTTP Extensions for Distributed Authoring -- WEBDAV
  http://www.ietf.org/rfc/rfc2518.txt

* Versioning Extensions to WebDAV
  http://www.ietf.org/rfc/rfc3253.txt

* Ordered Collections Protocol (WebDAV)
  http://www.ietf.org/rfc/rfc3648.txt

* Web Distributed Authoring and Versioning (WebDAV) Access Control Protocol
  http://www.ietf.org/rfc/rfc3744.txt

* Web Distributed Authoring and Versioning (WebDAV) SEARCH
  http://www.ietf.org/rfc/rfc5323.txt

* PATCH Method for HTTP
  http://www.ietf.org/rfc/rfc5789.txt

[#2809 state:resolved] [#5895 state:resolved]
2010-11-02 10:56:14 +00:00
Andrew White
2d5a12a50b Don't write out secure cookies unless the request is secure 2010-10-25 16:36:35 +01:00
Krekoten' Marjan
a75d21df06 Fix status initialization when custom status provided
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-10-18 17:34:22 -02:00
Les Hill and Sandro Turriate
dde54f00c6 Show exceptions rescues the original exception
[#5784 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-10-12 00:56:07 +02:00
Miles Egan
3eff729079 make sure request parameters are accessible after rack throws an exception parsing the query string [#3030 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-10-12 00:56:07 +02:00
Aaron Patterson
1217339616 only forwarding enough methods to work. People should grab the delegate tempfile if they really need to do hard work 2010-10-04 19:28:40 -07:00
Aaron Patterson
3370ad0b1e making sure respond_to? works properly 2010-10-04 17:11:50 -07:00
Aaron Patterson
8a97470210 raising an argument error if tempfile is not provided 2010-10-04 17:08:25 -07:00
Aaron Patterson
876acf001a if it walks like a duck and talks like a duck, it must be a duck 2010-10-04 16:57:11 -07:00
Aaron Patterson
2a3022db7f delegate to the @tempfile instance variable 2010-10-04 16:56:45 -07:00
Aaron Patterson
f9734f2b0f adding tests for uploaded file 2010-10-04 16:30:16 -07:00
José Valim
0b51f3cc73 Ensure the proper content type is returned for static files. 2010-10-04 18:06:04 +02:00
José Valim
74dd8a3681 Move ETag and ConditionalGet logic from AD::Response to the middleware stack. 2010-10-03 21:25:22 +02:00
José Valim
50215f9525 Rely on Rack::Session stores API for more compatibility across the Ruby world. 2010-10-03 21:24:22 +02:00
Aaron Patterson
ffbcb84c21 removing more duplicate code 2010-10-01 18:05:59 -07:00
Piotr Sarnacki
22b11a41cc Allow mounting engines at '/'
Without that commit script_name always become '/', which
results in paths like //posts/1 instead of /posts/1
2010-09-30 09:47:05 +02:00
José Valim
f63d35fba5 Ensure that named routes do not overwrite previously defined routes. 2010-09-29 14:24:32 +02:00
Emilio Tagua
783e9b8de5 Change test to avoid warnings. 2010-09-28 18:38:25 -03:00
Emilio Tagua
dc37bd778a Initialize @trusted_proxies. 2010-09-28 16:25:06 -03:00
Emilio Tagua
7129dd95d0 undef method if already defined. 2010-09-28 16:08:00 -03:00
Emilio Tagua
dda3431942 Remove useless use of :: in void context. 2010-09-28 16:02:31 -03:00
Emilio Tagua
1ab2ab07b5 Remove more warnings shadowing outer local variable.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-09-27 16:43:17 -03:00
Emilio Tagua
583ddf22a2 Remove more warnings shadowing outer local variable. 2010-09-27 11:19:22 -03:00
Emilio Tagua
0cb1d87cd5 Remove duplicated test. 2010-09-27 11:19:22 -03:00