Commit Graph

1196 Commits

Author SHA1 Message Date
Pratik Naik
a1a9889b06 Move basic auth test controller inside the test class 2009-01-29 01:59:55 +00:00
Nathan de Vries
32eeb3e521 Ensure that when UrlWriter is included in multiple classes, the default_url_options of one don't affect the other. [#1277 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-01-28 19:31:48 +00:00
Pratik Naik
2ae8d3079b Session cookie header should always be set if :expire_after option is specified 2009-01-28 05:05:48 +00:00
Joshua Peek
319ae4628f Move HTTP libs and middleware into ActionDispatch component 2009-01-27 18:54:01 -06:00
Joshua Peek
a0f2b1d95d Reorganize ActionController folder structure 2009-01-27 18:17:39 -06:00
Joshua Peek
093f758bd0 Restore implicit rendering for XHR requests that want a HTML template [#1590 state:resolved] 2009-01-27 14:09:11 -06:00
Pratik Naik
57b156b338 Dont use Memoizable for ActionController::Request 2009-01-27 17:26:37 +00:00
Yehuda Katz
eb9af20b7c Begin unifying the interface between ActionController and ActionView 2009-01-22 16:18:10 -06:00
Joshua Peek
a8ad6568f9 Allow empty files to be uploaded 2009-01-20 20:34:35 -06:00
Joshua Peek
7e4d13d357 Add MiddlewareStack#swap
config.middleware.swap ActionController::Session::CookieStore, MySessionStore
2009-01-20 20:19:52 -06:00
Mislav Marohnić
01f06fc7f4 Don't let empty Tempfiles come through as uploaded files [#1785 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-01-20 12:38:25 -06:00
Cody Fauser
c090e5e075 Restore cookie store httponly default to true. Remove extraneous dup of options on initialization [#1784 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-01-20 11:50:43 -06:00
Pratik Naik
68fdfde003 Improve HTTP Basic authentication tests 2009-01-18 19:21:34 +00:00
Joshua Peek
ff0a2678c4 Build query string and POST params parser on top of Rack::Request. Also switch our multipart parser to use Racks. Moved XML, JSON, and YAML parsers into ActionController::ParamsParser middleware [#1661 state:resolved] 2009-01-17 20:29:50 -06:00
Joshua Peek
aab760c3df Add test coverage for fixing Safari 2 trailing null character 2009-01-17 20:03:22 -06:00
Joshua Peek
9775c25824 Update multipart tests to expose (another) bug in Rack's multipart parser 2009-01-13 17:21:45 -06:00
Joshua Peek
1adc1496f9 Add RewindableInput wrapper to fix issues with middleware that impolitely eat up non-rewindable input 2009-01-13 16:09:51 -06:00
Bryan Ash
5a43908c74 Explicitly read as binary in multipart_body for Windows [#1065 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-01-13 14:42:43 -06:00
Pratik Naik
c99ef814b0 Revert "HTTP Digest authentication [#1230 state:resolved]"
This reverts commit 45dee3842d68359a189fe7c0729359bd5a905ea4.

Reasons :

1. The code is not working in it's current state
2. Should not be using exceptions for flow control
2009-01-13 16:13:42 +00:00
Joshua Peek
18cb0493d1 Refactor request urlencoded params parsing tests 2009-01-10 16:02:03 -06:00
Joshua Peek
9fe69b225c Moved query string parsing tests into the request tests folder 2009-01-10 11:39:57 -06:00
Joshua Peek
92dbf5ba83 Refactor request multipart params parsing tests 2009-01-10 11:32:38 -06:00
Joshua Peek
40a75a5091 Refactor request xml params parsing tests 2009-01-09 16:05:27 -06:00
Joshua Peek
38a723e6ea Refactor request json params parsing tests 2009-01-09 15:43:32 -06:00
Joshua Peek
ac4bf1180a Ensure we override Rack::Request's POST method too 2009-01-09 13:12:39 -06:00
Joshua Peek
282c1d6159 Refactor request query string parsing tests 2009-01-09 12:52:59 -06:00
Jeremy Kemper
074414883c Remove Content-Length header from :no_content responses 2009-01-07 15:55:28 -08:00
Jeremy Kemper
c90572e3ab Use instance_eval instead of adding an accessor to the class 2009-01-07 14:49:12 -08:00
Jeremy Kemper
35fa007313 Include process methods in ActionController::TestCase only. No need to alias_method_chain :process either. 2009-01-07 14:49:05 -08:00
Joshua Peek
b7ea4add86 Bump Rack version to 0.9 2009-01-06 15:20:57 -06:00
Joshua Peek
f00e86d7e9 Memoize request accessors on the Rack env so other request objects have access to the same cache [#1668 state:resolved] 2009-01-04 12:15:15 -06:00
Joshua Peek
ed2e776bde Move metal above method piggybacking middleware and add some test coverage 2009-01-03 23:02:29 -06:00
Joshua Peek
f7ee082bb3 Add failing test for file uploads with unrewindable input 2009-01-02 18:46:01 -06:00
Joshua Peek
104898fcb7 Revert to the good old days when AssetTag didn't cause anyone problems 2009-01-02 13:40:23 -06:00
Laszlo Bacsi
606176a55b Fixed call_with_exception for Routing Errors [#1684 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-01-02 10:46:48 -06:00
Jeremy Kemper
2e1132fad8 Test that exceptions raised in filters are properly rescued 2008-12-30 18:06:56 -08:00
Pratik Naik
82443ecfad Merge commit 'fred/pullable' 2008-12-30 17:50:17 +00:00
Joshua Peek
5d89605c11 Make router and controller classes better rack citizens 2008-12-28 15:31:03 -06:00
Joshua Peek
45dee3842d HTTP Digest authentication [#1230 state:resolved] 2008-12-28 15:13:16 -06:00
Pratik Naik
fec0ea9d6d Request#env['SERVER_NAME'] does not contain port number 2008-12-28 17:07:13 +00:00
Mark Reginald James
5138f755ff Fixed incorrect parsing of query parameters with mixed-depth nesting inside an array [#1622 state:resolved]
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com>
2008-12-28 01:15:48 +00:00
Yaroslav Markin
fdaa9ed033 Fix ActionPack build on Windows: we really should not test anything regarding symlinks on Windows.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-12-27 17:33:13 +00:00
Pratik Naik
f4f8923cf0 Merge commit 'fred/pullable' 2008-12-26 21:56:21 +00:00
Frederick Cheung
dce0da77e7 Fix assert_select_rjs not checking id for inserts [#540 state:resolved] 2008-12-26 18:25:32 +00:00
Frederick Cheung
d7b6e48c70 Fix randomly failing cookie store tests
Marshal.dump(Marshal.load(marshaled_hash)) is not guarenteed to be equal to marshaled_hash
because of the lack of ordering of hash
2008-12-26 18:25:03 +00:00
Pratik Naik
80307c8b0a Make ActionController#render(symbol) behave same as ActionController#render(string) [#1435] 2008-12-26 01:12:11 +00:00
Pratik Naik
cd1d6e8768 Make ActionController#render(string) work as a shortcut for render :action => string. [#1435]
Examples:
  # Instead of render(:action => 'other_action')
  render('other_action')

Note : Argument must not have any '/'
2008-12-25 23:05:34 +00:00
Pratik Naik
d67e03871e Make ActionController#render(string) work as a shortcut for render :template => string. [#1435]
Examples:
  # Instead of render(:template => 'controller/action')
  render('controller/action')

Note : Argument must not begin with a '/', but have at least one '/'
2008-12-25 22:26:03 +00:00
Pratik Naik
061952392a Make ActionController#render(string) work as a shortcut for render :file => string. [#1435]
Examples:
  # Instead of render(:file => '/Users/lifo/home.html.erb')
  render('/Users/lifo/home.html.erb')

Note : Filename must begin with a forward slash ('/')
2008-12-25 21:43:07 +00:00
Pratik Naik
04a8b2362d Make render_test.rb run in isolation 2008-12-25 19:28:08 +00:00
Pratik Naik
6e2a771661 Undry ActionController::TestCase#<HTTP_METHODS> for better documentation 2008-12-25 17:54:44 +00:00
Pratik Naik
e898f82a74 Move request parsing related code to ActionController::RequestParser 2008-12-25 03:51:04 +00:00
Joshua Peek
9c1e48eaea ActionController::VerbPiggybacking middleware 2008-12-23 13:36:05 -06:00
Pratik Naik
293bb02f91 Unify ActionController::AbstractRequest and ActionController::Request 2008-12-23 00:30:32 +00:00
Pratik Naik
7e1751111e Rename RackRequest to Request 2008-12-23 00:30:32 +00:00
Pratik Naik
f5b7f0911b Merge commit 'fred/more_pullable' 2008-12-21 19:04:48 +00:00
=?utf-8?q?Adam=20Cig=C3=A1nek?=
fcd58dc27a Allow use of symbols for :type option of ActionController::Streaming#send_file/#send_data [#1232 state:resolved]
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com>
2008-12-21 18:58:55 +00:00
Frederick Cheung
cf9c36834a Fix failing cookie store test 2008-12-21 15:57:09 +00:00
Joshua Peek
3b317b7100 Switch to Rack::Response#set_cookie instead of using CGI::Cookie to build cookie headers 2008-12-20 21:25:47 -06:00
Frederick Cheung
606cd61b9a Fix Mime::Type#=~ not using Regexp.quote
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-12-21 02:24:22 +00:00
Matt Bauer
7b249b67e9 Fix reset_session with lazy cookie stores [#1601 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-12-20 14:37:51 -06:00
Joshua Peek
fda62ecf70 Rename AbstractResponse to Response and inheirt from Rack::Response 2008-12-19 17:15:22 -06:00
Joshua Peek
a14bbd7a85 Process CGI 'cookie' header into 'Set-Cookie' for all responses.
This mostly affects response.headers['cookie'] for test requests. Use response.cookies instead.
2008-12-19 16:49:06 -06:00
Joshua Peek
cbee72d216 Improve cookie test coverage 2008-12-19 16:35:23 -06:00
Joshua Peek
3da1b94d07 Use status response accessor instead of the 'Status' header 2008-12-19 15:05:51 -06:00
Joshua Peek
a9fde9a2ab Cleanup dispatch path 2008-12-18 13:14:09 -06:00
Joshua Peek
2eb2ec9e63 Move gaint lock into middleware 2008-12-18 12:00:54 -06:00
Lourens Naude
3ff6b00ee3 Persistent session identifier support for CookieSessionStore and API compat. with the server side stores [#1591 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-12-18 11:33:53 -06:00
Joshua Peek
175cb7a963 Fix metal tests 2008-12-17 10:10:24 -06:00
Jesse Newland
97a178bfa4 Decorate responses from Rack Middleware and Rails Metal for the purposes of integration testing. A test for the following Metal:
class Poller < Rails::Rack::Metal
      def call(env)
        if env["PATH_INFO"] =~ /^\/poller/
          [200, {"Content-Type" => "text/plain"}, "Hello World!"]
        else
          super
        end
      end
    end

might be tested like so:

  class PollerTest < ActionController::IntegrationTest
    test "poller returns hello world" do
      get "/poller"
      assert_response 200
      assert_response :success
      assert_response :ok
      assert_equal "Hello World!", response.body
    end
  end

[#1588 state:committed]

Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-12-17 15:59:47 +01:00
Joshua Peek
ec1bd98705 Session Fixation tests have been rolled into the session cookie tests 2008-12-16 16:28:39 -06:00
Hongli Lai (Phusion
9e2b4a10f7 Do not output an ETag header if response body is blank or when sending files with send_file(... :xsendfile => true) [#1578 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-12-16 12:30:28 +01:00
Joshua Peek
ed70830713 Switch to Rack based session stores. 2008-12-15 16:33:31 -06:00
Seth Fitzsimmons
f36dafa492 Implement Mime::Type.=~ to match all synonyms against arg [#1573 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-12-15 12:00:55 -06:00
mark
49306ccacf Add :partial option to assert_template [#1550 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-12-11 11:06:35 -06:00
Christos Zisopoulos
69387ce016 Fix for Integration::Session follow_redirect! headers['location'] bug with Rack [#1555 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-12-10 18:38:28 -06:00
Jeremy Kemper
9adcf951ea Fix failing test introduced by optional-format routes 2008-12-08 19:19:48 -08:00
Joshua Peek
ebec9d43e2 Make integration test runner more Rack friendly and clean out old CGI cruft 2008-12-08 12:33:16 -06:00
Joshua Peek
731dcd8404 Silence server backtrace in rescue templates and log files. Also remove some noise from missing template errors. 2008-12-05 11:24:28 -06:00
Joshua Peek
9c9da6c892 Boot out CGI Processor.
* Add ActionController::CGIHandler as a backwards compatible CGI wrapper around Rack.
* Also pull failsafe responder into ActionController::Failsafe middleware.
2008-12-04 20:39:36 -06:00
Joshua Peek
27ebfd795f Ensure route set is cleared on teardown 2008-12-04 19:10:52 -06:00
Joshua Peek
148aff2097 Set template_format to html inside rjs templates so renders within it default to html. 2008-12-04 17:20:51 -06:00
Sam Stephenson
ab211bf592 Fix rendering html partials from an rjs template
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-12-04 16:35:13 -06:00
Joshua Peek
40e9ba1e46 Refactor SessionFixationTest and WebServiceTest with IntegrationTest so they are compatible with the Rack interface. 2008-12-04 09:43:06 -06:00
Darren Boyd
0a4a5f3129 Making the IP Spoofing check in AbstractRequest#remote_ip configurable.
Certain groups of web proxies do not set these values properly.  Notably,
proxies for cell phones, which often do not set the remote IP information
correctly (not surprisingly, since the clients do not have an IP address).

Allowing this to be configurable makes it possible for developers to choose
to ignore this simple spoofing check, when a significant amount of their
traffic would result in false positives anyway.

Signed-off-by: Michael Koziarski <michael@koziarski.com>

[#1200 state:committed]
2008-12-01 20:40:18 +01:00
Jeremy Kemper
93456a2ed2 Deprecated formatted_polymorphic_url 2008-11-30 17:04:24 -08:00
Joshua Peek
9fc23745f1 Reinstate "Super lazy load view paths in development mode (no indexing or caching at all). Switch layout finders to use view path api to take advantage of cache." as it killed dev mode reloading." 2008-11-28 11:18:28 -06:00
David Heinemeier Hansson
5fa0457542 Revert "Super lazy load view paths in development mode (no indexing or caching at all). Switch layout finders to use view path api to take advantage of cache." as it killed dev mode reloading.
This reverts commit 4d910b033379727e5e7355590c50c72fc75e56db.
2008-11-27 21:04:24 +01:00
Joshua Peek
4d910b0333 Super lazy load view paths in development mode (no indexing or caching at all). Switch layout finders to use view path api to take advantage of cache. 2008-11-26 20:54:47 -06:00
David Heinemeier Hansson
7d8f9ef051 Fix routing test and add changelog note about draw no longer clearing the route set 2008-11-26 20:26:55 +01:00
David Heinemeier Hansson
40b40c4870 Added support for multiple routes files and made draw not clear the map so they can be additive 2008-11-26 15:57:36 +01:00
Aaron Batalion
fef6c32afe Added optimal formatted routes to rails, deprecating the formatted_* methods, and reducing routes creation by 50% [#1359 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-11-26 10:52:05 +01:00
Jeremy Kemper
4073a6d0a2 Remove XmlSimple dependencies 2008-11-25 19:49:49 -08:00
Joshua Peek
d4754677a3 Deprecate assert_valid 2008-11-25 12:32:14 -06:00
Geoff Garside
61becfe2b9 Test default singleton resource route to ensure it uses GET. This is important if using map.root :resource instead of map.root :resources for some reason.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-11-24 19:19:56 +01:00
Joshua Peek
31ce92f7b5 Use autoload instead of explicit requires for ActionController 2008-11-23 16:35:47 -06:00
Jeremy Kemper
2db8571edf Don't hide deeper LoadErrors 2008-11-23 13:10:27 -08:00
Michael Koziarski
04d2d043ca Move the cookie store to use the MessageVerifier class.
This removes support for ancient cookie-store generated cookies which were double escaped.
2008-11-23 16:42:15 +01:00
Michael Koziarski
9fdb15e60f Change the forgery token implementation to just be a simple random string.
This deprecates the use of :secret and :digest which were only needed when we were hashing session ids.
2008-11-23 14:28:34 +01:00
Sam Pohlenz
5ea9f2cac6 Allow helpers directory to be overridden via ActionController::Base.helpers_dir (Sam Pohlenz) [#1424 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-11-23 13:42:53 +01:00
Jeremy Kemper
51383c57a2 MiniTest compat: don't check for test/unit's assertion in particular 2008-11-22 19:19:12 -08:00
Joshua Peek
20d6fdd256 write_fragment returns content if caching is disabled [#846 state:resolved] 2008-11-22 13:19:11 -06:00
Lance Ivy
cd1a9ed991 Add TestResponse#client_error? to check for 4xx status codes [#851 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-11-22 13:10:12 -06:00
David Heinemeier Hansson
f42c77f927 Added ActiveSupport::BacktraceCleaner and Rails::BacktraceCleaner for cutting down on backtrace noise (inspired by the Thoughtbot Quiet Backtrace plugin) [DHH] 2008-11-22 18:06:08 +01:00
Pratik Naik
27c03e69e9 Remove deprecated render_component. Please use the plugin from http://github.com/rails/render_component/tree/master 2008-11-19 17:48:57 +05:30
Hiroshi Saito
291d199de1 Let polymorphic_path treat an array contains single name as without array [#1386 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-11-19 12:07:12 +01:00
Gabe da Silveira
917428bcce Make optimized named routes respect all reserved options and tie it into UrlRewriter::RESERVED_OPTIONS so it's DRY
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-11-18 22:47:33 +01:00
Luke Melia
60d6f25517 Fix rendering html partial via inline render when with :js format [#1399 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-11-18 15:19:16 -06:00
Luke Melia
75fb8dfb99 Prevent assert_template failures when a render :inline is called before rendering a file-based template [#1383 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-11-17 22:09:22 -06:00
Jeremy Kemper
eeea1a26ec Merge branch 'master' into testing 2008-11-15 12:21:04 -08:00
Tom Stuart
2ecec6052f Make inheritance of map.resources :only/:except options behave more predictably
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-11-14 12:26:43 +01:00
hiroshi
94d6716324 Make polymorphic_url compact given array [#1317 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-11-14 12:07:52 +01:00
Tom Stuart
4c09210244 Fix map.resources to always generate named routes if they're needed
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-11-13 17:49:09 +01:00
Michael Koziarski
f1ad8b48aa Instead of overriding html_types, base the verification on browser_generated_types.
Also Deprecate the old unverifiable types.

[#1145 state:committed]
2008-11-13 11:23:34 +01:00
rick
00c46b5eeb fix two MimeType failing test cases
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-11-13 11:23:34 +01:00
Jeff Cohen
fbbcd6f29a Changed request forgery protection to only worry about HTML-formatted content requests.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-11-13 11:23:21 +01:00
Tom Stuart
44a3009ff0 Add :only/:except options to map.resources
This allows people with huge numbers of resource routes to cut down on the memory consumption caused by the generated code.

Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1215 state:committed]
2008-11-12 12:57:58 +01:00
Jeremy Kemper
d87d3f76d5 Ruby 1.9 compat: rescue Exception since minitest's assertion doesn't subclass StandardError 2008-11-08 22:46:13 -05:00
Jeremy Kemper
8bfd5edbcf Wrap straggling mocha user with uses_mocha block 2008-11-08 22:43:56 -05:00
Jeremy Kemper
eda9f49d57 Ruby 1.9 compat: CGI switched back to Tempfile 2008-11-08 22:43:29 -05:00
Jeremy Kemper
8a1f913381 Workaround lack of Mocha on 1.9 (hasn't been updated for minitest yet) 2008-11-08 22:35:30 -05:00
Jeremy Kemper
ace9e533dc Merge branch 'master' into testing 2008-11-08 18:58:29 -05:00
Pratik Naik
5cc27f2b03 Add some basic controller logging tests 2008-11-08 18:45:19 +05:30
Jeremy Kemper
c0310bde48 Merge branch 'master' into testing 2008-11-07 21:51:08 -05:00
Jeremy Kemper
0be5bc3f59 Work around ruby 1.9 segfault 2008-11-07 21:50:39 -05:00
Jeremy Kemper
c82e8e1f48 Move controller assertions from base TestCase to AC:: and AV::TestCase 2008-11-07 15:42:34 -05:00
David Heinemeier Hansson
a358d87e16 Fixed the sanitize helper to avoid double escaping already properly escaped entities [#683 state:committed] 2008-11-06 13:02:32 +01:00
David Heinemeier Hansson
cbeac93310 Added render :js for people who want to render inline JavaScript replies without using RJS [DHH] 2008-11-01 12:03:49 +01:00
Joshua Peek
2092687bcb Ensure content type gets reset after render_to_string [#1182 state:resolved] 2008-10-30 15:26:29 -05:00
Seth Fitzsimmons
47b4fa4a62 Fixed regex in redirect_to to fully support URI schemes [#1247 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-10-30 21:07:50 +01:00
Jeffrey Hardy
3bcadc9290 Fix incorrect closing CDATA delimiter. Add tests for CDATA nodes.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-10-23 19:16:26 -07:00
Jeffrey Hardy
1a18227261 Fix that HTML::Node.parse would blow up on unclosed CDATA sections.
If an unclosed CDATA section is encountered and parsing is strict, an
exception will be raised. Otherwise, we consider the remainder of the line to
be the section contents. This is consistent with HTML::Tokenizer#scan_tag.

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-10-23 19:16:12 -07:00
David Heinemeier Hansson
18542c9e00 Dont try to auto-set the etag based on the body if any freshness headers have already been set [DHH/José Valim] 2008-10-21 16:58:12 +02:00
David Heinemeier Hansson
448e7e7c04 Let fresh_when actually do the head(:not_modified). Cleaner and we get the filter halting for free then. 2008-10-21 02:54:55 +02:00
David Heinemeier Hansson
68d84e2593 Merge branch 'master' of git@github.com:rails/rails 2008-10-21 02:30:57 +02:00
David Heinemeier Hansson
9acb88e666 Added stale?/fresh? and fresh_when methods to provide a layer of abstraction above request.fresh? and friends [DHH] 2008-10-21 02:30:13 +02:00
Tim Harper
fcb45e5ec3 Ensure ActionView::Helpers::AssetTagHelper::AssetTag::Cache is cleared before loading so changes to asset files are picked up by the broswer [#1233 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-10-20 13:21:59 -05:00
Eloy Duran
b47c76b1df Make sure named routes with parameters can be used in tests before a request has been done. [#1208 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-10-13 18:38:48 +02:00
Tom Stuart
e28ad77bba Allow use of :path_prefix and :name_prefix outside of namespaced routes. [#1188 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-10-08 14:56:52 +01:00
Michael Koziarski
aec391621b Make sure last_modified! works with <= rather than just equality. 2008-10-07 21:09:07 +02:00
Pratik Naik
5e3517ea7b Ensure rescue_from handlers are respected inside tests. [#835 state:resolved]
Note : If you're not using rescue_from, you should overrider rescue_action_without_handler() method
and not rescue_action(). Afterwards, you can set request.remote_addr to a non "0.0.0.0" value for testing the
overridden behavior.
2008-10-04 18:43:46 +01:00
Michael Koziarski
0eefa7058a Fix etag! and last_modified! to work as advertised.
Add tests too.
2008-09-30 17:00:38 +02:00
Pelle Braendgaard
7ecb9689b0 Added support for http_only cookies in cookie_store Added unit tests for secure and http_only cookies in cookie_store
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1046 state:committed]
2008-09-17 13:20:16 +02:00
Sven Fuchs
a18ed6d563 Added ActionController::Translation module delegating to I18n #translate/#t and #localize/#l [status:committed #1008]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-09-10 00:39:54 -05:00
Matt Jones
7e6cda15f8 Ensure routing optimizations are cleared when new routes are added [#981 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-09-07 10:21:34 -05:00
Jonathan del Strother
6cfb70023a Don't set Content-Length on 304 responses
Commit 8aad8c claimed to do this, but it checks for the 304 status too early, before handle_conditional_get! has overridden it.

[#958 state:resolved]

Signed-off-by: Jonathan del Strother <jon.delStrother@bestbefore.tv>
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-09-02 22:57:40 +02:00
Jeremy Kemper
a1eb4e11c2 Get rid of 'Object#send!'. It was originally added because it's in Ruby 1.9, but it has since been removed from 1.9.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>

Conflicts:

	actionpack/test/controller/layout_test.rb
2008-08-31 13:20:15 -07:00
Luke Melia
7ce03db778 Fixes optimised named routes generating question mark followed by nothing when provided an empty hash as the last argument.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#481 state:committed]
2008-08-31 19:42:01 +02:00
Joshua Peek
086c3520c4 Moved layout exemption logic into the view 2008-08-31 11:34:46 -05:00
Pratik Naik
56c2b02f59 Fix AM tests and add tests for rendering logging 2008-08-31 16:29:21 +01:00