Sha256: eab075f9e555564cfa969335080fd0ba2e35b2638bcaae44f7fef5222218d382
Contents?: true
Size: 867 Bytes
Versions: 3
Compression:
Stored size: 867 Bytes
Contents
require 'pork/auto' require 'muack' require 'jellyfish' require 'rack' Pork::Suite.include(Muack::API) copy :jellyfish do module_eval(%w[options get head post put delete patch].map{ |method| <<-RUBY def #{method} path='/', a=app, env={} File.open(File::NULL) do |input| a.call({'PATH_INFO' => path , 'REQUEST_METHOD' => '#{method}'.upcase, 'SCRIPT_NAME' => '' , 'rack.input' => input , 'rack.url_scheme'=> 'http' , 'SERVER_NAME' => 'localhost' , 'SERVER_PORT' => '8080'}.merge(env)) end end RUBY }.join("\n")) end copy :stringio do def new_stringio sock = StringIO.new sock.set_encoding('ASCII-8BIT') sock end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
jellyfish-1.2.2 | lib/jellyfish/test.rb |
jellyfish-1.2.1 | lib/jellyfish/test.rb |
jellyfish-1.2.0 | lib/jellyfish/test.rb |