Sha256: 1e71e1271bd2e180c1966f46a192295508e0b88cea6ebf0ad8d050b590083230

Contents?: true

Size: 468 Bytes

Versions: 1

Compression:

Stored size: 468 Bytes

Contents

module Mdbe
  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

1 entries across 1 versions & 1 rubygems

Version Path
mdbe-0.1.0 lib/mdbe/debug_server.rb