ry / ebb fork watch download tarball
public
Description: web server
Homepage: http://ebb.rubyforge.org
Clone URL: git://github.com/ry/ebb.git
ryah (author)
Sun Apr 06 08:35:52 -0700 2008
commit  c44f2b57ebd5098a3cda708ac2dde2bdb44b46c6
tree    2d1eb040b8094e9c671372f62fabadf72c814204
parent  4c0d9bb92866164e71e922b17f1591f6611a61e0
ebb / ruby_lib / ebb / runner / rails.rb
100644 31 lines (28 sloc) 0.685 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
module Rack
  module Adapter
    autoload :Rails, Ebb::LIBDIR + '/rack/adapter/rails'
  end
end
 
module Ebb
  class Runner
    class Rails < Runner
      def extra_options
        # defaults for ebb_rails
        @options.update(
          :environment => 'development',
          :port => 3000
        )
 
        @parser.on("-e", "--env ENV",
                "Rails environment (default: development)") do |env|
          @options[:environment] = env
        end
        @parser.on("-c", "--chdir DIR", "RAILS_ROOT directory") do |c|
          @options[:root] = c
        end
      end
 
      def app(options)
        Rack::Adapter::Rails.new(options)
      end
    end
  end
end