Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Mar 2, 2015
  1. @tenderlove
  2. @tenderlove

    drop string allocations per model url_for call in views

    tenderlove authored
    article =!)
    view.url_for article
    result = ObjectSpace::AllocationTracer.trace do
      3000.times { view.url_for article }
    p ObjectSpace::AllocationTracer.allocated_count_table[:T_STRING] / 3000
Commits on Mar 1, 2015
  1. @tenderlove

    move _generate_paths_by_default to where it is used

    tenderlove authored
    _generate_paths_by_default wasn't used in AD::Routing::UrlFor, so we
    should be able to move it where it is used in AV::Routing
  2. @gsamokovarov

    Work around for upstream Ruby bug #10685

    gsamokovarov authored
    In f6e293e 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:
    # Rails case - works on 2.0, 2.1; crashes on 2.2
    require 'action_dispatch', "Content-Type" => "text/xml")
    # General case - works on 2.0, 2.1; crashes on 2.2
    def foo(optional = {}, default_argument: nil)
    foo('quux' => 'bar')
  3. @vijaydev
  4. @tenderlove
Commits on Feb 27, 2015
  1. @vipulnsward

    Removed non-standard and unused require 'active_support/deprecation' …

    vipulnsward authored
    …from parts out of active_support.
  2. @iainbeeston

    Explained how to set session expiry through session_store config

    iainbeeston authored
    Most session stores offer an :expire_after option, but it's largely
    undocumented. Cookie store also supports a number of options via
    rack (these used to be documented in rails 2.3)
  3. @carlosantoniodasilva

    Merge pull request #19104 from y-yagi/fix_skip_filter

    carlosantoniodasilva authored
    fix NameError in `skip_filter`. callback doesn't exist.
  4. @jeremy

    Revert integration test refactoring that caused app test regressions

    jeremy authored
    Haven't diagnosed yet. No similarly failing tests in Rails to work from.
    cc @tenderlove, @eileencodes
    Revert "there is always an integration session, so remove the check"
    Revert "lazily create the integration session"
    Revert "use before_setup to set up test instance variables"
    This reverts commits 4cf3b8a, 303567e, and fa63448.
  5. @jeremy

    Revert "Merge pull request #18764 from tsun1215/master"

    jeremy authored
    This reverts commit b6dd0c4, reversing
    changes made to de9a374.
  6. @y-yagi
Commits on Feb 26, 2015
  1. @schneems

    Merge pull request #18434 from brainopia/change_filter_on_rails_info_…

    schneems authored
    Change filter on /rails/info/routes to use an actual path regexp from rails
  2. @tgxworld

    Partition routes during setup.

    tgxworld authored
    Partitioning of all the routes is currently being done during the
    first request. Since there is no need to clear the cache for
    `partitioned_routes` when adding a new route. We can move the
    partitioning of the routes during setup time.
Commits on Feb 25, 2015
  1. @jeremy

    Fix default headers in test responses

    jeremy authored
    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 :heart:
Commits on Feb 24, 2015
  1. @yasyf

    Fallback to RAILS_RELATIVE_URL_ROOT in `url_for`.

    yasyf authored
    Fixed an issue where the `RAILS_RELATIVE_URL_ROOT` environment
    variable is not prepended to the path when `url_for` is called.
    If `SCRIPT_NAME` (used by Rack) is set, it takes precedence.
  2. @rafaelfranca

    Merge pull request #19060 from iainbeeston/deprecate-skip-action-call…

    rafaelfranca authored
    Deprecate `AbstractController::Callbacks#skip_action_callback`
  3. @iainbeeston

    Deprecate `AbstractController::Callbacks#skip_action_callback`

    iainbeeston authored
    As part of #19029, in future `skip_before_action`, `skip_after_action` and
    `skip_around_action` will raise an ArgumentError if the specified
    callback does not exist. `skip_action_callback` calls all three of these
    methods and will almost certainly result in an ArgumentError. If anyone
    wants to remove all three callbacks then they can still call the three
    individual methods. Therefore let's deprecate `skip_action_callback` now
    and remove it when #19029 is merged.
Commits on Feb 23, 2015
  1. @brainopia

    Change filter on /rails/info/routes to use an actual path regexp from…

    brainopia authored
    … rails
    Change filter on /rails/info/routes to use an actual path regexp from rails
    and not approximate javascript version. Oniguruma supports much more
    extensive list of features than javascript regexp engine.
    Fixes #18402.
  2. @y-yagi
Commits on Feb 20, 2015
  1. @rafaelfranca
  2. @dilizarov @rafaelfranca

    Aliased the ActionDispatch::Request#uuid method with ActionDispatch::…

    dilizarov authored rafaelfranca committed
  3. @rafaelfranca

    Merge pull request #18218 from brainopia/fix_match_shorthand_in_routes

    rafaelfranca authored
    Don't use shorthand match on routes with inappropriate symbols
  4. @sgrif

    Merge pull request #18665 from sgrif/sg-test-route-all

    sgrif authored
    Allow `method: "all"` as a valid routing test option
Commits on Feb 19, 2015
  1. @evanphx
  2. @evanphx

    Cache url_helpers instead of creating each time

    evanphx authored
    This has 2 effects:
    1. RoutesProxy is CRAZY faster because it's no longer creating a new
    Module each time method_missing is hit.
    2. It bypasses an existing bug in ruby that makes `class << obj` unsafe
    to be used in threading contexts.
Commits on Feb 18, 2015
  1. @eileencodes

    Freeze strings to reduce allocations in integration tests

    eileencodes authored
    Moves `X-Request-ID`, `action_dispatch.request_id` and
    `HTTP_X_REQUEST_ID` strings to constants and freezes them.
    We are freezing these strings to reduce the number of allocations in
    Rails integration tests. The tests are spending a lot of time in GC and
    this reduces the amount of time spent from 12% to 9% (in combination
    with Rack PR that also freezes some strings).
    Number of allocations before this change: 1030722
    Number of allocations after this change: 967722
  2. @eileencodes

    Reduce the number of times `#clean_path_info` is called

    eileencodes authored
    It's unnecessary to call `#clean_path_info`. It doesn't need to be
    called on the path with each extension. This reduces allocations to
    `Rack::Utils` in integration tests.
    Before `#clean_path_info` from `Rack::Utils` (line 622) was number 2
    in top 5 allocations:
    [["rack/lib/rack/utils.rb", 499, :T_STRING], [51034, 4539, 71559, 0, 12, 1791120]]
    [["rack/lib/rack/utils.rb", 662, :T_STRING], [33012, 0, 27930, 0, 1, 1226009]]
    [["rails/activesupport/lib/active_support/notifications/fanout.rb", 55, :T_DATA], [29998, 0, 25380, 0, 1, 3230600]]
    [["rails/activesupport/lib/active_support/subscriber.rb", 99, :T_STRING], [29996, 0, 25378, 0, 2, 1113840]]
    [["rails/activesupport/lib/active_support/notifications/instrumenter.rb", 52, :T_HASH], [29994, 147, 27014, 0, 11, 4897784]]
    After `#clean_path_info` from `Rack::Utils` (line 622) does not appear
    in the top 5 highest allocations:
    [["rack/lib/rack/utils.rb", 499, :T_STRING], [47617, 2414, 68969, 0, 12, 1667360]]
    [["rack/lib/rack/body_proxy.rb", 34, :T_ARRAY], [28230, 0, 26060, 0, 1, 1046800]]
    [["rails/activesupport/lib/active_support/notifications/fanout.rb", 55, :T_DATA], [28208, 0, 26042, 0, 1, 3034096]]
    [["rails/activesupport/lib/active_support/subscriber.rb", 99, :T_STRING], [28204, 0, 26040, 0, 1, 1046080]]
    [["rails/activesupport/lib/active_support/callbacks.rb", 165, :T_DATA], [28200, 0, 26046, 0, 2, 3451800]]
  3. @rafaelfranca

    Try only to decode strings

    rafaelfranca authored
    This approach will avoid us to check for NoMethodError when trying to
  4. @rafaelfranca

    Merge pull request #18917 from lautis/non-string-csrf-token

    rafaelfranca authored
    Handle non-string authenticity tokens
Commits on Feb 15, 2015
  1. @robin850
  2. @arthurnn

    Implement http_cache_forever to ActionController

    arthurnn authored
    Add http_cache_forever to ActionController, so we can cache results
    Things like static pages are a good candidate for this type of caching.
    This cache only controls caching headers, so it is up to the browser to
    cache those requests.
Commits on Feb 13, 2015
  1. @arthurnn

    Add missing comma

    arthurnn authored
  2. @tgxworld
  3. @tgxworld

    Improve deprecation message.

    tgxworld authored
Something went wrong with that request. Please try again.