mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Remove diagnostic logging
This commit is contained in:
parent
3d1c5e00b4
commit
f73cd57233
4 changed files with 3 additions and 20 deletions
|
@ -3,7 +3,6 @@
|
|||
# Copyright (c) 2014 Evan Phoenix
|
||||
#
|
||||
|
||||
puts "puma-wild 111 defined?(Bundler) = #{defined?(Bundler).inspect}"
|
||||
require 'rubygems'
|
||||
|
||||
gems = ARGV.shift
|
||||
|
@ -16,22 +15,17 @@ if gems == "-I"
|
|||
gems = ARGV.shift
|
||||
end
|
||||
|
||||
p gems
|
||||
|
||||
gems.split(",").each do |s|
|
||||
name, ver = s.split(":",2)
|
||||
gem name, ver
|
||||
end
|
||||
|
||||
puts "puma-wild 222 defined?(Bundler) = #{defined?(Bundler).inspect}"
|
||||
|
||||
module Puma; end
|
||||
|
||||
Puma.const_set("WILD_ARGS", ["-I", inc, gems])
|
||||
|
||||
require 'puma/cli'
|
||||
|
||||
puts "puma-wild 333 defined?(Bundler) = #{defined?(Bundler).inspect}"
|
||||
cli = Puma::CLI.new ARGV
|
||||
|
||||
cli.run
|
||||
|
|
|
@ -299,12 +299,8 @@ module Puma
|
|||
# a Gemfile
|
||||
if ENV.key? 'PUMA_BUNDLER_PRUNED'
|
||||
begin
|
||||
puts '>>>> loading Bundler...'
|
||||
require 'bundler/setup'
|
||||
rescue LoadError
|
||||
puts 'failed'
|
||||
else
|
||||
puts 'success'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -286,9 +286,6 @@ module Puma
|
|||
end
|
||||
|
||||
def prune_bundler
|
||||
puts '>>>> prune_bundler starting...'
|
||||
puts "prune_bundler defined?(Bundler) = #{defined?(Bundler).inspect}"
|
||||
#return if ENV.key?('PUMA_BUNDLER_PRUNED')
|
||||
return unless defined?(Bundler)
|
||||
require_rubygems_min_version!(Gem::Version.new("2.2"), "prune_bundler")
|
||||
unless puma_wild_location
|
||||
|
@ -298,20 +295,16 @@ module Puma
|
|||
|
||||
deps, dirs = dependencies_and_files_to_require_after_prune
|
||||
|
||||
log "* Pruning Bundler environment"
|
||||
log '* Pruning Bundler environment'
|
||||
home = ENV['GEM_HOME']
|
||||
bundle_gemfile = ENV['BUNDLE_GEMFILE']
|
||||
Bundler.with_clean_env do
|
||||
require 'pp'
|
||||
puts 'ENV after Bundler.with_original_env:'
|
||||
pp ENV
|
||||
ENV['GEM_HOME'] = home
|
||||
ENV['BUNDLE_GEMFILE'] = bundle_gemfile
|
||||
ENV['PUMA_BUNDLER_PRUNED'] = '1'
|
||||
args = [Gem.ruby, puma_wild_location, '-I', dirs.join(':'), deps.join(',')] + @original_argv
|
||||
# Ruby 2.0+ defaults to true which breaks socket activation
|
||||
args += [{:close_others => false}]
|
||||
p args
|
||||
Kernel.exec(*args)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -21,12 +21,12 @@ class TestPreserveBundlerEnv < TestIntegration
|
|||
Dir.chdir(File.expand_path("bundle_preservation_test", __dir__)) do
|
||||
@server = IO.popen(env, cmd.split, "r")
|
||||
end
|
||||
wait_for_server_to_boot(log: true)
|
||||
wait_for_server_to_boot
|
||||
@pid = @server.pid
|
||||
connection = connect
|
||||
initial_reply = read_body(connection)
|
||||
assert_match("Gemfile.bundle_env_preservation_test", initial_reply)
|
||||
restart_server connection, log: true
|
||||
restart_server connection
|
||||
new_reply = read_body(connection)
|
||||
assert_match("Gemfile.bundle_env_preservation_test", new_reply)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue