EventR
Getting started
Ruby version
We're currently using version 2.3.0.
RVM
Update to the latest version and install ruby 2.3.0 and the latest bundler:
rvm get latest rvm install ruby-2.3.0 rvm use --create 2.3.0@eventr gem install bundler
Rbenv
Update to the latest version and install ruby 2.3.0 and the latest bundler:
brew update # update brew's formulas brew upgrade rbenv # upgrade to the latest rbenv brew upgrade ruby-build # upgrade to the latest ruby build rbenv install 2.3.0 rbenv shell 2.3.0 gem install bundler
QT
We're using WebKit in our test suite. So we need to install QT in order to compile WebKit:
brew update brew install qt
For QT versions 5.5 and later, the package is keg only, so you need to symlink binaries like qmake.
For instructions, see: https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit#homebrew
PostgreSQL
We're using PostgreSQL version 9.2.4. Update brew to install the latest version:
brew update brew install postgresql
Follow brew's steps to create the default database and make postgres autoload on system startup.
Database
Create the database user with correct role:
psql -h localhost postgres -c "create user eventr with password 'eventr' CREATEDB"
When asked for a password, use the following command instead and use eventr as the password:
createuser -P -S -d -R -l -e eventr
As user postgres set up hstore extention:
psql template1 -c 'create extension hstore'
Source
git clone git@github.com:GEANT/eventr.git cd eventr
Running
bundle install rake db:create db:migrate db:test:clone db:seed
You're now ready to run the project:
rails server
Test
Run the complete test suite with:
rspec
Run only the feature tests:
rspec spec/features
LocaleApp
We use LocaleApp to manage static content. The translation files are hosted at http://www.localeapp.com/projects/4957.
To update the local translation files, run:
bundle exec localeapp pull # or alias this as 'belp'
Deployment
Available environments
- Integration: git clone gitolite@rasputin.terena.org:eventr-int - https://eventr-int.terena.org/
- Production: git clone gitolite@rostov.terena.org:eventr - https://eventr.terena.org/
Set up Google Calendar syncing
- Install gem 'google-api-client'
- Sign in to your google account and visit: https://console.developers.google.com
- Click on APIs & auth/Credentials - Create new client ID (under OAuth)
- Select service account
- Copy private key to your local folder: ~/.eventr/<key>
- Sign in to the account of which you want to share the google calendar
- Click on settings/calendars and edit settings of the calendar you want to share
- In the field Share with specific people add the developer email address: xxxxxx@developer.gserviceaccount.com
- select proper permissions and click on SAVE
- The parameters you pass should contain calendarId. You can obtain these from: settings/calendars/calendar details
- Rename config/secrets.example.yml to config/secrets.yml and adjust the values where necessary