Skip to content

Commit

Permalink
add start script
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Incorvia committed Jul 23, 2012
1 parent e231246 commit 3f0c04b
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 42 deletions.
19 changes: 6 additions & 13 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,15 @@
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: sqlite3
database: db/development.sqlite3
adapter: postgresql
database: tsa_dev
host: localhost
pool: 5
timeout: 5000

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000

production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000
adapter: postgresql
database: tsa_test
host: localhost
29 changes: 0 additions & 29 deletions script/rails
Original file line number Diff line number Diff line change
@@ -1,35 +1,6 @@
#!/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.

require 'rubygems'
require 'rails/commands/server'
require 'rack'
require 'webrick'
require 'webrick/https'

module Rails
class Server < ::Rack::Server
def default_options
super.merge({
:Port => 3000,
: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(
IO.read(File.expand_path("server.pem"))),
:SSLCertificate => OpenSSL::X509::Certificate.new(
IO.read(File.expand_path("server.pem"))),
:SSLCertName => [["CN", WEBrick::Utils::getservername]]
})
end
end
end


APP_PATH = File.expand_path('../../config/application', __FILE__)
require File.expand_path('../../config/boot', __FILE__)
require 'rails/commands'
36 changes: 36 additions & 0 deletions script/tsa
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/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.

require 'rubygems'
require 'rails/commands/server'
require 'rack'
require 'webrick'
require 'webrick/https'

module Rails
class Server < ::Rack::Server
def default_options
super.merge({
:Port => 3000,
: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(
IO.read(File.expand_path("server.pem"))),
:SSLCertificate => OpenSSL::X509::Certificate.new(
IO.read(File.expand_path("server.pem"))),
:SSLCertName => [["CN", WEBrick::Utils::getservername]]
})
end
end
end


APP_PATH = File.expand_path('../../config/application', __FILE__)
require File.expand_path('../../config/boot', __FILE__)
require 'rails/commands'

0 comments on commit 3f0c04b

Please sign in to comment.