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.
lib
spec
.gitignore
Gemfile
README.md
Rakefile
adhearsion-sinatra.gemspec

README.md

adhearsion-sinatra

This plugin allows you to create a Sinatra application and run it within your Adhearsion application's process.

Usage

  1. Add the following to your Adhearsion application's Gemfile and run bundle install:
gem "adhearsion-sinatra"
  1. Create your Sinatra application

To do this you must create a class that inherits from Sinatra::Base and put it in your lib/ directory within your Adhearsion application. For example, if you want to create an application called 'Vegas' you would create the file lib/vegas.rb and populate it with:

class Vegas < Sinatra::Base
  set :sessions, true

  get '/'
    'Vegas, Baby!'
  end
end
  1. Tell Adhearsion your Sinatra class name

In your config/adhearsion.rb add a line like this to the configuration block:

config.sinatra.class_name = 'Vegas'
  1. Launch Adhearsion

That's it!