5824: Rename keepdl to keep-web.
[arvados.git] / services / api / script / rails
1 #!/usr/bin/env ruby
2 # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
4
5 ##### SSL - ward, 2012-10-15
6 require 'rubygems'
7 require 'rails/commands/server'
8 require 'rack'
9 require 'webrick'
10 require 'webrick/https'
11
12 module Rails
13     class Server < ::Rack::Server
14         def default_options
15             super.merge({
16                 :Port => 3030,
17                 :environment => (ENV['RAILS_ENV'] || "development").dup,
18                 :daemonize => false,
19                 :debugger => false,
20                 :pid => File.expand_path("tmp/pids/server.pid"),
21                 :config => File.expand_path("config.ru"),
22                 :SSLEnable => true,
23                 :SSLVerifyClient => OpenSSL::SSL::VERIFY_NONE,
24                 :SSLCertName => [["CN", "#{WEBrick::Utils::getservername} #{Time.now().to_s}"]]
25             })
26         end
27     end
28 end
29 ######### /SSL
30
31
32 APP_PATH = File.expand_path('../../config/application',  __FILE__)
33 require File.expand_path('../../config/boot',  __FILE__)
34 require 'rails/commands'