Sha256: b9690e8595148cc0501976727973d5bc2517097fc9ab771b3cd2a230063b7b37

Contents?: true

Size: 414 Bytes

Versions: 7

Compression:

Stored size: 414 Bytes

Contents

class JsTestServer::Server::Resources::NotFound < JsTestServer::Server::Resources::Resource
  include JsTestServer::Server
  map "*"

  get "/" do
    call
  end

  put "/" do
    call
  end

  post "/" do
    call
  end

  delete "/" do
    call
  end

  def call
    body = Views::NotFound.new(:message => "File #{request.path_info} not found").to_s
    [ 404, { "Content-Type" => "text/html" }, body ]
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
honkster-js-test-server-0.2.12 lib/js_test_server/server/resources/not_found.rb
honkster-js-test-server-0.2.11 lib/js_test_server/server/resources/not_found.rb
honkster-js-test-server-0.2.10 lib/js_test_server/server/resources/not_found.rb
honkster-js-test-server-0.2.9 lib/js_test_server/server/resources/not_found.rb
js-test-server-0.2.8 lib/js_test_server/server/resources/not_found.rb
js-test-server-0.2.7 lib/js_test_server/server/resources/not_found.rb
js-test-server-0.2.6 lib/js_test_server/server/resources/not_found.rb