Ensure request is sent even if ebb_client_body_write isn't called
[ebb.git] / ruby_lib / ebb / runner / rails.rb
blob49b1e1f8a62e8627f31c2a2e2688a28557e0c76f
1 module Rack
2   module Adapter
3     autoload :Rails, Ebb::LIBDIR + '/rack/adapter/rails'
4   end
5 end
7 module Ebb
8   class Runner  
9     class Rails < Runner
10       def extra_options
11         # defaults for ebb_rails
12         @options.update(
13           :environment => 'development',
14           :port => 3000
15         )
17         @parser.on("-e", "--env ENV", 
18                 "Rails environment (default: development)") do |env| 
19           @options[:environment] = env
20         end
21         @parser.on("-c", "--chdir DIR", "RAILS_ROOT directory") do |c| 
22           @options[:root] = c
23         end
24       end
26       def app(options)
27         Rack::Adapter::Rails.new(options)
28       end
29     end
30   end
31 end