Commit Graph

2162 Commits

Author SHA1 Message Date
Joshua Peek
48c81f52d4 Remove dead old base abstract unit 2009-09-13 15:34:17 -05:00
Joshua Peek
25f4129151 Need to declare optional dependencies from AS 2009-09-13 12:58:49 -05:00
Joshua Peek
a9f5f4bb45 Don't force test suite to use bundler 2009-09-13 12:42:13 -05:00
Michael Koziarski
81cba78e9e Merge commit 'alloy/master-nested_attributes_and_autosave' 2009-09-13 10:32:24 +12:00
Yehuda Katz
ddb4600ce6 Get ActionPack's test running on bundled gems. This should make running tests on new machines, as well as CI, work well. 2009-09-12 15:22:11 -05:00
Yehuda Katz
7152a4e9a6 Add per-controller middleware 2009-09-12 13:51:15 -05:00
Andrew France
1b78e9bba3 Allow fields_for on a nested_attributes association to accept an explicit collection to be used. [#2648 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
2009-09-12 15:50:05 +02:00
Nathaniel Talbott
f024aabee3 Fix filtering parameters when there are Fixnum or other un-dupable values.
[#3184 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-09-10 18:53:50 -07:00
Joshua Peek
1a0f822037 Use draw/connect mapper api instead of directly using add_named_route 2009-09-06 23:21:04 -05:00
Joshua Peek
314e18aba2 Need to reset session for AR session tests after altering the route set 2009-09-06 23:09:47 -05:00
Joshua Peek
2ae84e04aa Add fake controllers for url rewriter tests 2009-09-06 23:02:55 -05:00
Joshua Peek
c531bd6665 Cleanup hacky routing with controller_path in url helper tests. This doesn't work in real life anyway. 2009-09-06 22:29:29 -05:00
Joshua Peek
ab8aac09d6 Need to reset session in internal integration tests after altering the route set 2009-09-06 22:01:58 -05:00
Joshua Peek
9f47f8d892 Fix isolated running of AddressesTest 2009-09-06 21:42:05 -05:00
Joshua Peek
1c02fc295d Fix isolated running of ActionPackAssertionTest 2009-09-06 21:19:29 -05:00
Joshua Peek
c3accd7ded Fix failing isolated routing test 2009-09-05 19:39:33 -05:00
Yehuda Katz + Carl Lerche
487ee41d2f Test for previous commit (we wrote it first, I swear) 2009-09-03 12:58:43 -07:00
Yehuda Katz + Carl Lerche
e3744166ec Refactor ActionController to use find_template and template_exists? 2009-09-03 12:52:53 -07:00
Sam Pohlenz
4b6321efa9 Don't raise exceptions for missing javascript_include_tag or stylesheet_link_tag sources unless the :cache or :concat options are given. [#2738 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-09-03 14:01:01 -05:00
Yehuda Katz + Carl Lerche
f61dc0ef65 Remove a useless method in the fixture template class 2009-09-03 11:40:03 -07:00
Yehuda Katz + Carl Lerche
f3fc5c4b5f Refactor ActionView::Resolver 2009-09-03 11:18:57 -07:00
Jay Pignata
e0f1a7dc19 If session_options[:id] is requested when using CookieStore, unmarshal the session to access it [#2268 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-09-03 11:50:01 -05:00
Yehuda Katz + Carl Lerche
66a4585f88 Fix the */* with Net::HTTP bug [#3100 state:resolved] 2009-09-01 15:54:29 -07:00
Joshua Peek
c5f6e038da ActionPack test helpers need to activate rack gem 2009-09-01 10:27:19 -05:00
Bryan Helmkamp
a5588ffc08 Activate rack-test gem before it's required. This shouldn't be necessary, but should fix the build for now 2009-08-31 23:17:43 -07:00
Joshua Peek
a79790e1a5 rack-test 0.4.2 has rack 1.1.pre goodies, we'll use it instead 2009-08-31 23:08:20 -05:00
José Valim
3f78de67b5 Ensure that blocks are also handled inside the responder. 2009-08-29 18:21:19 +02:00
Joshua Peek
ba5995dcd9 Reset session in integration tests after changing routes to reload the middleware stack 2009-08-27 12:43:26 -05:00
Jeffrey Hardy
05b529ca57 UrlRewriter#rewrite_url should call #to_param on the value given in :anchor option, just as #url_for does
[#2746 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-26 14:11:26 -07:00
Akira Matsuda
cc9af20da7 I18n: use I18n for select helpers' prompt text
[#2252 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-26 13:55:57 -07:00
Jeremy Kemper
a7ca5595a2 Revert "I18n: use I18n for select helpers' prompt text"
Broke CI.

[#2252 state:open]

This reverts commit adedf72821a5623227ce91e6b298838e692477e4.
2009-08-26 12:12:40 -07:00
Akira Matsuda
adedf72821 I18n: use I18n for select helpers' prompt text
[#2252 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-26 11:29:16 -07:00
Yehuda Katz
9408fcd2e8 Create new ActionController::Middleware class that will work as a normal Rack middleware.
* This initial implementation is a bit hackish, but it uses a normal middleware API
    so it's future-proof when we improve the internals.
2009-08-26 00:18:52 -07:00
Joshua Peek
78129b1731 Track all AC base subclasses as possible controllers for internal testing 2009-08-25 23:34:48 -05:00
Yehuda Katz + Carl Lerche
c7ba911a43 ActionController::Metal can be a middleware 2009-08-25 12:14:31 -07:00
Joshua Peek
b58acea569 Move legacy param_parsers config onto AD::ParamsParser 2009-08-21 16:49:33 -05:00
Joshua Peek
ff1b0d3c86 k, thats really slow, lets not 2009-08-16 21:21:39 -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
d6d550f0cb Missing fixture template -- fixes AP tests 2009-08-15 20:33:34 -07:00
Jay Pignata
679128da58 Adding a call to logger from params_parser to give detailed debug information when invalid xml or json is posted
[#2481 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-15 16:51:03 -07:00
Joshua Peek
911acc10de Axe "best fit" generation support 2009-08-15 18:08:46 -05:00
Yehuda Katz
1310231c15 Got tests to pass with some more changes.
* request.formats is much simpler now
    * For XHRs or Accept headers with a single item, we use the Accept header
    * For other requests, we use params[:format] or fallback to HTML
    * This is primarily to work around the fact that browsers provide completely
      broken Accept headers, so we have to whitelist the few cases we can
      specifically isolate and treat other requests as coming from the browser
    * For APIs, we can support single-item Accept headers, which disambiguates
      from the browsers
  * Requests to an action that only has an XML template from the browser will
    no longer find the template. This worked previously because most browsers
    provide a catch-all */*, but this was mostly accidental behavior. If you
    want to serve XML, either use the :xml format in links, or explicitly
    specify the XML template: render "template.xml".
2009-08-15 12:32:02 -07:00
Yehuda Katz
9f5cd0156a More cleanup of ActionView and reduction in need for blocks in some cases:
* only one of partial_name or :as will be available as a local
  * `object` is removed
  * Simplify _layout_for in most cases.
    * Remove <% render :partial do |args| %>
    * <% render :partial do %> still works fine
2009-08-15 12:32:01 -07:00
Yehuda Katz
27adcd1c1a Clean up ActionView some:
* Call _evaluate_assigns_and_ivars at the two entry points so we don't have to
    do a check at every render.
  * Make template.render viable without having to go through a wrapper method
  * Remove old TemplateHandler#render(template, local_assigns) path so we don't have
    to set self.template every time we render a template.
  * Move Template rescuing code to Template#render so it gets caught every time.
  * Pull in some tests from Pratik that test render @object in ActionView
2009-08-15 12:32:01 -07:00
Joshua Peek
940a391c9b Attempt to rewrite most of the highly coupled router segments tests 2009-08-14 16:16:29 -05:00
Joshua Peek
f86a4b84dd Kill routing timed tests 2009-08-14 14:30:19 -05:00
Joshua Peek
7a26c21d8e Use safe tmp dir 2009-08-13 21:03:25 -05:00
José Valim
8692b11e81 Merge branch 'master' of git://github.com/rails/rails 2009-08-13 10:27:53 +02:00
José Valim
4f9047ecc8 Ensure collections are not treated as nested resources. 2009-08-13 10:27:41 +02: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