Sha256: 5e9dbe85e884da855acf26cd11fafe9bb711dbeb1f39841833c3fc5dd36edec7

Contents?: true

Size: 506 Bytes

Versions: 6

Compression:

Stored size: 506 Bytes

Contents

require File.expand_path("../endpoint", __FILE__)

Artifice.deactivate

class EndpointFallback < Endpoint
  DEPENDENCY_LIMIT = 60

  get "/specs.4.8.gz" do
    File.read("#{gem_repo1}/specs.4.8.gz")
  end

  get "/api/v1/dependencies" do
    if params[:gems].size <= DEPENDENCY_LIMIT
      Marshal.dump(dependencies_for(params[:gems]))
    else
      status 413
      "Too many gems to resolve, please request less than #{DEPENDENCY_LIMIT} gems"
    end
  end
end

Artifice.activate_with(EndpointFallback)

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
bundler-1.1.pre.4 spec/support/artifice/endpoint_fallback.rb
bundler-1.1.pre.3 spec/support/artifice/endpoint_fallback.rb
bundler-1.1.pre.2 spec/support/artifice/endpoint_fallback.rb
bundler_package_git-1.1.pre.1 spec/support/artifice/endpoint_fallback.rb
bundler-1.1.pre.1 spec/support/artifice/endpoint_fallback.rb
bundler-1.1.pre spec/support/artifice/endpoint_fallback.rb