diff --git a/MacInstallation.md b/MacInstallation.md index 1333ed77..a6e47436 100644 --- a/MacInstallation.md +++ b/MacInstallation.md @@ -1 +1,40 @@ -TODO +install homebrew + + \curl -sSL https://get.rvm.io | bash -s stable --rails + + rvm install 1.9.3 --with-gcc=clang + + rvm use 1.9.3 + + gem install lunchy + +(http://www.moncefbelyamani.com/how-to-install-postgresql-on-a-mac-with-homebrew-and-lunchy/) + + + brew install postgresql + ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents + createuser metamaps -P -s -d + +set a password + + lunchy start postgres + + +cd into the metamaps directory + + bundle install + + +copy the database.yml.default file and rename it database.yml +make sure the username and password match the POSTGRES username and password you set + + +http://nodejs.org/ hit install, download, open, install + + + rake db:create + rake db:schema:load + rake db:fixtures:load + rails s + +( to start the server) diff --git a/app/assets/javascripts/src/Metamaps.js b/app/assets/javascripts/src/Metamaps.js index 7455f046..053fda2a 100644 --- a/app/assets/javascripts/src/Metamaps.js +++ b/app/assets/javascripts/src/Metamaps.js @@ -1458,7 +1458,7 @@ Metamaps.Realtime = { }); $('body').click(self.close); - self.socket = io.connect('http://gentle-savannah-1303.herokuapp.com'); + self.socket = io.connect('http://localhost:5001'); self.startActiveMap(); }, toggleBox: function (event) { @@ -1635,6 +1635,15 @@ Metamaps.Realtime = { $('#mapper' + data.userid).remove(); $('.realtimeMapperList ul').append(mapperListItem); +<<<<<<< HEAD + // create a div for the collaborators compass + $('#compass' + data.userid).remove(); + $('
', { + id: 'compass' + data.userid, + class: 'collabCompass' + }).html(''+data.username+'
').appendTo('#wrapper'); + +======= // create a div for the collaborators compass $('#compass' + data.userid).remove(); $('', { @@ -1643,6 +1652,7 @@ Metamaps.Realtime = { class: 'collabCompass' }).appendTo('#wrapper'); } +>>>>>>> fe1f35d63eda20b39e97f11c8bb75135281d5b98 }, newPeerOnMap: function (data) { var self = Metamaps.Realtime; @@ -1659,6 +1669,35 @@ Metamaps.Realtime = { }; // create an item for them in the realtime box +<<<<<<< HEAD + var mapperListItem = ''+data.username+'
').appendTo('#wrapper'); + + Metamaps.GlobalUI.notifyUser(data.username + ' just joined the map'); + + // send this new mapper back your details, and the awareness that you've loaded the map + var update = { + userToNotify: data.userid, + username: Metamaps.Active.Mapper.get("name"), + userimage: Metamaps.Active.Mapper.get("image"), + userid: Metamaps.Active.Mapper.id, + userrealtime: self.status, + mapid: Metamaps.Active.Map.id + }; + socket.emit('updateNewMapperList', update); +======= if (data.userid !== Metamaps.Active.Mapper.id) { var mapperListItem = '