OhtuKisalli / kisallioppiminen.server

Backend for kisallioppiminen.fi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Coursemanager for kisallioppiminen.fi

Build Status Coverage Status Code Climate

Purpose

  • Teachers can follows their students progress on assignments at kisallioppiminen.fi
  • Teachers can create new courses and course keys for students
  • Teachers can create target schedules to motivate students

Links to our application

Developer info

Deploying

  1. Push to master branch of this repository
  2. Travis will deploy code to heroku if all tests pass
  3. (do not push directly to heroku)

Database installation and configuration

  • PostgreSQL (At least version 9.3) necessary
  • Database settings can be found in /config/database.yml
  1. Install PostgreSQL
  • sudo apt-get update
  • sudo apt-get install postgresql postgresql-contrib libpq-dev
  1. Create Database User kisalli
  • sudo -u postgres createuser -s kisalli
  • sudo -u postgres psql
  • \password kisalli
  • Enter new password: kisalli
  • Enter it again: kisalli
  • \q
  1. Setup kisallioppiminen.server database
  • rake db:create
  • rake db:setup

Migrations and custom seed files:

  • Custom seed files (filename.rb) can be added to db/seeds/ and loaded with command rake db:seed:filename (without .rb)

  • rake db:migrate

  • rake db:seed:destroy_all - db/seeds/destroy_all.rb (destroys database content)

  • rake db:seed:dev - db/seeds/dev.rb (content for dev environment)

  • heroku login

  • heroku run --app pure-inlet-98383 rake db:migrate

  • heroku run --app pure-inlet-98383 rake db:seed:destroy_all

  • heroku run --app pure-inlet-98383 rake db:seed:dev

  • heroku run --app pure-inlet-98383 rails console - to use rails console in heroku

Ruby on Rails guides and configs

  • Ruby: 2.4.0
  • Rails: 5.0.1

Start server by issuing command:

rails server

By default rails will be running at localhost:3000

For tests, use rspec:

rspec spec -fd

If you don't have rspec, install it with command

bundle install

More about settings and configs

About

Backend for kisallioppiminen.fi


Languages

Language:Ruby 87.1%Language:HTML 10.5%Language:CSS 1.3%Language:CoffeeScript 0.6%Language:JavaScript 0.3%Language:Dockerfile 0.1%Language:Shell 0.0%