/internal.isfit.org

internal.isfit.org

Primary LanguageCSS

Internal.isfit.org

This application is ISFiTs internal pages. The main functionality is to serve the festivals need of internal systems such as an editorial and application system.

Install ruby and rubygems on your computer

We recommend using rvm (beginrescueend.com/) On linux: (OBS: You should not use sudo on the following commands if not specified) Install RVM:

$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

Reload your shell

$ source ~/.bash_profile

Find all requirements. This command will list requirements for different versions of Ruby. We want to use MRI Ruby, so just copy all names of the dependencies, and install them with apt-get (Use sudo here)

$ rvm requirements

Install ruby!

$ rvm install 1.9.3

To start develop the this application, you have to do the following steps:

  1. Get access to this repository (Ask Dag-Inge)

  2. Clone this project with the following command:

git clone git://github.com/isfit/internal.isfit.org.git
  1. Install bundler gem, so you can install the rest later (only first time)

gem install bundler
  1. Cd into the directory and install all the gems:

bundle install --without production
  1. Connect to the database (Not necessary, but it has a lot of test-data and you will need it if you update some views) Again, ask Dag-Inge for password.

  2. Start up the rails server inside the internal.isfit.org - directory

rails server
  1. Go to localhost:3000 and it should work on your own computer!

This application includes som views from other applications as isfit.org, studentpeaceprize.org, core.isfit.org and participant.isfit.org. When updating tables in the other applications, some simple steps should be followed to ensure that everything still works as it should.

  1. Update the view in the internal development database at the isfit-server (Ask Dag-Inge for password)

CREATE OR UPDATE VIEW users AS SELECT * FROM ....
  1. Update the schema-file in this rails-application. If you forget, some tests will probably fail.

bundle exec rake db:schema:dump

Testing

The application has some tests, but far from 100% test coverage. However, the tests that are on the application should never be broken. To ensure this, you should always run guard when developing. Simply type the following command from the application root to start up guard

bundle exec guard

Using guard makes it extremly easy to do test-driven development (TDD). You write the test, and guard will tell you that i does or not pass at the moment. When the tests and the implementation are written, guard should send you a green ok-message, and everybody will be happy!

Don’t skip writing a test to your code, and do it before your code. It is so boring you may say? I can guarantee you a EXTREME PLEASURE after making a test green. You managed to fix a bug (test), and are a true hero.

Build status

<img src=“https://secure.travis-ci.org/isfit/internal.isfit.org.png” />