Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

don't worry about this for now

  • Loading branch information...
commit f5c532306eed3d1f40a338c4b3ca68f67953e43c 1 parent 0302501
blake.mizerany@gmail.com authored
View
3  vendor/responder/init.rb
@@ -1,3 +0,0 @@
-require File.dirname(__FILE__) + '/lib/responder'
-
-Sinatra::EventContext.send(:include, Sinatra::Responder)
View
27 vendor/responder/lib/responder.rb
@@ -1,27 +0,0 @@
-module Sinatra
-
- module Responder
-
- def self.included(parent)
- parent.send(:include, InstanceMethods)
- end
-
- class ResponderContext
- def initialize(format)
- @format = format
- end
-
- def method_missing(name, *args)
- yield if name.to_s == @format
- end
- end
-
- module InstanceMethods
- def format
- @responder_context ||= ResponderContext.new(params[:format])
- end
- end
-
- end
-
-end
View
13 vendor/responder/test/responder_test.rb
@@ -1,13 +0,0 @@
-require File.dirname(__FILE__) + '/../../../test/helper'
-
-context "A responder, by default" do
- specify "should default to html" do
- path = '/foo/test.xml'
- context = Sinatra::EventContext.new(stub(:params => { :format => 'xml' }))
- context.expects(:foo)
- context.instance_eval do
- format.xml { foo }
- format.html { bar }
- end
- end
-end
Please sign in to comment.
Something went wrong with that request. Please try again.