Skip to content

Commit

Permalink
Add plugin example to extra_runtime_dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
nateberkopec committed Oct 23, 2019
1 parent 14782fd commit 3294c82
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/puma/dsl.rb
Expand Up @@ -583,6 +583,8 @@ def lowlevel_error_handler(obj=nil, &block)
# 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)
Expand All @@ -603,7 +605,7 @@ def raise_exception_on_sigterm(answer=true)
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.
Expand All @@ -612,7 +614,7 @@ def raise_exception_on_sigterm(answer=true)
# @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
Expand Down

0 comments on commit 3294c82

Please sign in to comment.