jseifer (owner)

Revisions

gist: 91599 Download_button fork
public
Public Clone URL: git://gist.github.com/91599.git
Embed All Files: show embed
Ruby #
1
2
3
4
5
6
7
8
9
10
11
12
13
# Allow the metal piece to run in isolation
require(File.dirname(__FILE__) + "/../../config/environment") unless defined?(Rails)
 
class Test
  def self.call(env)
    if env["PATH_INFO"] =~ /^\/test/
      [200, {"Content-Type" => "text/html"}, ["Hello, World!"]]
    else
      [404, {"Content-Type" => "text/html"}, ["Not Found"]]
    end
  end
end