All of the code that runs on worldcubeassociation.org
Clone or download
jfly Upgrade to bundler 2.
I followed the instructions on
https://bundler.io/blog/2019/01/03/announcing-bundler-2.html, which said
to run `bundle update --bundler`, which didn't seem to affect our
lockfile much.
Latest commit 8f34f9a Jan 16, 2019

README.md

worldcubeassociation.org Build Status Coverage Status

This repository contains all of the code that runs on worldcubeassociation.org.

Setup

  • git clone https://github.com/thewca/worldcubeassociation.org - Clone this repo! (And navigate into it, cd worldcubeassociation.org)
  • (cd WcaOnRails; bundle install && bundle exec pre-commit install) && git config pre-commit.ruby "scripts/ruby_in_wca_on_rails.sh" - Set up git pre-commit hook. Optional, but very useful.

Run directly with Ruby (lightweight, but only runs the Rails portions of the site)

  • Set up mysql with a user with username "root" with an empty password.
    1. cd WcaOnRails/
    2. bundle install && bin/yarn
    3. bin/rake db:load:development - Download and import the developer's database export.
    4. bin/rails server - Run rails. The server will be accessible at localhost:3000
  • Run tests. Setup instructions follow before_script in .travis.yml.
    1. RAILS_ENV=test bin/rake db:reset - Set up test database.
    2. RAILS_ENV=test bin/rake assets:precompile - Compile some assets needed for tests to run.
    3. bin/rspec - Run tests.
  • Mailcatcher is a good tool for catching emails in development.

Run in Vagrant (gets everything working, but is very slow, recommended only if you need to run the PHP portions of the website)

Production

See Spinning up a new server and Merging and deploying.