diff options
Diffstat (limited to 'spec/bundler/support/artifice/compact_index_redirects.rb')
-rw-r--r-- | spec/bundler/support/artifice/compact_index_redirects.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/bundler/support/artifice/compact_index_redirects.rb b/spec/bundler/support/artifice/compact_index_redirects.rb new file mode 100644 index 0000000000..e83451b5b6 --- /dev/null +++ b/spec/bundler/support/artifice/compact_index_redirects.rb @@ -0,0 +1,21 @@ +# 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) |