examples/autobahn_client.rb in faye-websocket-0.10.7 vs examples/autobahn_client.rb in faye-websocket-0.10.8

- old
+ new

@@ -1,15 +1,17 @@ -require 'rubygems' require 'bundler/setup' require 'cgi' require 'faye/websocket' require 'permessage_deflate' require 'progressbar' EM.run { - host = 'ws://localhost:9001' - ruby = RUBY_PLATFORM =~ /java/ ? 'jruby' : 'cruby' - agent = CGI.escape("#{ruby}-#{RUBY_VERSION}") + ruby = RUBY_PLATFORM =~ /java/ ? 'jruby' : 'mri-ruby' + version = defined?(RUBY_ENGINE_VERSION) ? RUBY_ENGINE_VERSION : RUBY_VERSION + version += " (#{RUBY_VERSION})" if ruby == 'jruby' + + host = 'ws://0.0.0.0:9001' + agent = CGI.escape("#{ruby}-#{version}") cases = 0 options = {:extensions => [PermessageDeflate]} socket = Faye::WebSocket::Client.new("#{host}/getCaseCount") progress = nil