/Ride2Go

distributed mobility federation

Primary LanguageCoffeeScript

ruby 
====
i am using sass for the css
 * install rvm (ruby version manager) https://rvm.beginrescueend.com/
 * run "bundle install" to get haml and sass
 * start "sass --watch sass/:public/css" to convert sass files instant

node
====
follow https://github.com/joyent/node/wiki/Installation to install node

redis
=====
get redis from http://redis.io/download

$ wget http://redis.googlecode.com/files/redis-2.2.12.tar.gz
$ tar xzf redis-2.2.12.tar.gz
$ cd redis-2.2.12
$ make

and start it:

$ src/redis-server

node package manager
====================
 $ curl http://npmjs.org/install.sh | sh
  
thanks to package.json you can simply run 
 $ npm install

it will install
 * jade # template engine
 * socket.io # async channel handling
 * coffee # js on steroids
 * express # rails for node.js

to have the executables installed from npm in you PATH you should add node_modules/.bin 

coffee setup
============
to compile the client javascript files run
 $ coffee -w -o public/js -c client/*.coffee 
 $ find . -not -path "./node_modules*" -not -path "./test*" \
  -not -path "./client*" -name "*coffee" |xargs coffee -w -c

run tests
=========
 $ expresso test/*
 
run specs
=========
 $ ./specs.sh

PATHS
=====
You should set your NODE_PATH to the node directory and to the "lib"

export NODE_PATH=`pwd`/node_modules:`pwd`/lib:/home/user/software/:$NODE_PATH
export PATH=`pwd`/node_modules/.bin:/home/user/software/bin:$PATH

preparation
===========

alternative names
-----------------

you need a redis server with alternative names.
you need alternativenames.txt and admincodes from geonames.org into /tmp
http://download.geonames.org/export/dump/alternateNames.zip
http://download.geonames.org/export/dump/admin1CodesASCII.txt

and then start the redis server with "redis/alt.conf"
it will write a dump to "dumps" of the db after a while

geonames
--------
run the import by:
node.io lib/importers/geonames.coffee
check consitency with 
jasmine-node --coffee --verbose -m geoname_import_ spec


roadmap
-------
we using pivotaltracker at https://www.pivotaltracker.com/projects/130935 for our planing.
use [fixes #storyid] in commit messages