Module: Mizuno
- Defined in:
- lib/mizuno.rb,
lib/mizuno/client.rb,
lib/mizuno/logger.rb,
lib/mizuno/runner.rb,
lib/mizuno/server.rb,
lib/mizuno/version.rb,
lib/mizuno/reloader.rb,
lib/mizuno/rack_handler.rb,
lib/mizuno/client_exchange.rb,
lib/mizuno/client_response.rb
Overview
Wraps a Rack application in a Jetty handler.
Defined Under Namespace
Modules: Daemonizer Classes: Client, ClientExchange, ClientResponse, Logger, RackHandler, Reloader, Runner, Server
Constant Summary collapse
- LAUNCH_ENV =
$LOAD_PATH.map { |i| "-I#{i}" }.push($0)
- HOME =
File.(File.dirname(__FILE__))
- VERSION =
"0.6.7"
Class Method Summary collapse
-
.initialize_logger ⇒ Object
Tell log4j not to complain to the console about a missing log4j.properties file, as we configure it programmatically in Mizuno::Server (stackoverflow.com/questions/6849887).
-
.require_jars(*names) ⇒ Object
Loads jarfiles independent of versions.
Class Method Details
.initialize_logger ⇒ Object
Tell log4j not to complain to the console about a missing log4j.properties file, as we configure it programmatically in Mizuno::Server (stackoverflow.com/questions/6849887)
20 21 22 23 24 |
# File 'lib/mizuno.rb', line 20 def Mizuno.initialize_logger require_jars(%w(log4j slf4j-api slf4j-log4j12)) Java.org.apache.log4j.Logger.getRootLogger.setLevel( \ Java.org.apache.log4j.Level::INFO) end |
.require_jars(*names) ⇒ Object
Loads jarfiles independent of versions.
29 30 31 32 33 34 35 36 |
# File 'lib/mizuno.rb', line 29 def Mizuno.require_jars(*names) names.flatten.each do |name| file = Dir[File.join(HOME, 'java', "#{name}-*.jar")].first file ||= Dir[File.join(HOME, 'java', "#{name}.jar")].first raise("Unknown or missing jar: #{name}") unless file require file end end |