1. 25 3月, 2014 1 次提交
  2. 13 3月, 2014 2 次提交
    • A
      use the body proxy to freeze headers · 3df07d09
      Aaron Patterson 提交于
      avoid freezing the headers until the web server has actually read data
      from the body proxy.  Once the webserver has read data, then we should
      throw an error if someone tries to set a header
      3df07d09
    • A
      only write the jar if the response isn't committed · 77a09218
      Aaron Patterson 提交于
      when streaming responses, we need to make sure the cookie jar is written
      to the headers before returning up the stack. This commit introduces a
      new method on the response object that writes the cookie jar to the
      headers as the response is committed.  The middleware and test framework
      will not write the cookie headers if the response has already been
      committed.
      
      fixes #14352
      77a09218
  3. 01 3月, 2014 1 次提交
  4. 27 2月, 2014 1 次提交
    • T
      Fix controller test not resetting @_url_options · a351149e
      Tony Wooster 提交于
      Commit 4f2cd3e9 introduced a bug by reordering the call to
      `@controller.recycle!` above the call to `build_request_uri`. The
      impact of this was that the `@_url_options` cache ends up not being
      reset between building a request URI (occurring within the test
      controller) and the firing of the actual request.
      
      We encountered this bug because we had the following setup:
      
        class MinimumReproducibleController < ActionController::Base
          before_filter { @param = 'param' }
      
          def index
            render text: url_for(params)
          end
      
          def default_url_options
            { custom_opt: @param }
          end
        end
      
        def test_index
          get :index # builds url, then fires actual request
        end
      
      The first step in  `get :index` in the test suite would populate the
      @_url_options cache. The subsequent call to `url_for` inside of the
      controller action would then utilize the uncleared cache, thus never
      calling the now-updated default_url_options.
      
      This commit fixes this bug calling recycle! twice, and removes a call
      to set response_body, which should no longer be needed since we're
      recycling the request object explicitly.
      a351149e
  5. 27 1月, 2014 1 次提交
  6. 28 6月, 2013 1 次提交
  7. 16 5月, 2013 1 次提交
  8. 06 5月, 2013 1 次提交
  9. 23 4月, 2013 1 次提交
  10. 08 4月, 2013 1 次提交
  11. 03 4月, 2013 1 次提交
  12. 15 3月, 2013 2 次提交
  13. 12 3月, 2013 1 次提交
  14. 01 3月, 2013 1 次提交
  15. 04 2月, 2013 2 次提交
    • Y
      partials inside directory work with `assert_template` · cce94e72
      Yves Senn 提交于
      previously when a partial was placed inside a directory
      (eg. '/dir/_partial'), `assert_template` did not replace
      the '_' prefix when looking through rendered tempaltes,
      which resulted in an error.
      
      I modified it to replace both, the leading '_' and the last '_'
      after a '/'.
      cce94e72
    • Y
      descriptive `assert_template` error when partial wasn't rendered · c21ab338
      Yves Senn 提交于
      When `assert_template` is used with the :locals option, and the
      partial was not rendered, a method_missing error was raised.
      This changes first checks, if the partial actually was rendered
      and raises a descriptive error.
      c21ab338
  16. 01 2月, 2013 1 次提交
  17. 26 1月, 2013 2 次提交
  18. 18 1月, 2013 2 次提交
  19. 17 1月, 2013 1 次提交
  20. 01 1月, 2013 1 次提交
  21. 26 11月, 2012 1 次提交
  22. 24 11月, 2012 2 次提交
  23. 09 11月, 2012 2 次提交
    • J
      Store FlashHashes in the session as plain hashes rather than custom objects... · 654a2de7
      James Coglan 提交于
      Store FlashHashes in the session as plain hashes rather than custom objects with unstable class names and instance variables.
      
      Refactor FlashHash to take values for its ivars in the constructor, to pretty up FlashHash.from_session_value.
      
      Remove stale comment on FlashHash: it is no longer Marshaled in the session so we can change its implementation.
      
      Remove blank lines I introduced in controller/test_case.rb.
      
      Unit tests for FlashHash#to_session_value.
      
      Put in a compatibility layer to accept FlashHash serializations from Rails 3.0+.
      
      Test that Rails 3.2 session flashes are correctly converted to the new format.
      
      Remove code path for processing Rails 3.0 FlashHashes since they can no longer deserialize.
      
      Fix session['flash'] deletion condition: it will never be empty?, it will either be nil or a hash with 'discard' and 'flashes' keys.
      654a2de7
    • J
      Revert "Merge pull request #8017 from jcoglan/objectless_sessions" · 48428396
      Jon Leighton 提交于
      This reverts commit 36376560, reversing
      changes made to 3148ed9a.
      
      Conflicts:
      	actionpack/lib/action_dispatch/middleware/flash.rb
      
      Reason: it broke Sam's CI
      
      https://github.com/rails/rails/pull/8017#issuecomment-10210655
      48428396
  24. 03 11月, 2012 1 次提交
    • J
      Store FlashHashes in the session as plain hashes rather than custom objects... · 76a0237c
      James Coglan 提交于
      Store FlashHashes in the session as plain hashes rather than custom objects with unstable class names and instance variables.
      
      Refactor FlashHash to take values for its ivars in the constructor, to pretty up FlashHash.from_session_value.
      
      Remove stale comment on FlashHash: it is no longer Marshaled in the session so we can change its implementation.
      
      Remove blank lines I introduced in controller/test_case.rb.
      
      Unit tests for FlashHash#to_session_value.
      
      Put in a compatibility layer to accept FlashHash serializations from Rails 3.0+.
      
      Test that Rails 3.2 session flashes are correctly converted to the new format.
      
      Remove code path for processing Rails 3.0 FlashHashes since they can no longer deserialize.
      76a0237c
  25. 29 10月, 2012 1 次提交
  26. 28 10月, 2012 1 次提交
  27. 11 10月, 2012 2 次提交
  28. 06 10月, 2012 1 次提交
  29. 01 10月, 2012 1 次提交
  30. 30 9月, 2012 2 次提交
    • R
      Whitespaces [ci skip] · 623f2fbb
      Rafael Mendonça França 提交于
      623f2fbb
    • H
      `assert_template` no more passing with what ever string that matches. · 19dff78d
      Hugo Roque 提交于
      Given Im rendering an template `/layout/hello.html.erb`, assert_template was
      passing with any string that matches. This behavior allowed false passing like:
      
      	assert_template "layout"
      	assert_template "out/hello"
      
      Now the passing possibilities are:
      
      	assert_template "layout/hello"
      	assert_template "hello"
      
      fixing assert_template bug when template matches expected, but not ends with
      
      Cherry Pick Merge: Fixes issue #3849 assert_template false positive
      
      taking redundant test off
      
      prevening incorrect assert_template when rendering with repeated names in path
      
      updating CHANGELOG with bugfix: assert_template false passing
      19dff78d
  31. 27 9月, 2012 1 次提交