Commit Graph

6375 Commits

Author SHA1 Message Date
Aaron Patterson
4395d493c5 sort lists before comparing them 2010-11-22 15:51:29 -08:00
Sven Fuchs
5c86286dd6 add respond_to? to ActionDispatch::Integration::Runner
since Runner uses method_missing to delegate to the integration session it also should define respond_to? accordingly
2010-11-22 15:42:28 -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
794b34306e remove select, collect and then inject with
something better

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:15 +01:00
Neeraj Singh
c5bfc6abe4 string include method is 10x faster than creating
a new regex object every single time

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:14 +01:00
Neeraj Singh
8154f4b816 Compile regex only once
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:14 +01:00
Neeraj Singh
cdbbf6fd6b move the mime registration code to setup so that
it could be cleaned up on teardown.

Currently the test code
test/controller/mime_responds_test.rb impacts
test/dispatch/mime_type_test.rb.

dispatch/mime_type_test.rb runs independently fine
but when run as part of rake breaks because of
new mime types registered in
controller/mime_responds_test.rb

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:14 +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
6f6e754bac implement code that handles text/*, appplication/*,
and image/*

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:13 +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
Neeraj Singh
d04a21b362 declare regex as a constant
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:13 +01:00
Neeraj Singh
cbb2651cc0 add the fixture file
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:13 +01:00
Neeraj Singh
eb6ccc9953 do not assume that there is no space between
leading */* and comma

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:12 +01:00
Neeraj Singh
f5fba917f8 failing test for #6022
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:12 +01:00
Neeraj Singh
61950a4b05 current code ignores http header "Accept" if it
has ....,*/* .

It is possible to a device to send
request such that */* appear at the beginning of the
"Accept" header. This patch ensures that "Accept" header
is ignored for such cases too.

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 23:06:12 +01:00
Santiago Pastorino
c937ddb5ce Remove unused constant 2010-11-22 19:00:05 -02:00
Santiago Pastorino
6e559168dc There's no need for ternary op here 2010-11-22 18:47:47 -02:00
Santiago Pastorino
559c4292bc Remove unneeded metaprogramming and method generation in favor of direct definition 2010-11-22 16:02:13 -02:00
Xavier Noria
799a6fa047 realigns a series of hash arrows 2010-11-21 10:25:23 +01:00
Neeraj Singh
7d5b097357 use_accept_header is no longer supported 2010-11-21 03:29:44 +01:00
Prem Sichanugrist
e65c23dc3e Mention the case that render will return nil if given :collection is nil or empty when rendering partial. 2010-11-21 03:29:44 +01:00
José Valim
d5779efaf2 Ensure calling reset session twice does not raise errors. 2010-11-20 21:56:08 +01:00
Josh Kalderimis
d7db6a8873 class inheritable attributes is used no more! all internal use of class inheritable has been changed to class_attribute. class inheritable attributes has been deprecated.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-20 19:40:29 +01:00
Santiago Pastorino
4f3b5b8ec1 Fix indentation 2010-11-20 02:46:55 -02:00
Santiago Pastorino
d3f8765482 Avoid range object creation 2010-11-20 02:29:57 -02:00
Aaron Patterson
938243feb9 do not require ruby-debug automatically. please require it if you have declared it as a dependency 2010-11-19 16:26:09 -08:00
Henning Koch
deff528947 Fix AssetIncludeTag ensuring that files are in the wrong directory [#6015 state:resolved]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-11-19 15:38:13 -02:00
Santiago Pastorino
bb7b705b0c Fix indentation 2010-11-19 14:26:44 -02:00
Santiago Pastorino
555b7cd04a Don't merge just directly add to the action to the :partial key 2010-11-19 14:26:42 -02:00
Santiago Pastorino
b1ffd65b8f Useless assignation 2010-11-19 14:26:39 -02:00
Santiago Pastorino
52b71c01fd Revert "Quick fix for not escaping []s (not ideal)"
According to http://www.ietf.org/rfc/rfc2616.txt and
http://tools.ietf.org/rfc/rfc3986.txt [ and ] are reserved characters
and should be escaped using "%" HEX HEX

This reverts commit 856d2fd874d72dd9f83204affff4edfef3308361 and
1ee9b40b18a0bed5bb10a0785f7e2730bac983f6..
2010-11-18 23:31:00 -02:00
José Valim
e3d8331c5b Revert "Remove deprecated form_for with strings or symbols"
This code was not deprecated. What was deprecated is the following:

  form_for(:foo, @foo)

Which now should be rewritten as:

  form_for(@foo, :as => :foo)

The following format is valid:

  form_for(:foo)

This reverts commit be797750e6ce866ea08307f63bf35304a965c8d4.
2010-11-18 20:22:14 +01:00
Leonardo Capillera
be797750e6 Remove deprecated form_for with strings or symbols
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-11-18 16:46:55 -02:00
Aaron Patterson
c52e2cf4b3 delegating path and open to internal tempfile 2010-11-18 10:10:25 -08:00
Piotr Sarnacki
ae56c82e2b Added config.action_controller.include_all_helpers to CHANGELOG.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-18 00:29:23 +01:00
Piotr Sarnacki
250fb3f6c2 Add config.action_controller.include_all_helpers, by default it is set to true.
In older rails versions there was a way to use only helpers from
helper file corresponding to current controller and you could also
include all helpers by saying 'helper :all' in controller. This config
allows to return to older behavior by setting it to false.
2010-11-18 00:20:57 +01:00
José Valim
f14c2bf582 Pass the view object as parameter to the handler. Useful if you need to access the lookup context or other information when compiling the template. 2010-11-17 23:50:45 +01:00
Neeraj Singh
fe2f168d40 fix warning during test execution
[#5997 state:resolved]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-11-17 20:19:07 -02:00
Santiago Pastorino
884e3506d2 Bump builder to 3.0.0 2010-11-17 19:35:58 -02:00
Carl Lerche
401c1835af Anchors should be allowed on constraints that are not on path segments 2010-11-16 21:46:15 -08:00
Carl Lerche
ccd2f3ede5 Update the version.rb files to include a PRE part 2010-11-16 17:19:46 -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
Josh Kalderimis
2bed4d94e6 changed asset_timestamps_cache to asset_ids_cache, added an rdoc comment to the new public api, and updated the railtie 2010-11-16 00:04:37 +01:00
Josh Kalderimis
ce1f87673c corrected the AV railtie to use the new home for cache_asset_timestamps, and merged asset id caching and asset paths together. 2010-11-16 00:04:37 +01:00
Josh Kalderimis
0ff1c5935f reorganised the the common asset helpers module into a class and have it include the id caching module, this class is now shared from the view instance to the asset include tag helpers (js and css) 2010-11-16 00:04:37 +01:00
Josh Kalderimis
6a609dbc82 incorporated most of the feedback from José 2010-11-16 00:04:37 +01:00
Josh Kalderimis
6747ae2708 reduced duplication between the javascript and stylesheet asset tag methods, also split the asset id caching methods into a separate module for easy inclusion and use by the asset include tag class and base asset tag helpers 2010-11-16 00:04:36 +01:00
Josh Kalderimis
7a38c8b9f5 removed an assert from a test as it was testing a private method 2010-11-16 00:04:36 +01:00