upgrade to rails 3.2.11 to avoid the recent CVE annoucements
Added postgresql support.
Corrected build output encoding problems.

Depend on charlock_holmes gem for encoding detection.
New Build#read_tmp_file method to correctly read the tmp file. This can
contain anything from the build process, so we cannot rely on
default_external encoding when we read in this file. We must read the
file, detect its encoding and convert it to utf-8 replacing invalid
sequences.
Build#compose_output was changed to call this new method.
Only read tmp_file if it's readable.
Sanitize build output before writing to database.

Build output must also be sanitized when writing to database. If the
database has connection encoding configured to utf-8 (as it should)
updating the trace attribute with non utf-8 data will cause an
exception in runner. This will leave the build in a stuck running
state, even if the process terminates some time after. This is a
separate bug that needs to be addressed in a different commit.
Fixup cd command order
Merge pull request #88 from zxqfox/patch-1

Fixup cd command order
stats page for project
Implement minimal public access
Merge pull request #75 from razielgn/master

Postgres support
Fix last_build_date for project
dont read non-exists file
Merge pull request #73 from jameswritescode/update_to_rails_3.2.11

upgrade to rails 3.2.11 to avoid the recent CVE annoucements
fix typo
Merge branch 'master' of https://github.com/cabeca/gitlab-ci into cabeca-master

Conflicts:
	app/models/build.rb
Gemfile.lock
GitlabCi::Encode lib
Merge branch 'cabeca-master'
replace will_paginate with kaminari