Skip to content
This repository was archived by the owner on Jan 21, 2025. It is now read-only.

Programming Standards

Derkje-J edited this page Apr 20, 2013 · 8 revisions

This page containes information about the programming standards.

Languages and frameworks

  • Backend language: Ruby on Rails
  • CSS extension: SASS
  • AJAX with REST
  • HTML5

Coding style

http://www.caliban.org/ruby/rubyguide.shtml#style contains the guidelines for coding Ruby on Rails. All Ruby code will be formatted using the this (add link) Ruby script. All SASS code is formatted using indent, and SASS is configured to format it's output CSS using the newer .scss stylesheet format. Development uses the expanded style option. Releases are formatted using the compressed style option.

Testing

Setup

The basic testing should already work, because the necessary files are in the repo. If the bundle install fails, run sudo apt-get install libxslt-dev libxml2-dev. For coverage support, make sure you have the newest version of nodejs and install istanbul with the following commands:

  • sudo npm install -g n
  • sudo n 0.10.4
  • sudo npm install -g istanbul

On windows:

  • Go to http://nodejs.org/ and install the latest node (0.10.4)
  • start the dev kit
  • npm install -g istanbul

Running the tests

To check tests you can do either of three things:

  • Go to siteroot/teabag
  • Run rake teabag (use rake teabag DRIVER=selenium on windows if phantomjs fails)
  • Run bundle exec teabag ( use rake teabag DRIVER=selenium COVERAGE=true COVERAGE_REPORTS=text,html )

The latter of these will automatically generate coverage reports in the folder /coverage.

Clone this wiki locally