Sha256: 824b14a9e63193184eb729d53488552b1d83730931fff3ff2f94c52b8a483ce1

Contents?: true

Size: 888 Bytes

Versions: 6817

Compression:

Stored size: 888 Bytes

Contents

module Typhoeus
  class Hydra

    # This module handles the blocked connection request mode on
    # the hydra side, where only stubbed requests
    # are allowed.
    # Connection blocking needs to be turned on:
    #   Typhoeus.configure do |config|
    #     config.block_connection = true
    #   end
    #
    # When trying to do real requests a NoStub error
    # is raised.
    #
    # @api private
    module BlockConnection

      # Overrides add in order to check before if block connection
      # is turned on. If thats the case a NoStub error is
      # raised.
      #
      # @example Add the request.
      #   hydra.add(request)
      #
      # @param [ Request ] request The request to enqueue.
      def add(request)
        if request.blocked?
          raise Typhoeus::Errors::NoStub.new(request)
        else
          super
        end
      end
    end
  end
end

Version data entries

6,817 entries across 6,814 versions & 27 rubygems

Version Path
cybrid_api_bank_ruby-0.123.149 vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/block_connection.rb
cybrid_api_id_ruby-0.123.149 vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/block_connection.rb
cybrid_api_organization_ruby-0.123.149 vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/block_connection.rb
cybrid_api_bank_ruby-0.123.148 vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/block_connection.rb
cybrid_api_id_ruby-0.123.148 vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/block_connection.rb
cybrid_api_organization_ruby-0.123.148 vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/block_connection.rb
cybrid_api_bank_ruby-0.123.147 vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/block_connection.rb
cybrid_api_organization_ruby-0.123.147 vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/block_connection.rb
cybrid_api_id_ruby-0.123.147 vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/block_connection.rb
ory-client-1.16.2 vendor/bundle/ruby/3.1.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/block_connection.rb
talon_one-7.0.0 .github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/block_connection.rb
cybrid_api_bank_ruby-0.123.145 vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/block_connection.rb
cybrid_api_organization_ruby-0.123.145 vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/block_connection.rb
cybrid_api_id_ruby-0.123.145 vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/block_connection.rb
cybrid_api_bank_ruby-0.123.144 vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/block_connection.rb
cybrid_api_id_ruby-0.123.144 vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/block_connection.rb
cybrid_api_organization_ruby-0.123.144 vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/block_connection.rb
ory-client-1.16.1 vendor/bundle/ruby/3.1.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/block_connection.rb
ory-client-1.16.0 vendor/bundle/ruby/3.1.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/block_connection.rb
cybrid_api_bank_ruby-0.123.143 vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/block_connection.rb