public
Description: The Ruby Implementation of SWX RPC
Homepage: http://swxruby.org
Clone URL: git://github.com/meekish/swxruby.git
swxruby / init.rb
100644 22 lines (18 sloc) 0.654 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
begin
  require 'rubygems'
  require 'swxruby'
rescue
  # If the swxruby gem isn't installed, assume this plugin installation is
  # running from a checkout of trunk and fail silently.
end
require 'swx_gateway'
require 'yaml'
 
# Tell SwxGateway where app root and config file are located
SwxGateway.app_root = RAILS_ROOT
SwxGateway.swx_config = YAML.load_file(File.join(RAILS_ROOT, 'config', 'swx.yml'))
 
# Load the service classes
SwxGateway.init_service_classes
 
# Initialize Rails controller integration (render :swx => 'my data')
require 'rails_integration/render_decorator'
 
# Register the SWX mime tytpe
Mime::Type.register "application/swf", :swx