This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
require 'securerandom' | |
require 'ulid' | |
require 'benchmark' | |
require 'benchmark/ips' | |
module UuidGenerator | |
extend self |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
# Example that demonstrate how to abort requests in hydra when we reach some state. | |
# It based on :abort feature of streaming response. | |
# | |
# See https://github.com/typhoeus/typhoeus#streaming-the-response-body | |
# | |
# ``` | |
# $ ABORT_ON_FIRST_REQUEST=false ruby ./typhoeus_abort_requests.rb | |
# $ ABORT_ON_FIRST_REQUEST=true ruby ./typhoeus_abort_requests.rb |