Sha256: 2f8eb47ee3c268073df4e67ad29bf3902636d04b4920c8b5d4d9e6b63a5f5f82

Contents?: true

Size: 1.8 KB

Versions: 1

Compression:

Stored size: 1.8 KB

Contents

# Strain

[![Gem Version](https://badge.fury.io/rb/strain.svg)](https://badge.fury.io/rb/strain)

## Description

### What does it do?


Strain is an experimental Rails engine that exposes [JSON API][1] endpoints for quickly defining and editing structured content. By providing a [JSON Schema][2] you get user-editable content types with shared server-side and client-side validation and, through the upcoming `Strain-admin` editor, autogenerated rich admin interfaces built with React.

Once your content models are stable, you can extend the underlying models with STI to add additional logic. In the future, Strain will be able to generate migrations to promote your content types to full-fledged ActiveRecord models.

_Note: This gem is experimental, and will be changing rapidly._

[1]: http://google.com/         "JSON API"
[2]: http://json-schema.org/    "JSON Schema"

### Why do this?

http://alistapart.com/article/future-ready-content

TODO

## Requirements

- Ruby 2.0.0
- PostgreSQL 9.4 (for `jsonb` support)
- Rails 4.2

## Installation

### Gemfile

Add Strain to your Rails application's `Gemfile`. 

``` ruby
gem 'strain'
```

After adding the above lines to your `Gemfile`, run:

```
$ bundle
```

### Install migrations

After installing the gem, install and run the migrations needed to set up the Strain database tables. This will also enable the Postgres UUID extension.

```
$ rake strain:install:migrations
$ rake db:migrate
```

### Mount the engine

In `routes.rb`, specify a path that will serve as the base route for Strain resources.

```
mount Strain::Engine => "/strain"
```

## Usage

TODO

## Feedback

I'd love to discuss any ideas or suggestions you might have. Please file an issue or get in touch with @remedy on Twitter.

## License

Copyright 2015 Adam Worrall. MIT License (see LICENSE for details).

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
strain-0.0.2 README.md