Sha256: 00014cda28443172843d0c46df14855315a4346895ab6e873a10d250501de2eb

Contents?: true

Size: 589 Bytes

Versions: 8

Compression:

Stored size: 589 Bytes

Contents

module PostSetupHandlers
  class PryRemoteServer
    def self.setup(argv,env,config)
      start_remote_pry if config[:debug] or argv.include?('--debug')
    end

    def self.start_remote_pry
      log "Pry Remote Server started!"

      Thread.abort_on_exception = true

      Thread.new do
        loop do
          begin
            if th = DRb.thread
              th.kill
            end

            binding.remote_pry
            log "remote_pry returned"
          rescue Exception => e
            log "finished remote pry"
          end
        end
      end

    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
gamebox-0.5.5 lib/gamebox/post_setup_handlers/pry_remote_server.rb
gamebox-0.5.4 lib/gamebox/post_setup_handlers/pry_remote_server.rb
gamebox-0.5.2 lib/gamebox/post_setup_handlers/pry_remote_server.rb
gamebox-0.5.1 lib/gamebox/post_setup_handlers/pry_remote_server.rb
gamebox-0.5.0 lib/gamebox/post_setup_handlers/pry_remote_server.rb
gamebox-0.4.1 lib/gamebox/post_setup_handlers/pry_remote_server.rb
gamebox-0.4.0 lib/gamebox/post_setup_handlers/pry_remote_server.rb
gamebox-0.4.0.rc11 lib/gamebox/post_setup_handlers/pry_remote_server.rb