Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add Trinidad as a dispatcher

  • Loading branch information...
commit 7da0115e72867272896f125698963471f21ef177 1 parent 00a926c
@calavera authored
Showing with 11 additions and 3 deletions.
  1. +11 −3 lib/new_relic/local_environment.rb
View
14 lib/new_relic/local_environment.rb
@@ -205,12 +205,20 @@ def check_for_glassfish
return unless defined?(::JRuby) &&
(((com.sun.grizzly.jruby.rack.DefaultRackApplicationFactory rescue nil) &&
defined?(com::sun::grizzly::jruby::rack::DefaultRackApplicationFactory)) ||
- ((org.jruby.rack.DefaultRackApplicationFactory rescue nil) &&
- defined?(org::jruby::rack::DefaultRackApplicationFactory)) ||
- defined?(::GlassFish::Server))
+ (jruby_rack? && defined?(::GlassFish::Server)))
@dispatcher = :glassfish
end
+ def check_for_trinidad
+ return unless defined?(::JRuby) && jruby_rack? && defined?(::Trinidad::Server)
+ @dispatcher = :trinidad
+ end
+
+ def jruby_rack?
+ ((org.jruby.rack.DefaultRackApplicationFactory rescue nil) &&
+ defined?(org::jruby::rack::DefaultRackApplicationFactory))
+ end
+
def check_for_webrick
return unless defined?(::WEBrick) && defined?(::WEBrick::VERSION)
@dispatcher = :webrick
Please sign in to comment.
Something went wrong with that request. Please try again.