UPDATE ZenTest

This repos uses a lot of old dependencies. This can't be good : there
have been 14 new rails versions since the one used here.

While this will need to be migrated to rails-4 in a not so far future,
there is something that can't wait : updating ZenTest.

Trying to install dependencies right now using ruby-2.0 with `bundle
install` trigger this error :

    Installing ZenTest (4.7.0)
    Gem::InstallError: ZenTest requires RubyGems version ~> 1.8. Try 'gem update --system' to update RubyGems itself.

That's because ruby-2.0 uses rubygems-2.0, and ZenTest enforce using 1.8
branch. Updating ZenTest solves this without breaking specs.

I'm not even sure why ZenTest has been added to bundle, actually. We
used that back in time for autotest, but it has now been superseed by
guard, which is also included in bundle.

As ZenTest has some other features than autotest, I won't remove it
right now and wait to be more aclimated to codebase.
Merge pull request #5 from oelmekki/update_zentest

UPDATE ZenTest
REFACTOR switch to postgres

Database has been changed to use postgres rather than sqlite.

Database credentials has to be provided as environment variables :

* `PROPILE_DEV_DB_NAME`
* `PROPILE_DEV_DB_USER`
* `PROPILE_DEV_DB_PASS`
* `PROPILE_TEST_DB_NAME`
* `PROPILE_TEST_DB_USER`
* `PROPILE_TEST_DB_PASS`
* `PROPILE_PROD_DB_NAME`
* `PROPILE_PROD_DB_USER`
* `PROPILE_PROD_DB_PASS`

Only the first six are needed for a typical development box.

Using environment variables is a good thing because :

* each developer may use configuration she wants on her box
* credentials are not committed in repos (especially important here
  since it's a public repos)

Instructions has been added in readme to explain installation.

Migration was quite straightforward, with those few problems :

* database reset was ensured by loading schemas, which doesn't work with
  postgres
* id were hardcoded in specs, counting of schemas load to reset id
  counter
* an UPPER function was used against a datetime field (created_at),
  which does not work in postgres without a type cast.

Please not that database configuration here are for local use, because
(unless it has changed since last year) heroku override
config/database.yml with its own configuration (but this should have no
negative impact).

Close #1

Details :

* ADD pg gem
* CHANGE database configuration
* ADD installation instructions in readme
* FIX UPPER typecast for postgres (and fix sql injection btw)
* REFACTOR remove attempt to recreate db from spec_helper (thefuck?)
* ADD database_cleaner
* FIX hardcoded id in in programs controller spec
* FIX implicit id in program entries controller spec
Merge pull request #8 from oelmekki/postgres

REFACTOR switch to postgres + misc. fix
ADD seed.rb

`data/development.sqlite.backup` has been converted as seed ruby file.

A few things to note about that :

* backup database was outdated and missing a lot of migrations
* data contained was not valid anymore

Data was fixed to fullfill validations. As it was mostly fk pseudo
constraints, it can be considered quite safe, even if we don't get the
whole codebase for now.

Seeding database is fully destructive, wipping all data from database.
This ensures we can force records id. As such, it should only be run as
a setup step (and well, it's all it's about, after all).

Fix #3
Merge pull request #9 from oelmekki/seed

ADD seed.rb
ADD documentation

Added a bit of documentation about how to setup app and what I
understand of its design.

This should be completed / updated when digging into code to avoid
others wasting time.
UPDATE rails and gems

 # A pacific app

All resources' destroy routes has previsouly been disabled in
`config/routes.rb`, to "prevent the review without session problem from
happening again" ([see
commit](https://github.com/agile-france/propile/commit/b9606659a425b4ba09bb25a339ee4c44a8abc1e9).

This sounds like a panic fix and a radical measure : it is not possible
anymore to delete anything from webinterface. This will have to be fixed
in a reasonable way at some point, providing we understand what the
original problem was (there is absolutely no documentation about that,
the only information we can have is from issue
[#62](https://github.com/rwestgeest/propile/issues/62) with ... "no
description given").

Anyway, tests for destroy actions were still there. While it was not a
problem with previous versions of rails and rspec, controller spec now
checks if a given action is bound to a route before trying to execute
it. This caused all `#destroy` specs to failed, except the one for
ArchivedPresentersController, which has been marked as `broken: true`
(and thus, not executed).

Marked all others as broken as well. To be fixed the sooner possible.

 # Config page

`#form_for` on `PropileConfigs#index` were passed a nil  model, counting
on `:url` options to set proper path. This is not possible anymore, pass
a mock PropileConfig model to fix it.

 # Gem changed

World :

* bcrypt-ruby (3.1.2)
* bcrypt-ruby (3.1.2-x86-mingw32)
* capybara (2.1.0)
* execjs (2.0.2)
* factory_girl (4.3.0)
* factory_girl_rails (4.3.0)
* guard (2.2.3)
* guard-rspec (4.0.4)
* haml (4.0.4)
* haml-rails (0.4)
* jquery-rails (3.0.4)
* pg (0.17.0-x86-mingw32)
* rails (3.2.15)
* rake (10.1.0)
* recaptcha (0.3.5)
* rspec (2.14.1)
* rspec-rails (2.14.0)
* sass (3.2.12)
* sass-rails (3.2.6)
* shoulda-matchers (2.4.0)
* therubyracer (0.12.0)
* uglifier (2.3.1)
* vlad (2.6.2)

Dependencies :

* actionmailer (3.2.15)
* actionpack (3.2.15)
* activemodel (3.2.15)
* activerecord (3.2.15)
* activeresource (3.2.15)
* activesupport (3.2.15)
* afm (0.2.0)
* builder (3.0.4)
* celluloid (0.15.2)
* coderay (1.1.0)
* coffee-script-source (1.6.3)
* diff-lcs (1.2.5)
* ffi (1.9.3)
* ffi (1.9.3-x86-mingw32)
* hashery (2.1.1)
* hike (1.2.3)
* i18n (0.6.5)
* journey (1.0.4)
* json (1.8.1)
* libv8 (3.16.14.3)
* listen (2.2.0)
* mail (2.5.4)
* method_source (0.8.2)
* mime-types (1.25)
* mini_portile (0.5.2)
* multi_json (1.8.2)
* nokogiri (1.6.0)
* nokogiri (1.6.0-x86-mingw32)
* pdf-reader (1.3.3)
* pry (0.9.12.3)
* pry (0.9.12.3-x86-mingw32)
* rack (1.4.5)
* rack-ssl (1.3.3)
* rack-test (0.6.2)
* railties (3.2.15)
* rake-remote_task (2.2.1)
* rb-inotify (0.9.2)
* rdoc (3.12.2)
* ref (1.0.5)
* rspec-core (2.14.7)
* rspec-expectations (2.14.4)
* rspec-mocks (2.14.4)
* slop (3.4.6)
* sprockets (2.2.2)
* thor (0.18.1)
* tilt (1.4.1)
* timers (1.1.0)
* treetop (1.4.15)
* tzinfo (0.3.38)
* xpath (2.0.0)

 # Details

* UPDATE rails and gems
* REFACTOR replace factory_girl old #after_create syntax
* REFACTOR marks all destroy actions as broken
* REFACTOR config page

Close #7
Merge pull request #11 from oelmekki/documentation

ADD documentation
Merge pull request #10 from oelmekki/update_rails

UPDATE rails and gems
Set ruby version matching rbenv

add dotenv and review database.yml for pg

Add missing test env variables
Merge pull request #14 from yaf/master

Set ruby version matching rbenv
change logo and email -- dboissier
ADD mailcatcher

[Mailcatcher](https://github.com/sj26/mailcatcher) is a smtp proxy that
catch any outbound mail and presents it in a web interface, ensuring no
email goes outside our dev box.

This will make it easier to debug mail related features, which are
currently about sending mails to real people or not sending mails at
all.

Project owner recommands not to include it in Gemfile, so it has to be
installed locally by developpers :

    gem install mailcatcher

Then, to be able to see mails running :

    mailcatcher

this will create a server on port 1080 (specified in command output).

It is ok not to install mailcatcher or running it as it won't hurt
application runtime - you just won't be able to see mails.

Accordingly, code that enables / disables mail sending has been removed,
since getting mails content is just about running mailcatcher.

Close #12

Details :

* ADD mailcatcher configuration
* ADD doc about mailcatcher in readme
* REMOVE dev mail sending toggler
Merge branch 'master' of https://github.com/agile-france/propile
[Conf] add env var PROPILE_PROD_DB_HOST
ADD integration test layer

A lot of errors happen while running the app in browser and are simply
not catched in tests.

That's because only unit testing is performed, giving a false sense of
security.

We need to add an integration test layer as well to be sure features
actually work.

As this has not been done from start and writing a complete test suite
would take too long, let just add new integration tests for bugs we
resolve and features we add.

Needed for #13
Merge pull request #16 from oelmekki/mailcatcher

ADD mailcatcher
Merge pull request #17 from oelmekki/integration_tests

ADD integration test layer
FIX account creation

Account creation from configuration page is now complete. It seems this
feature actually was never finished, since :

1. it contains a "name" input that does not reflect in database
2. it creates accounts, but they can't be confirmed

Added confirmation action so that created users receive a confirmation
email with a link to confirm their account. Once confirmed, they are
immediately displayed password edition form.

When a maintainer create an account, he's now warned a confirmation mail
has been sent.

Close #13

Details :

* ADD Account#confirmation_token
* ADD generate confirmation_token for new accounts
* ADD accounts#confirm
* ADD confirmation mailer
* REFACTOR send confirmation email on presenters#create
* REFACTOR warns confirmation has been sent when creating account
* UPDATE readme