Class: Warbler::Traits::Rack
- Inherits:
-
Object
- Object
- Warbler::Traits::Rack
- Includes:
- Warbler::Trait
- Defined in:
- lib/warbler/traits/rack.rb
Overview
The Rack trait adds config.ru to a Rack-based war project.
Instance Attribute Summary
Attributes included from Warbler::Trait
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Warbler::Trait
#add_init_load_path, #add_main_rb, included, #initialize, #jruby_jars, #update_archive, #update_gem_path
Class Method Details
Instance Method Details
#after_configure ⇒ Object
28 29 30 |
# File 'lib/warbler/traits/rack.rb', line 28 def after_configure config.init_contents << "#{config.warbler_templates}/rack.erb" end |
#before_configure ⇒ Object
22 23 24 25 26 |
# File 'lib/warbler/traits/rack.rb', line 22 def before_configure config.webxml.booter = :rack config.webinf_files += [FileList['config.ru', '*/config.ru'].detect {|f| File.exist?(f)}] config.webxml.rack.env = ENV['RACK_ENV'] || 'production' end |