lib/trinidad/web_app.rb in trinidad-1.2.3 vs lib/trinidad/web_app.rb in trinidad-1.3.0
- old
+ new
@@ -130,15 +130,15 @@
param.elements['param-value'].text
end
end
def configure_rack_servlet(servlet_class, servlet_name)
- servlet_config = @config[:servlet] || @app_config[:servlet]
- if servlet_config
- servlet_class = servlet_config[:class]
- servlet_name = servlet_config[:name]
- end
- @servlet = {:class => servlet_class, :name => servlet_name}
+ servlet_config = @config[:servlet] || @app_config[:servlet] || {}
+ @servlet = {
+ :class => servlet_config[:class] || servlet_class,
+ :name => servlet_config[:name] || servlet_name,
+ :instance => servlet_config[:instance]
+ }
end
def self.autodetect_configuration(config, app_config)
# Check for Rails threadsafe mode
environment = app_config[:environment] || config[:environment]