Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CS] Split events and routes out of config file
Separates responsibilities and clutter. Backward compatibility is ensured. See #429
- Loading branch information
1 parent
3d0afb2
commit 2054808
Showing
6 changed files
with
63 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# encoding: utf-8 | ||
|
||
Adhearsion::Events.draw do | ||
<% unless options[:empty] %> | ||
# Register global handlers for events | ||
# | ||
# eg. Handling Punchblock events | ||
# punchblock do |event| | ||
# ... | ||
# end | ||
# | ||
# eg Handling PeerStatus AMI events | ||
# ami :name => 'PeerStatus' do |event| | ||
# ... | ||
# end | ||
# | ||
<% end %> | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# encoding: utf-8 | ||
|
||
<% unless options[:empty] %> | ||
require 'call_controllers/simon_game' | ||
<% end %> | ||
|
||
Adhearsion.router do | ||
<% if options[:empty] %> | ||
route 'default' do | ||
|
||
end | ||
<% else %> | ||
# | ||
# Specify your call routes, directing calls with particular attributes to a controller | ||
# | ||
|
||
route 'default', SimonGame | ||
<% end %> | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters