Skip to content

GlobalOncology/GCPM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GCPM - Global Cancer Project Map

TODO: Write a project description

Requirements:

Vagrant

If you wish to have a hands-off setup, you can get the application running with vagrant by running vagrant up in the project root.

Database connection

You can connect to the database using GUI tools like pgAdmin by connecting via port 5432 on your local machine with the following credentials:

Installation

Install project dependencies:

gem install bundler && bundle install

Set up environment variables by copying .env.sample to .env and filling up the necessary values accordingly See also the CartoDB integration section for information on how to configure your CartoDB account.

To set up the database, run:

	bundle exec rake db:create
	bundle exec rake db:migrate

To add existing data, run:

	bundle exec rake db:seed
	bundle exec rake db:geo
	bundle exec rake events:create
	bundle exec rake layers:import

Running

To run application:

	bundle exec rails server

To send periodic notification emails to users, run the following rake task using cron or a similar tool:

	rake notifications:send

Development

Test

Run rspec:
	bin/rspec
Run teaspoon:
	rake teaspoon
Run cucumber:
	rake cucumber
Run all (cucumber, spec):
	rake

capybara-webkit depends on a WebKit implementation from Qt (version >= 4.8), a cross-platform development toolkit. You'll need to download the Qt libraries to build and install the gem. more

OS X Mavericks:

	brew update
	brew install qt

In cucumber, tag scenarios with '@javascript' to run them using a headless WebKit browser.

In RSpec, use the 'js: true' flag. See the capybara documentation for more information about using capybara with RSpec.

CartoDB integration

This project requires a CartoDB account to be configured in the .env files In your CartoDB account, you should add these custom functions

Restoring from .bak backup

To restore from a .bak backup file, simple run the command pg_restore -h localhost -p 5432 -U postgres -d gcpm_development -v "backup_file.bak" --single-transaction --clean, and enter the password.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b feature/my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin feature/my-new-feature
  5. Submit a pull request :D