Check that new opinion can be registered in socket.js based on the openForOpinions date interval. Modify error messages returned in the REST API and logged to console
added callback to canRetrieveNewOpinions and added listening on error event in topicController when saving new opinion
Replaced PORT with process.env.PORT so it can retrieve the port number from command line or Grunt
Set milliseconds to 0 to avoid comparasion on milliseconds
Removed env variables for HQ and Heroku in the uristring. Made uristring beeing aware of the environments (test, prod and dev) the app is running within so it can connect to different DBs. This makes testing easier
Describe schema for Event so it is possible to create Mongoose objects in tests
Move all validation to the validators.js and use them from socket.js when newOpinion event is received
Add jshint rules to match the one that are described in the README. However, we need to cleanup the code before running it each time we files are changed.
Added new dependencies and grunt tasks in order to run tests and prepare for minimizing of img, css and html in the future
Added 37 new tests of dates.js, validators.js, sockets.js and app.js
Use bower for external dependencies
Add readonly flag for each topic based on if topic is done and if event is open for new opinions. the readonly is now used for telling if graph or form should be displayed
Print out newopinion in console when
Renamed function to validateRateValue. Since mongoose schema is created for Event mongoose returns voteQuestion with empty array of choices even if no votequestion has been added. This broke if test in graphDirective for voteQuestions.
Updated frontend dependencies in bower to latest one
Moved logic for setting if topic is readonly to topicController where it belongs to
Added dependency to bower in package.json
Restructured variables for appServer, adminApp and env
Removed ; and empty new lines at the end
Removed ; and empty new lines at the end