Testing

Uit Petities
Ga naar: navigatie, zoeken

Testing the petities.nl code on your own machine

Assuming your configuration meets the requirements do the following:

Webserver

Enable the Apache www-server on your system ('Web sharing').

MySQL

Startup the MySQL database server if it did not already automatically start at bootup.

Search-engine

To start up the search-engine:

  • Start a Terminal
  • Navigate to the directory with the application. Assuming you installed it in your home-directory this will be "cd ~/Rails/petities.nl/"
  • Start the search-engine with the command "rake ts:start"
  • You can eventually stop the search-engine with the command "rake ts:stop"

Job-worker

The job-worker performs background tasks like sending out e-mails. To get an overview of all the jobs in the queue go to http://petities.local/admin/jobs . When you see records of jobs queued for execution there or when you expect a mail from the system, start the job-worker to have these jobs processed.

  • Start a Terminal
  • Navigate to the directory with the application. Assuming you installed it in your home-directory this will be "cd ~/Rails/petities.nl/"
  • Start the job-worker with the command "rake jobs:work"
  • You can eventually stop the job-worker with the keystroke ctrl-c

Mailcatcher

The site sends out all kinds of e-mails in many stages. It would be inconvenient to have those e-mails actually leave your system to a mailserver. Before the e-mails leave the system you can catch them using Mailcatcher. You can then see the e-mails using a webbrowser pointed at the local IP-address where Mailcatcher runs, mentioned just after startup (usually http://127.0.0.1:1080). You can quit Mailcatcher in that webinterface.

  • Start a Terminal
  • Navigate to the directory with the application. Assuming you installed it in your home-directory this will be "cd ~/Rails/petities.nl/mailcatcher"
  • Start Mailcatcher with the command "mailcatcher"

Tolk

To make the interface multilingual we use Tolk, see petities.local/tolk in your test set-up. This is where you can translate. Load the database with translations (probably tolk.sql). With rake tolk:sync to synchronice the webinterface with the database. To get the translations in the locale files type rake tolk:dump_all and you will have updated locale files. To go to for example the English translation see http://petities.local/?locale=en To see changes you made through petities.local/tolk in the interface, make a dump again with rake tolk:dump_all