Sha256: 11a4718e640823e5b8e80d7593d0e07d2d21321e8e100498766f2bc40f6fb8cc

Contents?: true

Size: 780 Bytes

Versions: 2

Compression:

Stored size: 780 Bytes

Contents

require 'pork/auto'
require 'muack'
require 'jellyfish'
require 'rack'

Pork::Executor.__send__(:include, Muack::API)

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'    => ''                ,
                    'rack.input'     => input             ,
                    'rack.url_scheme'=> 'https'           ,
                    'SERVER_NAME'    => 'localhost'       ,
                    'SERVER_PORT'    => '8080'}.merge(env))
        end
      end
    RUBY
  }.join("\n"))
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jellyfish-1.0.2 lib/jellyfish/test.rb
jellyfish-1.0.1 lib/jellyfish/test.rb