Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Latest commit

 

History

History
177 lines (114 loc) · 5.97 KB

README.md

File metadata and controls

177 lines (114 loc) · 5.97 KB

JustMatch API Build status

Code Climate Test Coverage

Welcome to the official API for the Just Arrived matching service.

The API follows the JSON API 1.0 standard. Please report any violations.

JSON API 1.0

If you're looking for help, ask questions, want to contribute or give feedback, you're more than welcome to join our Gitter chat. You can also checkout the tasks that are ready for development over at Waffle.io.

Join the chat at https://gitter.im/justarrived/just_match_api Stories in Ready

Built with

  • Ruby 2.5
  • Ruby on Rails 5.2
  • PostgreSQL 9.5
  • Redis 3

Getting started

Prerequisites: Ruby 2.5, PostgreSQL 9.5 or above and Redis 3.

To setup your development environment

$ git clone git@github.com:justarrived/just_match_api.git
$ cd just_arrived
$ script/setup
$ script/server
# You can now open http://localhost:3000
# The admin UI is available at http://admin.localhost:3000

You can generate some development seed data by running rails dev:seed.

If you navigate to http://localhost:3000 you'll find the API documentation (lvh.me is the same as using localhost:3000, though it supports subdomains etc).

Tests

This project uses rspec and you can find the tests in spec/.

You can run the test using

$ script/test

you can also run the test suite with some options

# Run single file
$ script/test spec/models/user_spec.rb

# Run a single test, on line 31, in file
$ script/test spec/models/user_spec.rb:31

# run with line coverage
$ COVERAGE=true script/test

We use CircleCI for CI.

Docs

Public JSON API documentation

Docs for the current version of the API.

The API documentation is generated right where the code for that particular endpoint is. That way the documentation is kept up to date.

During development you can run find the documentation at http://localhost:3000/api_docs, as long as you have a started your server (you start it by running script/server).

You can generate a static version of the API documentation with

$ script/docs

Internal documentation and configuration

In docs/README.md you'll find additional documentation.

Deploy

tl;dr let me deploy already

Deploy

The simplest way to deploy is with Heroku, you can get your own version running in a few minutes.

You can also do it using the command line if you have the Heroku toolbelt installed.

$ heroku create my-server-name
$ git push heroku master
$ heroku run rails db:migrate

Commands

There are a few convenience commands

  • script/bootstrap - installs/updates all dependencies
  • script/setup - sets up a project to be used for the first time
  • script/update - updates a project to run at its current version
  • script/migrate - run local database migrations
  • script/server - starts app
  • script/test - runs tests
  • script/console - opens a console
  • script/release - create and publish application release
  • script/deploy - deploy application
  • script/docs - generate docs
  • script/pull-translations - pull translation from Transifex
  • script/push-translations - push translation to Transifex

Contributing

Developer docs.

We would love if you'd like to help us build and improve this product for the benefit of everyone. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

Any contributions, feedback and suggestions are more than welcome.

If you want to contribute please take a moment to review our contributing guide in order to make the contribution process easy and effective for everyone involved.

If you're not sure where to go you can always join our Gitter chat and ask :)

Join the chat at https://gitter.im/justarrived/just_match_api

Wish list

Translations

Translations are managed at Transifex.

To push or pull new translations, you need to install the Transifex client.

Fetch translations

$ script/pull-translations

Push source language

$ script/push-translations

The configuration is in .tx/config.

License

This project is open source and licensed under AGPL.