Skip to content

ProgrammingDaisukiClub/WPCS2

Folders and files

NameName
Last commit message
Last commit date
Apr 29, 2021
May 8, 2022
Apr 13, 2018
Apr 18, 2024
May 20, 2020
May 11, 2020
Apr 27, 2019
Apr 15, 2019
May 8, 2021
Mar 29, 2018
Apr 24, 2018
May 2, 2020
Feb 14, 2017
Apr 24, 2017
Apr 11, 2024
Apr 26, 2018
Mar 12, 2017
May 30, 2021
Apr 11, 2024
Apr 11, 2024
Apr 18, 2024
Apr 18, 2024
Jan 24, 2017
Apr 17, 2018
May 20, 2020
Jan 24, 2017
Jan 24, 2017
Apr 11, 2024
May 11, 2020
Jul 15, 2024
Apr 25, 2018
May 18, 2018

Repository files navigation

WPCS2

Waseda Programming Contest System 2 https://wpcs2.herokuapp.com

Setup docker based environment

sh docker.sh

Setup for development environment

  We recommend to use docker-compose based environment.

# install rbenv and ruby-build
# see https://github.com/rbenv/rbenv#basic-github-checkout
# see https://github.com/rbenv/ruby-build#installation
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
cd ~/.rbenv && src/configure && make -C src
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
mkdir -p "$(rbenv root)"/plugins
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build

# install Ruby
rbenv install 2.7.0
rbenv global 2.7.0

# install bundler
gem install bundler -v '2.1.2'

# install nvm
# see https://github.com/creationix/nvm#installation
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bash_profile
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> ~/.bash_profile
source ~/.bash_profile

# install node
nvm install 11.14.0

# install PostgreSQL
# for other versions of ubuntu or other operating systems
# see https://www.postgresql.org/download/
sudo localectl set-locale LANG=en_US.utf8
sudo apt-add-repository 'deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt update
sudo apt install -y postgresql-9.6 libpq-dev

# create postgresql role
# enter password
sudo -u postgres createuser vagrant -s -P

# clone this repository
git clone https://github.com/ProgrammingDaisukiClub/WPCS2.git ~/WPCS2
cd ~/WPCS2

# create .env and edit it
cp .env.sample .env

# install ruby gems
bundle install

# install npm packages
npm install

# create database
bundle exec rake db:create

# migrate database
bundle exec rake db:migrate

# build javascript with webpack
npm run dev-build

Run development server

bundle exec rails server -b 0.0.0.0

Run lint tools

# run rubocop
bundle exec rubocop -a

# run tslint
npm run fix

Run tests

# run minitest
bundle exec rake test

# run rspec
bundle exec

More information

See our Wiki. https://github.com/ProgrammingDaisukiClub/WPCS2/wiki