Sha256: 28bbc3235716f13750e584adcf35db53d68d3fbb1ccc15de2cbe7fd68059ebc3

Contents?: true

Size: 486 Bytes

Versions: 5

Compression:

Stored size: 486 Bytes

Contents

module MaglevDatabaseExplorer
  def self.ensure_debug_server_running!
    if not @debug_server
      @debug_server = Rails::Server.new
      @debug_server.options[:Port] += 1
      @debug_server.options[:pid] = false

      Thread.start do
        @debug_server.start
      end
    end 
  end

  def self.debug_port
    ensure_debug_server_running!
    @debug_server.options[:Port]
  end

  def self.application_port
    @application_port ||= Rails::Server.new.options[:Port]
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
maglev-database-explorer-0.0.5 lib/maglev-database-explorer/debug_server.rb
maglev-database-explorer-0.0.4 lib/maglev-database-explorer/debug_server.rb
maglev-database-explorer-0.0.3 lib/maglev-database-explorer/debug_server.rb
maglev-database-explorer-0.0.2 lib/maglev-database-explorer/debug_server.rb
maglev-database-explorer-0.0.1 lib/maglev-database-explorer/debug_server.rb