Project

ninetails

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Ninetails is a structured API for building a CMS API in Rails. It lets you define Sections, Elements, and Properties which control what can and cannot be edited.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 0.3
~> 2.3
~> 0.18
~> 4.2
~> 0.4
~> 1.0
 Project Readme

Ninetails

Build Status Code Climate Test Coverage

Ninetails is a simple Rails engine to create an API for a content management system to run on. It is designed on the idea of a CMS which is limited in scope in that not all aspects of a page should be editable. Instead, you can define Sections, Elements, and Properties which are editable and can then be loaded in and styled in a reliable manner. It gives you the control to decide exactly what should and what should not be editable in your project.

WARNING: Ninetails is very much a work in progress and is not ready to be fully used yet!

Getting started

Ninetails is a mountable Rails engine, so it needs to be loaded into your app. You app is also where you will define your components which Ninetails should expose. Start by adding it to your Gemfile:

gem "ninetails"

Then you need to mount the engine in config/routes.rb

Rails.application.routes.draw do
  mount Ninetails::Engine, at: "/api"
end

Usage guide

Configuration

By default, Ninetails will force all keys in JSON responses to be camelcase with the first letter lowercase, to conform with JSON standards. If you would prefer the output to be as underscored, you can set this in an initializer:

Ninetails::Config.key_style = :underscore

Testing

You'll need postgresql installed and a test database crated

createdb ninetails_dummy_test

Then you can run the test with rspec

bundle exec rspec