Commit Graph

10703 Commits

Author SHA1 Message Date
José Valim
3f78de67b5 Ensure that blocks are also handled inside the responder. 2009-08-29 18:21:19 +02:00
José Valim
684a6b3c71 Attempt to render the template inside the responder, so it can be used for caching and pagination.
Signed-off-by: Yehuda Katz <wycats@gmail.com>
2009-08-29 11:01:00 -05:00
Yehuda Katz
dbf20c2dbb Initial AMo Lint implementation 2009-08-29 01:49:18 -05:00
Yehuda Katz
353157ccd9 Make rake install work 2009-08-28 18:05:02 -05:00
Jeremy Kemper
f6ca7e4e75 Prefer utf8_unicode_ci (better) over utf8_general_ci (faster) 2009-08-27 23:07:43 -07:00
Jeffrey Hardy
c10396b142 When running multiple test tasks, don't abort early if one produces failures
[#3107 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-27 11:20:51 -07: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
Yehuda Katz
f3ed0de340 Create an install task that successfully installs all Rails gems 2009-08-27 05:00:57 -05:00
Yehuda Katz
bb91beabbd Remove some old cruft 2009-08-27 05:00:57 -05:00
Carl Lerche
6a001e925e Require necessary active_support files in cookie store 2009-08-26 23:07:55 -07:00
Carl Lerche
4467fa7d24 Fixed stupid mistake... nothing to see here. 2009-08-26 20:51:54 -07:00
Carl Lerche
78ced08338 Add a default parameter for Resolver#initialize 2009-08-26 19:52:18 -07:00
Carl Lerche
2890760665 Set the request and response in ActionController::Middleware 2009-08-26 19:52:18 -07:00
Carl Lerche
efbd535f36 Have AbstractController::Logger#process_action return super's value 2009-08-26 19:52:17 -07:00
Jeffrey Hardy
8c05ca96f8 Don't use AR::Base.connection for fixture column quoting. Use the connection given to Fixtures.new
[#3104 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-26 14:53:09 -07:00
Jeffrey Hardy
0821941598 Eliminate warnings from Regexp multiline extension tests
[#3103 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-26 14:47:29 -07:00
Jeffrey Hardy
66d8063c91 Correct Regexp#un/optionalize assertions and fix uncovered failures
[#3102 state:incomplete]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-26 14:46:38 -07: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
Sven Fuchs
d672a14ee7 allow ActiveRecord#RecordInvalid exception message to be localized
[#2754 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-26 11:29:16 -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
5bc66f160d And the same thing for Basic 2009-08-25 17:34:07 -07:00
Yehuda Katz + Carl Lerche
3a5269eba4 HTTP Auth should not depend on RenderingController 2009-08-25 17:29:48 -07:00
Yehuda Katz + Carl Lerche
303f9b8841 Redirector had an undeclared dependency on Logger. 2009-08-25 17:20:58 -07:00
Yehuda Katz + Carl Lerche
a21aaca8ea Rework Middleware stack to match the Rack middleware protocol more closely 2009-08-25 17:04:09 -07:00
Yehuda Katz + Carl Lerche
469424c85e Modify Digest and Basic to take a request so they can be used outside of the controller 2009-08-25 16:02:26 -07:00
Yehuda Katz + Carl Lerche
86c7b144fa Add a TODO so we remember to fix partial layouts 2009-08-25 16:02:26 -07:00
Jeremy Kemper
c3a0a36fc3 Fix typo 2009-08-25 13:41:48 -07:00
Yehuda Katz + Carl Lerche
c7ba911a43 ActionController::Metal can be a middleware 2009-08-25 12:14:31 -07:00
Emilio Tagua
09fde6440a timestamps gives a created_at field not created_on.
[#3093 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-24 16:17:08 -07:00
Jeremy Kemper
e93d0a50c0 Ruby 1.9: fix Time#beginning_of_day inaccuracy due to subtracting a Float 2009-08-22 15:53:19 -07:00
Joshua Peek
b58acea569 Move legacy param_parsers config onto AD::ParamsParser 2009-08-21 16:49:33 -05:00
taryn
ce61a6bd55 Added first/last/all aliases for equivalent find scopes
Just a copy from Active Record (with tests). Each is a warpper function for
the equivalent scoped call to find eg first is a wrapper for find(:first)

Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-08-21 14:49:59 -05:00
Jeremy Kemper
8bc3a14727 Benchmark script via miloops' arel fork via DataMapper's AR comparison script 2009-08-20 21:09:59 -07:00
taryn
328ba3b333 Added save! which raises ResourceInvalid unless valid?
Similar to Active Record - it will raise ActiveResouce::ResourceInvalid if
the resource is not valid (ie if <tt>valid?</tt> returns false)

However - does not raise ActiveResource::ResourceNotFound if the callbacks
fail (callbacks have not yet been implemented) - it will just try to save
and raise if the callbacks all fail.

This is not ideal behaviour - but will do until we decide to change the
behaviour of save_with_validations to actually raise (rather than catch) the
ResourceInvalid exception.

Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-08-19 09:05:02 -05:00
taryn
4dc05bc8a9 Swallow ResourceNotFound error on find_every
Active Record does not explode with RecordNotFound if you go looking for a
collection of objects - it just returns nil. Thus Active Resource should
also not explode.

After all - finding no objects that match a set of conditions is not
exceptional behaviour - unlike looking for a specific object with a given id
(which you'd expect to exist).

I've also added documentation to +find+ to reflect this.

Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-08-19 09:04:48 -05:00
taryn
079ed8fc43 Pulled find-based tests into their own test case. This matches Active Record, and allows us to have one places where all find-tests are located, which will help when adding dynamic finders later.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-08-19 09:04:14 -05:00
taryn
36bf587347 Moved all test cases into a new test/cases directory to match Active Record test directory structure.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-08-19 09:03:57 -05:00
taryn
c2f90d6530 Added validations to ActiveResource. Added a smoke test to see if we can add a validation and use it, and add a validates callback and use it.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-08-19 09:03:17 -05:00
Mike Gunderloy
ef93524058 Remove sqlite2 build from CI recipe [#3066 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-18 13:24:39 +01:00
Pratik Naik
25e5b0c4a8 Remove support for SQLite 2.
If you're still using it, please install the plugin from git://github.com/rails/sqlite2_adapter.git
2009-08-17 14:54:34 +01: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
ccf28d2499 Fixes ActionMailer regression [#3059 state:resolved] 2009-08-15 20:38:50 -07:00
Yehuda Katz
d6d550f0cb Missing fixture template -- fixes AP tests 2009-08-15 20:33:34 -07:00
Jay Pignata
7213da37ce Fix test_has_many_through_polymorphic_has_one on sqlite2 [#3054 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-15 19:14:32 -07:00
Jay Pignata
cb3e669b0d Fix calculation tests on sqlite2 [#3053 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-15 19:14:11 -07:00