Sha256: d0ee5f9100e1543278304b092c2eb49f4acdbc6f9d09c42f036278c22caf075e
Contents?: true
Size: 649 Bytes
Versions: 2
Compression:
Stored size: 649 Bytes
Contents
module Tessa # Since we no longer connect to the Tessa service, fake out the Tessa connection # so that it always returns 503 class FakeConnection [:get, :head, :put, :post, :patch, :delete].each do |method| define_method(method) do |*args| if defined?(Bugsnag) Bugsnag.notify("Tessa::FakeConnection##{method} invoked") end Tessa::FakeConnection::Response.new() end end class Response def success? false end def status 503 end def body '{ "error": "The Tessa connection is no longer implemented." }' end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tessa-2.0 | lib/tessa/fake_connection.rb |
tessa-1.2.0 | lib/tessa/fake_connection.rb |