summaryrefslogtreecommitdiff
path: root/spec/support/artifice/compact_index_redirects.rb
blob: ff1d3e43bce75e0f9ad15473fa13922a3cc212cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true
require File.expand_path("../compact_index", __FILE__)

Artifice.deactivate

class CompactIndexRedirect < CompactIndexAPI
  get "/fetch/actual/gem/:id" do
    redirect "/fetch/actual/gem/#{params[:id]}"
  end

  get "/versions" do
    status 404
  end

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

Artifice.activate_with(CompactIndexRedirect)