This plugin allows you to create a Sinatra application and run it within your Adhearsion application's process.
- Add the following to your Adhearsion application's Gemfile and run
- 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
- Tell Adhearsion your Sinatra class name
config/adhearsion.rb add a line like this to the configuration block:
config.sinatra.class_name = 'Vegas'
- Launch Adhearsion