Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (16 sloc) 0.6 kB
require 'rubygems'
require './lib/faye'
task :example, :port do |t, args|
system "rackup -s thin -E production -p #{args[:port]} examples/rack/config.ru"
end
task :handshake, :port, :n, :c do |t, args|
require 'cgi'
require 'json'
message = {:channel => '/meta/handshake',
:version => '1.0',
:supportedConnectionTypes => ['long-polling']}
message = CGI.escape(JSON.dump message)
url = "http://127.0.0.1:#{args[:port]}/bayeux?jsonp=callback&message=#{message}"
puts "Request URL:\n#{url}\n\n"
system "ab -n #{args[:n]} -c #{args[:c]} '#{url}'"
end
Jump to Line
Something went wrong with that request. Please try again.