Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
bmizerany committed Jan 22, 2009
1 parent aaf08c7 commit ff86c25
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
10 changes: 10 additions & 0 deletions examples/multiapp.ru
@@ -0,0 +1,10 @@
require 'rubygems'
require File.dirname(__FILE__) + '/../lib/sinatra/base'

use Sinatra do
get '/' do
'hello'
end
end

run(lambda { |env| [200, {}, "Not it!"] })
7 changes: 6 additions & 1 deletion lib/sinatra/base.rb
Expand Up @@ -6,6 +6,11 @@
module Sinatra module Sinatra
VERSION = '0.9.0.2' VERSION = '0.9.0.2'


def self.new(app, &blk)
Application.instance_eval(&blk)
Application.new(app)
end

class Request < Rack::Request class Request < Rack::Request
def user_agent def user_agent
@env['HTTP_USER_AGENT'] @env['HTTP_USER_AGENT']
Expand Down Expand Up @@ -751,7 +756,7 @@ def metadef(message, &block)
<style type="text/css"> <style type="text/css">
body { text-align:center;font-family:helvetica,arial;font-size:22px; body { text-align:center;font-family:helvetica,arial;font-size:22px;
color:#888;margin:20px;background-image:url(/__sinatra__/legend.gif); color:#888;margin:20px;background-image:url(/__sinatra__/legend.gif);
background-repeat:no-repeat;background-position:center top;} background-repeat:no-repeat;background-position:left top;}
#c {margin:0 auto;width:500px;text-align:left} #c {margin:0 auto;width:500px;text-align:left}
</style> </style>
</head> </head>
Expand Down

0 comments on commit ff86c25

Please sign in to comment.