Neeraj Singh
0027b65421
Ensure that while caching a page rails takes into
...
account the resolved mime type for the request
[#6110 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-09 16:14:57 +01:00
Emilio Tagua
3abd0593a6
Initialize ivars in tests.
2010-09-28 17:32:18 -03:00
Emilio Tagua
2d274a5208
Use parentheses when using assert_match followed by a regexp to avoid warnings.
2010-09-27 11:19:19 -03:00
Aaron Patterson
2d65ff5af7
removing some warnings
2010-09-18 14:14:46 -07:00
Piotr Sarnacki
b3eb26a161
Removed deprecated RouteSet API, still many tests fail
2010-09-05 13:44:36 +02:00
David Heinemeier Hansson
585f8f27b1
Fixed double output from cache in no caching mode
2010-06-08 14:47:02 -04:00
Neeraj Singh
d793d30776
ActionCachingTestController rescues from all exceptions. Making sure that all the tests check for valid response. [ #4468 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-29 12:48:34 +02:00
Santiago Pastorino and Carl Lerche
0ea434e2f4
Make perform_caching work again, with the tests passing and backward compatible
2010-04-15 18:25:08 -03:00
Joshua Peek
cdf8c35ffd
Consistent routing language
2010-03-30 14:05:42 -05:00
wycats
e1c030edd8
Fixed a bunch of tests that failed in 1.9 because they assumed that a Rack response was a String.
2010-03-19 18:46:29 -07:00
Carlhuda
71c9337f45
All tests pass without memoizing view_context
2010-03-18 15:52:43 -07:00
Carlhuda
c61ed70b00
Some more tweaks on <% %>.
...
* The cache helper is now semantically "mark this region for caching"
* As a result, <% x = cache do %> no longer works
2010-03-16 11:43:04 -07:00
Jeremy Kemper
b65b989725
Break a window :/
2010-03-15 23:49:35 -07:00
Carlhuda
9de83050d3
Add deprecation notices for <% %>.
...
* The approach is to compile <% %> into a method call that checks whether
the value returned from a block is a String. If it is, it concats to the buffer and
prints a deprecation warning.
* <%= %> uses exactly the same logic to compile the template, which first checks
to see whether it's compiling a block.
* This should have no impact on other uses of block in templates. For instance, in
<% [1,2,3].each do |i| %><%= i %><% end %>, the call to each returns an Array,
not a String, so the result is not concatenated
* In two cases (#capture and #cache), a String can be returned that should *never*
be concatenated. We have temporarily created a String subclass called NonConcattingString
which behaves (and is serialized) identically to String, but is not concatenated
by the code that handles deprecated <% %> block helpers. Once we remove support
for <% %> block helpers, we can remove NonConcattingString.
2010-03-15 14:50:43 -07:00
Jeremy Kemper
16572fd46e
read_ and write_fragment cache preserve html safety yet cache strings only
2010-03-14 19:09:32 -07:00
Joshua Peek
dcd110c724
skip_relative_url_root url_for option is dead
2010-03-09 21:25:09 -06:00
Joshua Peek
4d2470f7da
RouteSet#rewrite => url_for
2010-03-09 21:00:24 -06:00
Joshua Peek
7db80f87e9
Move AC::UrlRewriter onto route set
2010-03-09 20:50:35 -06:00
wycats
de79525d04
Get rid of the instance-level URL rewriter
2010-03-09 10:20:56 -08:00
Carlhuda
ff29606c06
Refactor cache_store to use ActionController config
2010-03-04 16:50:57 -08:00
Carl Lerche
18bcce596e
ActionController::Base.use_accept_header is not actually used anymore, so let's deprecate it.
2010-03-03 21:24:00 -08:00
Carl Lerche
eb49bd6949
Fix tests for the request refactor
2010-03-03 21:24:00 -08:00
Carlhuda
050831803a
If IntegrationSession is initialized with an objects that responds to #routes, automatically extend the URL helpers from the RouteSet onto it
2010-02-26 17:18:45 -08:00
Carlhuda
98f77e0827
Rename named_url_helpers to url_helpers and url_helpers to url_for
2010-02-26 15:04:50 -08:00
Carlhuda
f863045c45
Rename metaclass to singleton_class
2010-02-25 17:56:58 -08:00
Carlhuda
a278f23310
Fix all of AP's tests with the non global router
2010-02-25 17:53:01 -08:00
Yehuda Katz
4cbb9db0a5
For performance reasons, you can no longer call html_safe! on Strings. Instead, all Strings are always not html_safe?. Instead, you can get a SafeBuffer from a String by calling #html_safe, which will SafeBuffer.new(self).
...
* Additionally, instead of doing concat("</form>".html_safe), you can do
safe_concat("</form>"), which will skip both the flag set, and the flag
check.
* For the first pass, I converted virtually all #html_safe!s to #html_safe,
and the tests pass. A further optimization would be to try to use
#safe_concat as much as possible, reducing the performance impact if
we know up front that a String is safe.
2010-01-31 19:39:13 -08:00
José Valim
da5978c223
Add subscriber for ActionPack and move all logging inside it.
2010-01-13 01:19:23 +01:00
José Valim
f2d276fefd
Ensure no notification is on the queue before running notifications related tests.
2010-01-03 23:39:09 +01:00
José Valim
6fbe9ef2ff
Use namespaces in notifications.
2010-01-03 20:39:42 +01:00
José Valim
75ba102a80
Remove ActionView inline logging to ActiveSupport::Notifications and create ActionController::Base#log_event, so everything can be logged within one listener. Also expose log_process_action as a hook for different modules to include their own information during the action processing. This allow ActiveRecord to hook and any other ORM. Finally, this commit changes 'Processing' and 'Rendering' in logs to 'Processed' and 'Rendered' because at the point it's logged, everying already happened.
2009-12-26 20:28:53 +01:00
Joshua Peek
9fbde11b8b
More test porting
2009-12-08 17:41:00 -06:00
Jeremy Kemper
0c4990b5f4
Fix caching test to ensure notifications are all delivered
2009-12-01 12:19:42 -08:00
Jeremy Kemper
4f2a04cc08
Notifications: extract central Notifier, cordon off the internal Fanout implementation, and segregate instrumentation concerns
2009-11-28 12:50:09 -08:00
Yehuda Katz
51c24ae3e3
Caching refactoring
2009-10-29 00:44:12 -04:00
José Valim
2d7abe245e
Renamed Orchestra to Notifications once again [ #3321 state:resolved]
2009-10-15 18:51:51 -03:00
José Valim
8f59d7a8d8
Instrument cache store events only if required.
2009-10-15 18:19:24 -03:00
José Valim
af0d1fa892
Update Orchestra instrumentations and move part of logging to Orchestra.
2009-10-15 18:18:44 -03:00
José Valim
8b340ab2f6
Revert "Rename Orchestra to Notifications [ #3321 state:resolved]"
...
This reverts commit 8cbf825425dc8ad3770881ea4e100b9023c69ce2.
2009-10-15 18:06:15 -03:00
Jeremy Kemper
c09a5ffea7
Merge branch 'arel'
2009-10-14 19:32:09 -07:00
Jeremy Kemper
6eee1dd62c
Clarify AR dependency
2009-10-14 19:31:29 -07:00
Joshua Peek
8cbf825425
Rename Orchestra to Notifications [ #3321 state:resolved]
2009-10-14 19:50:36 -05:00
Joshua Peek
86ed58d912
Use with_routing helper in tests instead of modifying global route set
2009-10-03 23:31:38 -05:00
José Valim
2407479603
Fixes Sam Ruby tests suite.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com>
2009-09-21 17:56:24 -07:00
José Valim
7cc1c2e71d
Add Orchestra instrumentation to fragment and page caching.
2009-09-20 10:56:38 -03:00
Joshua Peek
5bc47a93b7
Make sure caching test is using a generatable url
2009-09-19 11:56:11 -05:00
Joshua Peek
24ad9ae3d2
Cleanup route reloading in tests. Prefer with_routing over using ActionController::Routing::Routes directly
2009-08-16 21:14:26 -05:00
Yehuda Katz
4bf516e072
More perf work:
...
* Move #set_cookie and #delete_cookie inline to optimize. These optimizations should
almost certainly be sent back upstream to Rack. The optimization involves using
an ivar for cookies instead of indexing into the headers each time.
* Was able to use a bare Hash for headers now that cookies have their own joining
semantics (some code assumed that the raw cookies were an Array).
* Cache blankness of body on body=
* Improve expand_cache_key for Arrays of a single element (common in our case)
* Use a simple layout condition check unless conditions are used
* Cache visible actions
* Lazily load the UrlRewriter
* Make etag an ivar that is set on prepare!
2009-08-11 15:03:53 -07:00
Joshua Peek
734e903af5
Deprecate router generation "best match" sorting
2009-08-09 22:53:16 -05:00
Yehuda Katz
efcfce50c4
Fixes "Cached fragment hit" written to log even if fragment is not cached (Erik Andrejko) [ #2917 state:resolved]
2009-08-08 12:46:44 -03:00