Optionsful demonstration - Example blog application built in the offical 15 minute Rails screencast.
Ruby JavaScript
Switch branches/tags
Nothing to show
Pull request Compare This branch is 14 commits ahead of ryanb:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
config
db
log
public
script
test
tmp
vendor/plugins
.gitignore
README.textile
Rakefile

README.textile

Application used to demonstrate Optionsful.

This is the blog application built in the offical 15 minute Rails screencast: http://rubyonrails.org/screencasts

Installation

  1. $ git clone git@github.com:kayaman/blog-screencast.git
  2. $ cd blog-screencast
  3. $ rake gems:install
  4. $ rake db:migrate
  5. edit config/optionsful.yml to change the base path if you like.
  6. $ script/server
production:
  http: 
    base_path: /blopts

Usage

Once your application is set up and running. It’s showtime!

View the extracted information

  • On your browser check the following examples:
    • http://localhost:3000/blopts/posts
    • http://localhost:3000/blopts/posts/1
    • http://localhost:3000/blopts/posts/new
    • http://localhost:3000/blopts/posts/1/comments

Play editing the information

  • On your favorite editor, open the file app/controllers/posts_controller.rb, for instance.
  • Editing the service description:
# --- 
# service: 
#   title: Posts front controller
#   entrypoint: /posts
#   support: kayaman@baurets.net
#   description: The Posts sevices let you list, create, update, and delete Posts from our application.
class PostsController < ApplicationController
...
  • Editing one resource description:
# --- 
# resource: 
#   title: Listing
#   identifier: /
#   support: kayaman@baurets.net
#   description: List posts.
#   source-link: research
#   alternates:
#     - one
#     - two
# representation:
#   media-types: 
#     - application/xml
#     - application/json
#   last-modified: 2010-07-23
# control:
#   cache: cache-control
def index
...

Have fun and give feedback!