Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 48 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# JSONAPI::Resources [![Gem Version](https://badge.fury.io/rb/jsonapi-resources.svg)](https://badge.fury.io/rb/jsonapi-resources) [![Build Status](https://secure.travis-ci.org/cerebris/jsonapi-resources.svg?branch=master)](http://travis-ci.org/cerebris/jsonapi-resources) [![Code Climate](https://codeclimate.com/github/cerebris/jsonapi-resources/badges/gpa.svg)](https://codeclimate.com/github/cerebris/jsonapi-resources)

[![Join the chat at https://gitter.im/cerebris/jsonapi-resources](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cerebris/jsonapi-resources?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
# JSONAPI::Resources (Sanger fork)

`JSONAPI::Resources`, or "JR", provides a framework for developing an API server that complies with the
[JSON:API](http://jsonapi.org/) specification.
Expand All @@ -13,7 +11,7 @@ backed by ActiveRecord models or by custom objects.

## Documentation

Full documentation can be found at [http://jsonapi-resources.com](http://jsonapi-resources.com), including the [v0.10 alpha Guide](http://jsonapi-resources.com/v0.10/guide/) specific to this version.
Full documentation can be found at [http://jsonapi-resources.com](http://jsonapi-resources.com), including the [v0.10 alpha Guide](http://jsonapi-resources.com/v0.10/guide/) specific to this version.

## Demo App

Expand All @@ -22,31 +20,73 @@ We have a simple demo app, called [Peeps](https://github.com/cerebris/peeps), av
## Client Libraries

JSON:API maintains a (non-verified) listing of [client libraries](http://jsonapi.org/implementations/#client-libraries)
which *should* be compatible with JSON:API compliant server implementations such as JR.
which _should_ be compatible with JSON:API compliant server implementations such as JR.

## Installation

Add JR to your application's `Gemfile`:

```
```
gem 'jsonapi-resources'
```

And then execute:

```bash
```bash
bundle
```

Or install it yourself as:

```bash
```bash
gem install jsonapi-resources
```

**For further usage see the [v0.10 alpha Guide](http://jsonapi-resources.com/v0.10/guide/)**

## Sanger-specific release process

There are two versions of the gem which we use for production. The version 1 series has unique customisations and is used by Sequencescape. The version 2 series is a more generic version which is used by Traction.

Check which versions we have published at https://rubygems.org/gems/sanger-jsonapi-resources

### For version 1 series

- Create a branch from **develop**, apply fixes.
- Change version number in `lib/jsonapi/resources/version.rb` . This file is read by the gemspec during publication.
- Test Sequencescape with the gem from the branch.
- Merge the branch into develop.
<!-- list separator -->
- Checkout the develop branch.
- Execute `gem build jsonapi-resources.gemspec` which builds sanger-jsonapi-resources-0.1.x.gem in this case.
- Execute `gem push sanger-jsonapi-resources-0.1.x.gem` which publishes the gem.

### For version 2 series

- Create a branch from **master**, apply fixes.
- Change version number in `lib/jsonapi/resources/version.rb` . This file is read by the gemspec during publication.
- Test Traction with the gem from the branch.
- Merge the branch into master.
<!-- list separator -->
- Checkout the master branch.
- Execute `gem build jsonapi-resources.gemspec` which builds sanger-jsonapi-resources-0.2.x.gem in this case.
- Execute `gem push sanger-jsonapi-resources-0.2.x.gem` which publishes the gem.

### Publication

You will be notified by email for each. You will also receive one email for API key setup. The first push will ask email and password for the account, which are in KeePass (search for "gem").

> [!TIP]
> The process above can be improved by creating new releases first and then publish gems from those releases (tags) rather than publications from master (0.2) and develop (0.1) branches. Still create the releases to make tags in this work though.

> [!NOTE]
> The email and password for gem publication is a recent addition to the credentials database. Pull latest changes in the credentials repo.

> [!IMPORTANT]
> Developers need to execute `bundle install`.

## Contributing

See CONTRIBUTING.md for details.

## License
Expand Down