1. 07 10月, 2015 1 次提交
    • J
      Use `Mime[:foo]` instead of `Mime::Type[:FOO]` for back compat · 565094a8
      Jeremy Daer 提交于
      Rails 4.x and earlier didn't support `Mime::Type[:FOO]`, so libraries
      that support multiple Rails versions would've had to feature-detect
      whether to use `Mime::Type[:FOO]` or `Mime::FOO`.
      
      `Mime[:foo]` has been around for ages to look up registered MIME types
      by symbol / extension, though, so libraries and plugins can safely
      switch to that without breaking backward- or forward-compatibility.
      
      Note: `Mime::ALL` isn't a real MIME type and isn't registered for lookup
      by type or extension, so it's not available as `Mime[:all]`. We use it
      internally as a wildcard for `respond_to` negotiation. If you use this
      internal constant, continue to reference it with `Mime::ALL`.
      
      Ref. efc6dd55
      565094a8
  2. 24 9月, 2015 1 次提交
  3. 23 9月, 2015 1 次提交
  4. 30 8月, 2015 2 次提交
  5. 12 8月, 2015 1 次提交
  6. 18 7月, 2015 1 次提交
    • P
      Stop using deprecated `render :text` in test · 8cb8ce98
      Prem Sichanugrist 提交于
      This will silence deprecation warnings.
      
      Most of the test can be changed from `render :text` to render `:plain`
      or `render :body` right away. However, there are some tests that needed
      to be fixed by hand as they actually assert the default Content-Type
      returned from `render :body`.
      8cb8ce98
  7. 14 6月, 2015 1 次提交
  8. 01 6月, 2015 1 次提交
  9. 04 5月, 2015 1 次提交
  10. 14 4月, 2015 1 次提交
  11. 02 4月, 2015 2 次提交
    • B
      Freeze static arguments for gsub · 58d75fd8
      brainopia 提交于
      58d75fd8
    • B
      Prefer string patterns for gsub · cdac52e1
      brainopia 提交于
      https://github.com/ruby/ruby/pull/579 - there is a new optimization
      since ruby 2.2
      
      Previously regexp patterns were faster (since a string was converted to
      regexp underneath anyway). But now string patterns are faster and
      better reflect the purpose.
      
        Benchmark.ips do |bm|
          bm.report('regexp') { 'this is ::a random string'.gsub(/::/, '/') }
          bm.report('string') { 'this is ::a random string'.gsub('::', '/') }
          bm.compare!
        end
        # string: 753724.4 i/s
        # regexp: 501443.1 i/s - 1.50x slower
      cdac52e1
  12. 05 3月, 2015 1 次提交
  13. 24 1月, 2015 1 次提交
  14. 29 12月, 2014 2 次提交
  15. 21 11月, 2014 1 次提交
    • C
      Wrap code snippets in +, not backticks, in sdoc · 5aedabe8
      claudiob 提交于
      I grepped the source code for code snippets wrapped in backticks in the comments
      and replaced the backticks with plus signs so they are correctly displayed in
      the Rails documentation.
      
      [ci skip]
      5aedabe8
  16. 10 10月, 2014 1 次提交
  17. 02 7月, 2014 1 次提交
  18. 13 6月, 2014 2 次提交
  19. 29 3月, 2014 1 次提交
  20. 27 2月, 2014 1 次提交
  21. 19 2月, 2014 1 次提交
  22. 08 7月, 2013 1 次提交
  23. 07 7月, 2013 1 次提交
    • T
      Check authentication scheme in Basic auth · a7a377ff
      tomykaira 提交于
      `authenticate_with_http_basic` and its families should check the authentication
      schema is "Basic".
      
      Different schema, such as OAuth2 Bearer should be rejected by basic auth, but
      it was passing as the test shows.
      
      This fixes #10257.
      a7a377ff
  24. 03 4月, 2013 1 次提交
  25. 19 3月, 2013 1 次提交
  26. 18 1月, 2013 2 次提交
  27. 07 1月, 2013 1 次提交
  28. 24 12月, 2012 1 次提交
  29. 16 12月, 2012 1 次提交
    • K
      Refactoring the token_and_options method to fix bugs · f71cca9e
      Kurtis Rainbolt-Greene 提交于
      Adding a test for the equal trun bug
      
      Adding a test for the after equal trunc bug
      
      Adding a test for the slash bug
      
      Adding a test for the slash quote bug
      
      Adding a helper method for creating a sample request object with token
      
      Writing a method to create params array from raw params
      
      Writing a method to rewrite param values in the params
      
      Writing a method to get the token params from an authorization value
      
      Refactoring the token_and_options method to fix bugs
      
      Removing unnessecary test
      
      A constant for this shared regex seemed appropriate
      
      Wanting to split up this logic
      
      Adding small documentation pieces
      f71cca9e
  30. 08 12月, 2012 1 次提交
  31. 04 11月, 2012 2 次提交
  32. 28 10月, 2012 1 次提交
  33. 03 8月, 2012 2 次提交