Giter Site home page Giter Site logo

briandoll / rit Goto Github PK

View Code? Open in Web Editor NEW
169.0 4.0 7.0 8.63 MB

rit. is a standalone web application that allows users to edit and schedule content. Content is served up to a consuming application as a web service.

Home Page: http://emphaticsolutions.com/2010/02/20/rit-the-anti-CMS-content-scheduling-system-in-Rails.html

License: MIT License

JavaScript 15.40% Ruby 84.60%

rit's Introduction

rit.

Ritardando โ€” immediate slowing down (abbreviation: rit. or more specifically, ritard.)

rit. is a standalone web application that allows users to edit and schedule content. Content is served up to a consuming application as a web service.

Design Goals

  • CMSes suck. We don't want our application to live inside a CMS.
  • Do one thing and do it well. rit. schedules content. That's pretty much it.
  • Don't be clever. We're not clever so we probably can't make a computer clever.
  • Be fast. Cache in rit. so that the consuming application doesn't have to.

Consuming Rit. Content

Install the rit_client Rails plugin into your app. Follow the configuration instructions specified in the rit_client readme.

Getting Started

See the Rit wiki for the latest information.

Ideas? Need help? Discuss here.

Development

RVM and Best Practices

Developed using RVM Ruby 1.8.7 and Gemset

$ rvm use 1.8.7
$ rvm gemset create rit
$ rvm use 1.8.7@rit

Terminology

Plate

A Plate is a class of content. A plate is identified by the combination of it's Layout Name, Instance Name and Plate Name. The names are used to classify and organize plates.

Layout Name

A class of pages. For instance, the layout for all help pages.

Instance Name

A specific page using a layout. For instance, the contact help page. The Instance Name can be blank for those layouts that have only one instance, such as a home page.

Plate Name

A content area on a web page. For instance, the body of the contact help page.

Plate Edition

A Plate has many Plate Editions. These editions contain content and can be scheduled.

Fallback Edition

The edition that is published if no scheduled edition can be found.

Publish

Flag used to mark that an edition is ready to be considered for publishing. Scheduling rules will take this edition into account.

Event

Plate Editions can be grouped into Events that can be scheduled. All editions take on the Events start time and and time.

Plate Set

A Plate Set is a template for generating a group of related Plates. For example, if a help page has a body plate and a left column plate, a user can generate an instance of both those plates from that plate set.

Consuming App

The application that makes web calls out to rit. for content.

Scheduling

Conflicts

When there are scheduling conflicts for multiple editions of the same plate, the start time is used to determine which plate gets published. The event latest start time takes priority.

If start multiple editions have the same start time, the most recently modified edition takes priority

Example

                1     2                  3      4
Timeline:  <----^-----^------------------^------^---->

edition 1       |-------------------------------|
edition 2             |------------------|

Edition start times:

  • time 1: edition 1
  • time 2: edition 2
  • time 3: back to edition 1
  • time 4: fallback edition

Example

                1     2                  3      4
Timeline:  <----^-----^------------------^------^---->

edition 1       |------------------------|
edition 2             |-------------------------|

Edition start times:

  • time 1: edition 1
  • time 2: edition 2
  • time 3: edition 2 continues
  • time 4: fallback edition

Example

                1     2      3      4    5      6
Timeline:  <----^-----^------^------^----^------^---->

edition 1       |------------|
edition 2             |------------------|
edition 3                           |-----------|

Edition start times:

  • time 1: edition 1
  • time 2: edition 2
  • time 3: edition 2 continues
  • time 4: edition 3
  • time 5: edition 3 continues
  • time 6: fallback edition

Example

                1     2      3      4    5      6
Timeline:  <----^-----^------^------^----^------^---->

edition 1       |-------------------------------|
edition 2             |-------------|
edition 3                     |----------|

Edition start times:

  • time 1: edition 1
  • time 2: edition 2
  • time 3: edition 3
  • time 4: edition 3 continues
  • time 5: back to edition 1
  • time 6: fallback edition

Publishing

The consuming app can retrieve the current content for a plate from the following URLs:

http://rit.app/published/<layout name>/<instance name>/<plate name>
http://rit.app/published/<layout name>/<plate name>

The consuming app can retrieve content on a specific date with:

http://rit.app/published_on/<layout name>/<instance name>/<plate name>/<epoch time integer>
http://rit.app/published/<layout name>/<plate name>/<epoch time integer>

NOTE: Retrieving content on a specific date is not currently cached.

rit's People

Contributors

briandoll avatar kasima avatar ttdonovan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rit's Issues

nil issue after creating plate

after rake db:migrate and rake db:seed everything seems fine until i create my first plate, then I get this

ActionView::TemplateError (You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.<=>) on line #5 of app/views/plates/_plate_filter.html.erb:
2:   <%- form_tag plates_path, :class => 'filter-form', :method => :get do -%>
3:   <ul class="plate-name-parts">
4:     <li><%= filter_select "fl", params[:fl], "layout_name" %></li>
5:     <li><%= filter_select "fi", params[:fi], "instance_name" %></li>
6:     <li><%= filter_select "fp", params[:fp], "plate_name" %></li>
7:     <li class="action"><%= submit_tag "Filter" %></li>
8:     <li class="action"><%= link_to "Clear", plates_path %></li>

Memcache required?

Creating an edition PlatesController#create_plate_edition gives me an error since it can't connect to memcache.

Is there a way to use Rit without memcache, at least in development mode? I can live with a "No", but I would hate to setup memcache on my local machine if it is not absolutely nescesary.

Error on /users

If hit "Users" I get:

Unknown action
No action responded to index. Actions: authenticate_admin, create, new, and signed_in_as_admin?

How do you use Rit in the wild?

This is rather a list of questions than an issue.

What kind of format do you use for the content? HTML, or some other markup? Do you render it on the Rit's side or on the side of the consuming up?

How do you feel about a dropdown in the edition's form, to select one among several templating engines/renderers? Is that what you had in mind, when you were mentioning some plugin architecture?

Maybe tilt would be a good thing to have a look at here: http://github.com/rtomayko/tilt

Object creation fails

When creating a Plate or Edition, I get:

NoMethodError (undefined method `first' for #<HashWithIndifferentAccess:0xb6e371d0>):
  lib/parses_plate_edition_parameters.rb:4:in `parse_params'
  ...

This is with Ruby 1.8.6.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.