1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Add plugin example to extra_runtime_dependencies

This commit is contained in:
Nate Berkopec 2019-10-23 15:36:41 +08:00 committed by GitHub
parent 14782fd0b6
commit 3294c82037
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -583,6 +583,8 @@ module Puma
# new Bundler context and thus can float around as the release
# dictates.
#
# See also: extra_runtime_dependencies
#
# @note This is incompatible with +preload_app!+.
# @note This is only supported for RubyGems 2.2+
def prune_bundler(answer=true)
@ -603,7 +605,7 @@ module Puma
end
# When using prune_bundler, if extra runtime dependencies need to be loaded to
# initialize your app, then this setting can be used.
# initialize your app, then this setting can be used. This includes any Puma plugins.
#
# Before bundler is pruned, the gem names supplied will be looked up in the bundler
# context and then loaded again after bundler is pruned.
@ -612,7 +614,7 @@ module Puma
# @example
# extra_runtime_dependencies ['gem_name_1', 'gem_name_2']
# @example
# extra_runtime_dependencies ['puma_worker_killer']
# extra_runtime_dependencies ['puma_worker_killer', 'puma-heroku']
def extra_runtime_dependencies(answer = [])
@options[:extra_runtime_dependencies] = Array(answer)
end