Sha256: 21bfbd9ef693e700d856a459bfdb0ab27dee7db30e6146deb760ba740e5faf14

Contents?: true

Size: 600 Bytes

Versions: 1

Compression:

Stored size: 600 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
faye-0.6.0 Rakefile