2. About
• Koen Van der Auwera
• Co-founder 10to1 (http://10to1.be)
• @atog
• http://atog.be
3. Sinatra
Sinatra is a Domain Specific Language(DSL) for quickly
creating web-applications in ruby. It keeps a minimal feature
set, leaving the developer to use the tools that best suit
them and their application.
15. Tests? Sure.
require 'sinatra/test/unit
class TestBla < Test::Unit::TestCase
configure do
set :views => File.join(File.dirname(__FILE__), quot;..quot;, quot;viewsquot;))
end
def test_home
get quot;/quot;
assert_equal 200, @response.status
assert @response.body.length > 0
end
def test_submit
post quot;/submitquot;, {:q => quot;fooquot; }
assert_equal 302, @response.status
end
end
16. Deployment
Apache + Passenger
config.ru + public
require “yourapp”
set :environment, :production
run Sinatra::Application