Skip to content
This repository has been archived by the owner on Apr 12, 2018. It is now read-only.

Latest commit

 

History

History
98 lines (63 loc) · 3.22 KB

README.md

File metadata and controls

98 lines (63 loc) · 3.22 KB

GRID Arendal

Build Status Code Climate

GRID-Arendal's new website with a powerful and easy to use Content Management System developed specifically for the project and to meet the identified requirements. This application integrates with Flickr and Exposure two external services that were already being used by the GRID-Arendal's team.

Installation

Requirements:

  • Ruby 2.3.1 How to install
  • PostgreSQL 9.4+ How to install
  • If installing from a clean OS Sierra see below set up
  • Flickr account and application access keys (for media content management)
  • In production you will need an Amazon Web Services S3 Bucket and the access credentials (add to the .env file)

Setup and install application

bin/setup

Or:

Install global dependencies:

gem install bundler

Install project dependencies:

bundle install

First time execute:

cp config/database.yml.sample config/database.yml
cp env.sample .env
# fill in details on your .env file

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

rails db:seed
rails import:activities
rails import:rss
rails initialize:site_sections

OS Sierra

If you are working on a clean installation of Sierra, you will have trouble installing both qt and capybara. This is due to Qt being removed from qt5.6, and qt5.5 and below failing to install on OS Sierra due to changes in Xcode8. Before running the set up above, following the instructions here to install qt55 and manually install the capaybara gem. Once complete run bundle install and then bin/setup: https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit#macos-sierra-1012

Usage

To run application:

bundle exec rails server

TEST

Run rspec:

  bin/rspec

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.

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

BEFORE CREATING A PULL REQUEST

Please check all of these points.