Class: Rack::Xapper
- Inherits:
-
Object
- Object
- Rack::Xapper
- Defined in:
- lib/rack/xapper.rb
Constant Summary collapse
- APP_MANIFEST_TEMPLATE =
<<-TEMPLEND <Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" RuntimeVersion="2.0.31005.0" EntryPointAssembly="Microsoft.Scripting.Silverlight" EntryPointType="Microsoft.Scripting.Silverlight.DynamicApplication" ExternalCallersFromCrossDomain="ScriptableOnly"> <!-- Add assembly references here --> <Deployment.Parts> <!-- In the XAP --> <!-- <AssemblyPart Source="Foo.dll" /> --> <!-- Outside the XAP, same domain --> <!-- <AssemblyPart Source="/Foo.dll" /> --> <!-- Outside the XAP, different domain --> <!-- <AssemblyPart Source="http://bar.com/Foo.dll" /> --> </Deployment.Parts> <!-- Add transparent platform extensions (.slvx) references here --> <Deployment.ExternalParts> <!-- Example --> <!-- <ExtensionPart Source="http://bar.com/v1/Foo.slvx" /> --> </Deployment.ExternalParts> </Deployment> TEMPLEND
- LANGUAGES =
{ :names => %w(IronPython Python py), :extensions => %w(.py), :context => "IronPython.Runtime.PythonContext", :assemblies => %w(IronPython.dll IronPython.Modules.dll), :external => "IronPython.slvx" }, { :names => %w(IronRuby Ruby rb), :extensions => %w(.rb), :context => "IronRuby.Runtime.RubyContext", :assemblies => %w(IronRuby.dll IronRuby.Libraries.dll), :external => "IronRuby.slvx" }
- DEFAULT_OPTIONS =
{ :assembly_path => ::File.dirname(__FILE__) + '/../assemblies', :xap_path => "sl", :source_path => 'app/silverlight', :extra_app_files => [], :xap_name => 'app', :external_url_prefix => "/dlr-slvx", :root => 'public', :sl_version => :clr2, :languages => LANGUAGES, :app_manifest => APP_MANIFEST_TEMPLATE }
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, options = {}) ⇒ Xapper
constructor
A new instance of Xapper.
Constructor Details
#initialize(app, options = {}) ⇒ Xapper
Returns a new instance of Xapper.
211 212 213 214 |
# File 'lib/rack/xapper.rb', line 211 def initialize(app, ={}) @xap_options = DEFAULT_OPTIONS.merge() @app = app end |