bin/ruby-station in ruby-station-0.1.3 vs bin/ruby-station in ruby-station-0.1.4.rc1
- old
+ new
@@ -6,22 +6,25 @@
$LOAD_PATH.unshift __DIR__("../")
require 'util/gem_manager.rb'
require 'config.rb'
-if defined?(TESTS_DIR)
- Conf.set_home(TESTS_DIR/"data/conf_dir/")
-else
- Conf.parse_opt
-end
-Conf.init
require 'util/servant.rb'
require 'controller/init'
require 'model/init'
-if Conf.debug
- Ramaze::Log.info "Starting Ramaze with dev mode"
+def start_ramaze
+ if Conf.debug
+ Ramaze::Log.info "Starting Ramaze with dev mode"
+ end
+ Ramaze::Log.info "Starting Ramaze with port #{Conf.server_port}"
+ Ramaze.start :port => Conf.server_port,
+ :root => __DIR__("../"),
+ :mode => (Conf.debug ? :dev : :live)
end
-Ramaze.start :port => Conf.server_port,
- :root => __DIR__("../"),
- :mode => (Conf.debug ? :dev : :live)
+
+if defined?(TESTS_DIR)
+ Thread.new{ start_ramaze }
+else
+ start_ramaze
+end