openHPI/codeharbor

Name: codeharbor

Owner: HPI Knowledge Tech Group

Description: Exchange of Programming Exercises acrossdiverse Code Assessment Systems through CodeHarbor

Created: 2015-11-04 14:26:56.0

Updated: 2016-10-28 12:57:48.0

Pushed: 2017-12-09 16:44:59.0

Homepage:

Size: 5040

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

CodeHarbor

current status (master branch)

Stories in Ready

unix development
clone https://github.com/openHPI/codeharbor.git
odeharbor
le
 db:migrate
s s

Visit your browser at: http://localhost:3000/

windows development (vagrant)

Install virtual box. Install vagrant (http://vagrantup.com/)

clone https://github.com/openHPI/codeharbor.git
odeharbor
ant up

Wait ~20 minutes.

ant ssh
vagrant
 db:migrate
s s -b 0

Visit your browser at: http://localhost:3001/

Docker for development

Install Docker

When using Docker Toolbox

Docker Toolbox.
Run:

 docker-machine -D create --driver=virtualbox dev
 docker-machine start dev
 docker-machine env dev --shell=<e.g.powershell, cmd, bash...>

Run the command indicated by the env command.

Set up Development Environment

Change to the directory of the repository.

 docker-compose build
 docker-compose run --rm web rake db:create db:migrate db:seed
 docker-compose up

If running on Windows or Mac with Docker Toolbox, or on Docker for Mac browse the ip that was displayed by the env command and the port 3000.
Otherwise browse: http://localhost:3000/.

demo data

run rake db:seed to add some demo data.

initial admin-user

To create an initial admin-user start the rails server and create a new account using the web interface. Connect to the container:

er-compose exec web bash

There run the following:

s c
User.first.update(role: 'admin')
testing

Run all tests with

c .

or just one test (e.g. rspec spec/controllers/exercises_controller_spec.rb)

You can find the coverage results in coverage/index.html

If developing with docker:

 docker-compose -f docker/docker-compose-test.yml run -d --rm web rake db:create db:migrate
 docker-compose -f docker/docker-compose-test.yml up

Or for specific test:

 docker-compose -f docker/docker-compose-test.yml run -d web rspec spec/controllers/exercises_controller_spec.rb

Use docker logs <containername>to access the results of your tests.
Logs will only be available after the execution finished.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.