Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/karmi/yaml_micro_chat
YAML based micro-chat in Sinatra framework for Ruby
https://github.com/karmi/yaml_micro_chat
Last synced: 3 months ago
JSON representation
YAML based micro-chat in Sinatra framework for Ruby
- Host: GitHub
- URL: https://github.com/karmi/yaml_micro_chat
- Owner: karmi
- License: mit
- Created: 2008-06-29T15:51:55.000Z (over 16 years ago)
- Default Branch: master
- Last Pushed: 2015-09-30T21:54:54.000Z (about 9 years ago)
- Last Synced: 2024-05-31T20:02:35.156Z (5 months ago)
- Language: Ruby
- Homepage: http://blog.karmi.cz/
- Size: 199 KB
- Stars: 31
- Watchers: 4
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.rdoc
- License: MIT-LICENSE.txt
Awesome Lists containing this project
README
= YAML-based micro chat with Sinatra
=== About
This mini-application demonstrates the elegance and power of the Ruby language,
the Sinatra micro-framework and the Protoype JavaScript library.It consists of six files for every essential aspect of the application:
* The chat.rb file, which holds the application logic (loading and saving the messages)
* The index.html file, which defines the GUI of the application
* The screen.css which defines the visual style of the application
* The aplication.js (and prototype.js) files which enable rich interactivity
(continuous updating and instant posting)
* The messages.yml file which holds the data in YAML format (rename the messages.example file)The layers are thus properly separated even in this micro-application.
It degrades finely for browsers without JavaScript enabled.It even features simplistic Unit tests for the application (see test directory)
=== Installation
Unpack the application, rename messages.example to messages.yml and run
ruby chat.rb
in the application directory in the console. You will see something like:== Sinatra has taken the stage on port 4567!
Then point your browser to:http://localhost:4567
=== Resources
* Sinatra micro-framework: http://sinatra.rubyforge.org
* Prototype JavaScript library: http://www.prototypejs.org/
* Unobtrusive JavaScript: http://en.wikipedia.org/wiki/Unobtrusive_JavaScript=== Credits
The application was created by Karel Minařík (www.karmi.cz)