Sha256: 04cb319a591031290d9f198372c4f3913bc0f0a69009d2d2838d0122e1129f99
Contents?: true
Size: 981 Bytes
Versions: 1
Compression:
Stored size: 981 Bytes
Contents
# This is an example of using the websockets formatter. # # The web application is made with Ember.js. Also, even though some commands # might run in parallel, their output will appear properly in the web view. # # To run this: rake examples:websockets dir = File.expand_path("../websockets", __FILE__) formatter :default formatter :table run "start server" do `bundle exec thin -e production -R #{File.join(dir, "server.ru")} -p 9292 -d start` end # give the server some time to start run "sleep 1" # opens the web page with the ember.js app run "open client" do `bundle exec launchy http://localhost:9292/` end # how unbelievable meta! :) run "scripted with websocket formatter" do `bundle exec scripted -f websocket -o http://localhost:9292/faye` end # keep the connection open for just a bit longer run "sleep 1" # forcefully shut down, because websocket connections will cause a timeout anyway run "shutdown server" do `bundle exec thin -f stop` forced! end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
scripted-0.0.1 | examples/websockets.rb |