summaryrefslogtreecommitdiff
path: root/spec/bundler/support/artifice/endpoint_host_redirect.rb
blob: 0efb6cda02ecdd6ceefd552829172875f03f18d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

require_relative "helpers/endpoint"

class EndpointHostRedirect < Endpoint
  get "/fetch/actual/gem/:id", :host_name => "localgemserver.test" do
    redirect "http://bundler.localgemserver.test#{request.path_info}"
  end

  get "/api/v1/dependencies" do
    status 404
  end
end

require_relative "helpers/artifice"

Artifice.activate_with(EndpointHostRedirect)