Sha256: 1723b0a0a67eef1fbc2ee5c5c3f4fe0a90e27de7d2728abebd8fed460b033449

Contents?: true

Size: 380 Bytes

Versions: 30

Compression:

Stored size: 380 Bytes

Contents

class ShowTestExceptions
  attr_reader :app

  def initialize(app)
    @app = app
  end

  def call(env)
    app.call(env)
  rescue StandardError, LoadError, SyntaxError => e
    body = [
        e.message,
        e.backtrace.join("\n\t")
      ].join("\n")
    [
      500,
      {"Content-Type" => "text",
       "Content-Length" => body.size.to_s},
      body
    ]
  end
end

Version data entries

30 entries across 30 versions & 8 rubygems

Version Path
pivotal-screw-unit-0.5.0 vendor/js-test-core/spec/spec_helpers/show_test_exceptions.rb
pivotal-screw-unit-0.5.1 vendor/js-test-core/spec/spec_helpers/show_test_exceptions.rb
pivotal-screw-unit-0.5.2 vendor/js-test-core/spec/spec_helpers/show_test_exceptions.rb
pivotal-screw-unit-0.5.3 vendor/js-test-core/spec/spec_helpers/show_test_exceptions.rb
pivotal-screw-unit-server-0.5.10 vendor/js-test-core/spec/spec_helpers/show_test_exceptions.rb
pivotal-screw-unit-server-0.5.11 vendor/js-test-core/spec/spec_helpers/show_test_exceptions.rb
pivotal-screw-unit-server-0.5.12 vendor/js-test-core/spec/spec_helpers/show_test_exceptions.rb
pivotal-screw-unit-server-0.5.3 vendor/js-test-core/spec/spec_helpers/show_test_exceptions.rb
pivotal-screw-unit-server-0.5.4 vendor/js-test-core/spec/spec_helpers/show_test_exceptions.rb
pivotal-screw-unit-server-0.5.5 vendor/js-test-core/spec/spec_helpers/show_test_exceptions.rb
pivotal-screw-unit-server-0.5.6 vendor/js-test-core/spec/spec_helpers/show_test_exceptions.rb
pivotal-screw-unit-server-0.5.7 vendor/js-test-core/spec/spec_helpers/show_test_exceptions.rb
pivotal-screw-unit-server-0.5.8 vendor/js-test-core/spec/spec_helpers/show_test_exceptions.rb
pivotal-screw-unit-server-0.5.9 vendor/js-test-core/spec/spec_helpers/show_test_exceptions.rb
honkster-js-test-server-0.2.12 spec/spec_helpers/show_test_exceptions.rb
honkster-js-test-server-0.2.11 spec/spec_helpers/show_test_exceptions.rb
honkster-js-test-server-0.2.10 spec/spec_helpers/show_test_exceptions.rb
honkster-js-test-server-0.2.9 spec/spec_helpers/show_test_exceptions.rb
honkster-screw-unit-server-0.6.3 vendor/js-test-core/spec/spec_helpers/show_test_exceptions.rb
js-test-server-0.2.8 spec/spec_helpers/show_test_exceptions.rb