1. 17 6月, 2015 1 次提交
  2. 16 6月, 2015 2 次提交
  3. 07 6月, 2015 1 次提交
  4. 29 5月, 2015 1 次提交
  5. 28 5月, 2015 1 次提交
  6. 27 5月, 2015 2 次提交
  7. 26 5月, 2015 1 次提交
  8. 24 5月, 2015 1 次提交
  9. 23 5月, 2015 2 次提交
  10. 03 5月, 2015 1 次提交
  11. 06 4月, 2015 1 次提交
    • E
      Fix method signature of `parse_query` to match rack · 0eef12c0
      eileencodes 提交于
      Recently rack was changed to have a second argument on the `parse_query`
      method (in rack/rack#781). Rails relies on this and it's `parse_query`
      method was complaining about missing the second argument. I changed the
      arguments to `*` so we don't have this issue in the future.
      0eef12c0
  12. 25 3月, 2015 2 次提交
    • G
      Add ActiveSupport::ArrayInquirer and Array#inquiry · c64b99ec
      George Claghorn 提交于
      Wrapping an array in an `ArrayInquirer` gives a friendlier way to check its
      string-like contents. For example, `request.variant` returns an `ArrayInquirer`
      object. To check a request's variants, you can call:
      
          request.variant.phone?
          request.variant.any?(:phone, :tablet)
      
      ...instead of:
      
          request.variant.include?(:phone)
          request.variant.any? { |v| v.in?([:phone, :tablet]) }
      
      `Array#inquiry` is a shortcut for wrapping the receiving array in an
      `ArrayInquirer`:
      
          pets = [:cat, :dog]
          pets.cat?    # => true
          pets.ferret? # => false
          pets.any?(:cat, :ferret} # => true
      c64b99ec
    • G
      Provide friendlier access to request variants · 9d9cc477
      George Claghorn 提交于
      Closes #18933.
      9d9cc477
  13. 21 3月, 2015 1 次提交
    • A
      Fix handling of empty X_FORWARDED_HOST header. · b49cac80
      adam 提交于
      Previously, an empty X_FORWARDED_HOST header would cause
      Actiondispatch::Http:URL.raw_host_with_port to return nil, causing
      Actiondispatch::Http:URL.host to raise a NoMethodError.
      b49cac80
  14. 06 3月, 2015 1 次提交
  15. 05 3月, 2015 1 次提交
  16. 03 3月, 2015 1 次提交
  17. 02 3月, 2015 1 次提交
  18. 01 3月, 2015 1 次提交
    • G
      Work around for upstream Ruby bug #10685 · 707a4338
      Genadi Samokovarov 提交于
      In f6e293ec we avoided a segfault in the
      tests, however I think we should try to avoid the crash, as it may
      happen in user code as well.
      
      Here is what I distiled the bug down to:
      
      ```ruby
      # Rails case - works on 2.0, 2.1; crashes on 2.2
      require 'action_dispatch'
      
      ActionDispatch::Response.new(200, "Content-Type" => "text/xml")
      
      # General case - works on 2.0, 2.1; crashes on 2.2
      def foo(optional = {}, default_argument: nil)
      end
      
      foo('quux' => 'bar')
      ```
      707a4338
  19. 26 2月, 2015 1 次提交
    • J
      Fix default headers in test responses · f6e293ec
      Jeremy Kemper 提交于
      Fixes regression in #18423. Merge default headers for new responses,
      but don't merge when creating a response from the last session request.
      
      hat tip @senny 
      f6e293ec
  20. 23 2月, 2015 1 次提交
  21. 21 2月, 2015 2 次提交
  22. 14 1月, 2015 1 次提交
  23. 04 1月, 2015 4 次提交
  24. 31 12月, 2014 2 次提交
  25. 19 12月, 2014 1 次提交
    • C
      Add docs for ActionDispatch::Http::URL methods · 78ae8eeb
      claudiob 提交于
      Add docs for `extract_domain`, `extract_subdomains`, `extract_subdomain`.
      
      Add doc examples for `url`, `protocol`, `raw_host_with_port`, `host`,
      `host_with_port`, `port`, `standard_port`, `standard_port?`, `optional_port`,
      `port_string`.
      
      [ci skip]
      78ae8eeb
  26. 16 12月, 2014 1 次提交
    • T
      allow reseting of request variants · e1fb3483
      Timo Schilling 提交于
      The current implementation of `variants=` don't allow a resetting to nil, wich is the default value.
      
      This results in the following code smell:
      ```ruby
      case request.user_agent
      when /iPhone/
        request.variants = :phone
      when /iPad/
        request.variants = :ipad
      end
      ```
      
      With the ability to reset variants to nil, it could be:
      ```ruby
      request.variants = case request.user_agent
      when /iPhone/
        :phone
      when /iPad/
        :ipad
      end
      ```
      e1fb3483
  27. 14 12月, 2014 1 次提交
  28. 29 11月, 2014 1 次提交
  29. 23 11月, 2014 1 次提交
  30. 29 10月, 2014 2 次提交
    • X
      edit pass over all warnings · e595d91a
      Xavier Noria 提交于
      This patch uniformizes warning messages. I used the most common style
      already present in the code base:
      
      * Capitalize the first word.
      
      * End the message with a full stop.
      
      * "Rails 5" instead of "Rails 5.0".
      
      * Backticks for method names and inline code.
      
      Also, converted a few long strings into the new heredoc convention.
      e595d91a
    • X
      let's warn with heredocs · b3bfa361
      Xavier Noria 提交于
      The current style for warning messages without newlines uses
      concatenation of string literals with manual trailing spaces
      where needed.
      
      Heredocs have better readability, and with `squish` we can still
      produce a single line.
      
      This is a similar use case to the one that motivated defining
      `strip_heredoc`, heredocs are super clean.
      b3bfa361