Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

strain

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strain

  • 0.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Strain

Gem Version

Description

What does it do?

Strain is an experimental Rails engine that exposes JSON API endpoints for quickly defining and editing structured content. By providing a JSON Schema 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.

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.

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).

FAQs

Package last updated on 20 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc