A simple Group Chat application written during the April 28th Toronto Ruby Hack Night.
The goal was to create a real time web application using Rails and Faye.
Feel free to browse the source and commit history to get a feel for how it works so you can use it in your own app.
We all learnt a lot by developing this app and it was a very successful Hack Night!
We started to extend the app to look for ISBN numbers through Amazon’s API.
The purpose was to experiment with Event Machine for it’s asynchronous non-blocking support, as suggested by Ian Ha.
We also added Faye channels to prevent XSS attacks from chat messages and made the app look nicer.
Once again, it was an excellent learning experience using advanced concepts which we can all take and use in our everyday apps!
The app is currently a work in progress, therefore the Setup and Implementation sections will be updated once it is finalized. Feel free to look at source code until then.
Execute this line from the app’s root directory to run Faye:
rackup faye.ru -s thin -E production
In order to run on anything but localhost
, change the IP in the file /config/faye.yml
, and don’t forget to also run one of the files in the /lib
folder; like so:
ruby bayes_classifier.rb
Click on the “Sign in with Twitter” link to set your Username to your Twitter Username.
You can also enter your Username in the Text Field if you haven’t signed in with Twitter.
Pressing the “Up” and “Down” arrow keys on the keyboard when the Message Text Box is in focus will traverse through your history of sent messages (like your Terminal).
-
Tasveer Singh (@tazsingh)
-
Dann Toliver (@dann)
-
Aaron McLeod (@agmcleod)
-
Alex Chesser (@fstrnet)
-
Nick Hoffman (@nphoffman)
-
Ian Ha (@ianpha)
-
Victor Stan (@victorbstan)
-
Morgan Tocker (@morgo)
Feel free to extend this app and send me pull requests!