class TorqueBox::Server

Attributes

server[R]

Public Class Methods

new() click to toggle source
# File lib/torquebox/server.rb, line 23
def initialize
  @server = server_gem_path
end

Public Instance Methods

display() click to toggle source
# File lib/torquebox/server.rb, line 27
def display
  print_server_gem
  print_installed_apps
rescue Exception => e
  puts "Exception caught: #{e}"
end
home() click to toggle source
# File lib/torquebox/server.rb, line 59
def home
  server || ENV['TORQUEBOX_HOME']
end
print_installed_apps() click to toggle source
print_server_gem() click to toggle source

Private Instance Methods

server_gem_path() click to toggle source
# File lib/torquebox/server.rb, line 64
def server_gem_path
  if ((::Gem::Version.new(::Gem::VERSION) <=> ::Gem::Version.new('1.8.9')) < 0)
    puts "[WARNING] Found rubygems version #{::Gem::VERSION}. This probably means you are on JRuby 1.6.4. While JRuby 1.6.4 should work, TorqueBox is tested on and ships with JRuby 1.6.5."
    home = ::Gem.searcher.find( 'torquebox-server' )
  else
    begin
      home = ::Gem::Specification.find_by_name( 'torquebox-server' )
    rescue ::Gem::LoadError
    end
  end
  home.full_gem_path if home
end