zooniverse / talk-api

Apache License 2.0
6 stars 0 forks source link
hacktoberfest rails ruby

Talk-Api

Build Status

The new backend for Talk

Setting up

Build & start the docker containers:

  docker-compose build
  docker-compose up
  open http://localhost:3000/

Alternatively use docker to run a testing environment bash shell and run test commands, run:

  1. docker-compose run --service-ports --rm -e RAILS_ENV=test talkapi bash
  2. Install the gem dependencies for the application bundle install
  3. Setup the test database **
    1. RAILS_ENV=test bundle exec rake db:create
    2. RAILS_ENV=test bundle exec rake db:schema:load
    3. RAILS_ENV=panoptes_test bundle exec rake db:create
    4. RAILS_ENV=test bundle exec rake panoptes:db:create_tables
    5. RAILS_ENV=test bundle exec rake panoptes:db:setup
  4. bundle exec rspec

Layout

The app is built to conform to the JSON API spec

Resources

Panoptes

Talk is built to integrate with Panoptes

Authentication is provided by signing your requests with a Bearer-Token

Some resources (User, Subject) are proxied from Panoptes

Setting Up Rails-next

Using the gem https://github.com/clio/ten_years_rails to help with the upgrade path https://www.youtube.com/watch?v=6aCfc0DkSFo

Using docker-compose-rails-next for env setup

docker-compose -f docker-compose-rails-next.yml build

docker-compose -f docker-compose-rails-next.yml run --service-ports --rm talkapi bash

## To run bash in test env
docker-compose -f docker-compose-rails-next.yml run --service-ports --rm -e RAILS_ENV=test talkapi bash

Install the gems via next

BUNDLE_GEMFILE=Gemfile.next bundle install

OR

next bundle install

To-Do

Check the issues for what's in development.

License

Copyright 2014-2015 by the Zooniverse

Distributed under the Apache Public License v2. See LICENSE