summaryrefslogtreecommitdiff
path: root/script/rails
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:01:45 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:01:45 +0100
commitb80bd744ad873f6fc43018bc4bfb90677de167bd (patch)
tree072c4b0e33d442528555b82c415f5e7a1712b2b0 /script/rails
parent3e706c2025ecc5523e81ad649639ef2ff75e7bac (diff)
Start of GS5.
Diffstat (limited to 'script/rails')
-rwxr-xr-xscript/rails68
1 files changed, 68 insertions, 0 deletions
diff --git a/script/rails b/script/rails
new file mode 100755
index 0000000..5f16f40
--- /dev/null
+++ b/script/rails
@@ -0,0 +1,68 @@
+#!/usr/bin/env ruby
+# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
+
+APP_PATH = File.expand_path('../../config/application', __FILE__)
+require File.expand_path('../../config/boot', __FILE__)
+
+
+# # ---[ Custom stuff ]--------------------------------------{
+# # Start web server with SSL enabled.
+# # http://www.nearinfinity.com/blogs/chris_rohr/configuring_webrick_to_use_ssl.html
+#
+# require 'rubygems'
+# require 'rails/commands/server'
+# require 'rack'
+#
+# # like WEBrick::Utils::getservername()
+# def getservername()
+# return 'abc'
+# require 'socket'
+# host = Socket::gethostname
+# begin
+# return Socket::gethostbyname(host)[0]
+# rescue
+# return host
+# end
+# end
+#
+# require 'webrick'
+# require 'webrick/https'
+#
+# module Rails
+# class Server < ::Rack::Server
+# # http://api.rubyonrails.org/classes/Rails/Server.html#method-i-default_options
+# def default_options
+# super.merge({
+# :Port => 3001,
+# # https://github.com/raesene/dradisframework/commit/705d067eb9eef9ac98de29439757a0b1102c15cc
+# :DoNotReverseLookup => true,
+# :environment => (ENV['RAILS_ENV'] || 'development').dup,
+# :daemonize => false,
+# :debugger => false,
+# :pid => File.expand_path( 'tmp/pids/server.pid' ),
+# :config => File.expand_path( 'config.ru' ),
+# :SSLEnable => true,
+# :SSLVerifyClient => OpenSSL::SSL::VERIFY_NONE,
+# :SSLPrivateKey => OpenSSL::PKey::RSA.new(
+# File.open( 'misc/etc/ssl/amooma/server_key.pem' ).read),
+# :SSLCertificate => OpenSSL::X509::Certificate.new(
+# File.open( 'misc/etc/ssl/amooma/server_cert.pem' ).read),
+# :SSLCertName => [[ 'CN', getservername() ]],
+# })
+# end
+# end
+# end
+#
+# # require 'rack/handler'
+# # Rack::Handler.class_eval do
+# # def self.default( options = {} )
+# # Rack::Handler::Thin
+# # end
+# # end
+#
+# # ---------------------------------------------------------}
+#
+
+
+require 'rails/commands'
+