Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete a reversible stackable values class #1953

Merged
merged 2 commits into from
Jan 6, 2020
Merged

delete a reversible stackable values class #1953

merged 2 commits into from
Jan 6, 2020

Commits on Jan 4, 2020

  1. delete a reversible stackable values class

    The reversible stackable values object was initialized for every endpoint,
    however, it is only needed for keeping rescue handlers. The idea is
    simple, handlers defined "closer" to an endpoint have higher priority.
    That test https://github.com/ruby-grape/grape/blob/master/spec/grape/api_spec.rb#L3215-L3232
    demonstrates how it works.
    
    In our project rescue handlers are defined at the top level, so almost every
    endpoint keeps the unused object.
    
    The mentioned behavior is easy to achieve with the stackable values object and
    the `reverse_each` method. Thus, endpoints keeps less objects and
    have less code to be maintained.
    
    Besides that, there are a few other simple performance optimizations.
    dnesteryuk committed Jan 4, 2020
    Configuration menu
    Copy the full SHA
    30f1054 View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2020

  1. post-review improvements

    dnesteryuk committed Jan 5, 2020
    Configuration menu
    Copy the full SHA
    b3dca5f View commit details
    Browse the repository at this point in the history