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

✨ Add #extract_responses method [backport: #330] #337

Merged
merged 4 commits into from
Oct 13, 2024

Commits on Oct 13, 2024

  1. ✅ Add a Mutex to FakeServer (for tests only)

    While trying to track down the cause of #287 for @hsbt, I noticed that
    this is likely a race condition.  While this can't be the cause of that
    issue (the failures come from tests that don't even use FakeServer), it
    seems like a good idea to fix anyway, and safe.
    nevans committed Oct 13, 2024
    Configuration menu
    Copy the full SHA
    97d704e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8aba14b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bceb332 View commit details
    Browse the repository at this point in the history
  4. ✨ Add #extract_responses method

    This is similar to ActiveSupport's Array#extract!.
    
    Yields all of the unhandled #responses for a single response type.
    Removes and returns the responses for which the block returns a true
    value.
    
    Extracting responses is synchronized with other threads.  The lock is
    released before returning.
    nevans committed Oct 13, 2024
    Configuration menu
    Copy the full SHA
    39b7568 View commit details
    Browse the repository at this point in the history