lib/jellyfish/test.rb in jellyfish-1.0.0 vs lib/jellyfish/test.rb in jellyfish-1.0.1

- old
+ new

@@ -1,15 +1,16 @@ -require 'bacon' -require 'rack' +require 'pork/auto' +require 'muack' require 'jellyfish' +require 'rack' -Bacon.summary_on_exit +Pork::Executor.__send__(:include, Muack::API) -shared :jellyfish do - %w[options get head post put delete patch].each do |method| - instance_eval <<-RUBY +copy :jellyfish do + module_eval(%w[options get head post put delete patch].map{ |method| + <<-RUBY def #{method} path='/', app=app, env={} File.open(File::NULL) do |input| app.call({'PATH_INFO' => path , 'REQUEST_METHOD' => '#{method}'.upcase, 'SCRIPT_NAME' => '' , @@ -18,13 +19,7 @@ 'SERVER_NAME' => 'localhost' , 'SERVER_PORT' => '8080'}.merge(env)) end end RUBY - end -end - -module Kernel - def eq? rhs - self == rhs - end + }.join("\n")) end