a sinatra interface for playhouse apps
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
lib/playhouse
spec
.gitignore
.travis.yml
CHANGEME.md
Gemfile
Gemfile.lock
README.md
Rakefile
cucumber.yml
playhouse-web.rb
playhouse_sinatra.gemspec

README.md

#Playhouse Sinatra

Automatically create a json api to your playhouse app using sinatra.

Code Climate Build Status Coverage Status

##Status

Still in development, not recommended for production use

##Installation

  gem 'playhouse-sinatra', git: 'git://github.com/enspiral/playhouse-sinatra.git'

##Usage

see the economatic-sinatra app for a demonstration

You can setup your Sinatra app with something along the lines of

require 'sinatra/base'
require 'playhouse/sinatra'
require 'economatic/api'

class EconomaticWeb < Sinatra::Base
  register Playhouse::Sinatra
  set :root,  File.expand_path(File.join(File.dirname(__FILE__)))

  add_play Economatic::API

  run! if app_file == $0
end

##TODO

  • API authentication
  • API versioning
  • separate out GET, POST, PUT, DELETE methods
  • better documentation of api on root path

##Licence

Playhouse is licenced under the MIT licence. Copyright 2013 Enspiral Services Ltd.

##Contributing

Your contributions are welcome. Send us a pull request, or start a discussion in the github issues first.

##Credits

From Enspiral Craftworks:

  • Craig Ambrose (@craigambrose)
  • Joshua Vial (@joshuavial)