Sha256: 022565301fe67ee40ee2a4001929eff9f7b2ca1abb0d1852b1f1e052d4171651

Contents?: true

Size: 331 Bytes

Versions: 7

Compression:

Stored size: 331 Bytes

Contents

require 'faraday'

module AngellistApi
  module Request
    class Gateway < Faraday::Middleware
      def call(env)
        url = env[:url].dup
        url.host = @gateway
        env[:url] = url
        @app.call(env)
      end

      def initialize(app, gateway)
        @app, @gateway = app, gateway
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
angellist_api-1.1.0 lib/angellist_api/request/gateway.rb
angellist_api-1.0.7 lib/angellist_api/request/gateway.rb
angellist_api-1.0.6 lib/angellist_api/request/gateway.rb
angellist_api-1.0.5 lib/angellist_api/request/gateway.rb
angellist_api-1.0.4 lib/angellist_api/request/gateway.rb
angellist_api-1.0.3 lib/angellist_api/request/gateway.rb
angellist_api-1.0.2 lib/angellist_api/request/gateway.rb