Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (16 sloc) 0.438 kB
class RecoveryMode
def self.matches?(request)
!Rails.env.recovery?
end
def initialize(app)
@app = app
end
def call(env)
request = Rack::Request.new(env)
if request.path.starts_with?("/api/v1")
[503, {"Content-Type" => "text/plain"}, ["RubyGems.org's API is currently recovering. Check out http://status.rubygems.org and @rubygems_status for more info."]]
else
@app.call(env)
end
end
end
Jump to Line
Something went wrong with that request. Please try again.