Sha256: 98d126567675d2ad6a6098ab0b532780073c14b10f60b3af3b3feebe77a7e083

Contents?: true

Size: 1.43 KB

Versions: 9

Compression:

Stored size: 1.43 KB

Contents

$LOAD_PATH <<::File.expand_path('../lib/', __FILE__)

require 'sass'
require 'test_server'
#require 'bundler'

#if %w{ development test }.include? ENV['RACK_ENV']
#  Bundler.require :default, :test, :development
#else
#  Bundler.require :default
#end

TestServer.config.debug_mode = true if ENV['DEBUG']
TestServer.config.log_level = ENV['LOG_LEVEL'] if ENV['LOG_LEVEL']
TestServer.config.access_log = ENV['ACCESS_LOG'] if ENV['ACCESS_LOG']

TestServer.ui_logger.level = TestServer.config.log_level

require File.expand_path('../app/controllers/application_controller.rb', __FILE__)
Dir.glob(::File.expand_path('../app/controllers/*.rb', __FILE__)).each { |f| require f }


trap TestServer.config.reload_config_signal do
  begin
    TestServer.ui_logger.warn 'Reload of configuration requested'
    TestServer::Actions::ReloadConfiguration.new.run
    TestServer.ui_logger.info 'Reload of configuration successful'
  rescue Exceptions::ReloadOfConfigurationFailed => e
    TestServer.ui_logger.fatal "Reload of configuration failed: #{e.message}"
  end
end

#map '/v1/testrating/' do
#  run TestServer::App::TestRatingController
#end

map '/v1/test/streaming' do
  run TestServer::App::StreamingController
end

map '/v1/test/string' do
  run TestServer::App::StringController
end

map '/v1/test/javascript' do
  run TestServer::App::JavascriptController
end

map TestServer::App::AssetsController.assets_prefix do
  run TestServer::App::AssetsController.assets
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
test_server-0.2.4 config.ru
test_server-0.2.3 config.ru
test_server-0.2.2 config.ru
test_server-0.2.1 config.ru
test_server-0.2.0 config.ru
test_server-0.1.2 config.ru
test_server-0.1.1 config.ru
test_server-0.1.0 config.ru
test_server-0.0.11 config.ru