This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
require 'sinatra/strands' | |
require 'haml' | |
helpers do | |
def message locals={} | |
haml :message, | |
:locals => {:uri => strand_uri }.merge(locals) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra/base' | |
require 'fiber' | |
module Sinatra | |
module Strands | |
REQUEST_METHODS = [:get,:put,:post,:delete] | |
class Strand | |
def initialize *args, &block | |
@secure_id = object_id # TODO: not actually secure | |
@fiber = Fiber.new do |
NewerOlder