terms.umn.edu

At The Sound Of The Tone, The Term Will Be…

AKA terms.umn.edu

A web service that tells you what term is active today, or any other day that you might care about.

Terminology

If you look for Active terms, you may sometimes get no terms back. If you look for latest or soonest terms, you should always get a term back.

Examples

If today is 2017-08-18 and you check for Undergraduate UMNTC terms

If you check one day later, on 2017-08-19 then you will see:

Usage

Get Terms Active for Today:

Get Terms Latest for Today:

Get Terms Soonest for Today:

Get Terms by Date:

The date 2017-09-15 is used for all examples

Get Terms by STRM

STRM 1179 is used on all examples

You will get a collection of term resources back. The data will be like this example:

{
  "id": "6",
  "type": "terms",
  "links": {
    "self": "http://terms.umn.edu/terms/6",
    "prev": "http://terms.umn.edu/terms/5",
    "next": "http://terms.umn.edu/terms/7"
  },
  "attributes": {
  "institution": "UMNCR",
  "strm": "1179",
  "begin-date": "2017-08-22",
  "end-date": "2017-12-14",
  "name": "Fall 2017",
  "career": "UGRD"
  }
}

The prev link will take you to the previous term for the same Institution & Career. The next link will take you to the subsequent term for the same Institution and Career.

Responses for non-existent terms

{
  "data": []
}
{
  "data": []
}
{
  "errors": [
    {
      "title": "Record not found",
      "detail": "The record identified by 0 could not be found.",
      "code": "404",
      "status": "404"
    }
  ]
}

Development

Local development uses the asr_dev_user_<username> space. A connection to the U’s VPN is required to access the development and test databases.

Setup

Testing

Except for one request spec, these tests are all written as Cucumber feature tests. You can find the scenarios in ./features.

The single request spec can’t be run individually using script/test. To run it use: bin/rspec spec/request/cors_spec.rb. It will also run on script/test.

To see a test coverage report:

  1. COVERAGE=1 ./script/test
  2. open coverage/index.html to view the report

Deploying

Be sure your Docker containers are running locally by running script/server.

This will deploy from the master branch and update the terms.umn.edu Jekyll site using the contents of the README.

Note: You must be a member of the umn-terms organization to publish to the Jekyll site. To skip that step run bundle exec cap staging deploy.

URLs

Owners

Who is responsible for the web application after initial development?