Skip to content

Commit

Permalink
When is Bundler loaded by puma-wild?
Browse files Browse the repository at this point in the history
  • Loading branch information
seven1m committed Feb 13, 2020
1 parent 2ed158e commit 359cb69
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions bin/puma-wild
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ require 'puma/cli'

cli = Puma::CLI.new ARGV

puts "puma-wild defined?(Bundler) = #{defined?(Bundler).inspect}"
cli.run
4 changes: 4 additions & 0 deletions lib/puma/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,12 @@ def rack_builder
# a Gemfile
if ENV.key? 'PUMA_BUNDLER_PRUNED'
begin
puts '>>>> loading Bundler...'
require 'bundler/setup'
rescue LoadError
puts 'failed'
else
puts 'success'
end
end

Expand Down
4 changes: 3 additions & 1 deletion lib/puma/launcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,9 @@ def puma_wild_location
end

def prune_bundler
return if ENV.key?('PUMA_BUNDLER_PRUNED')
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
Expand Down

0 comments on commit 359cb69

Please sign in to comment.