class Object

Public Instance Methods

config(dsl) click to toggle source
# File lib/puma/plugin/add_plugin_restart_hook.rb, line 4
def config(dsl)
  Puma::Launcher.class_eval do
    def fire_plugins_restart
      @config.plugins.fire_restarts self
    end
  end

  Puma::PluginLoader.class_eval do
    def fire_restarts(launcher)
      @instances.each do |i|
        i.restart(launcher) if i.respond_to? :restart
      end
    end
  end

  dsl.on_restart(&:fire_plugins_restart)
end
fire_plugins_restart() click to toggle source
# File lib/puma/plugin/add_plugin_restart_hook.rb, line 6
def fire_plugins_restart
  @config.plugins.fire_restarts self
end
fire_restarts(launcher) click to toggle source
# File lib/puma/plugin/add_plugin_restart_hook.rb, line 12
def fire_restarts(launcher)
  @instances.each do |i|
    i.restart(launcher) if i.respond_to? :restart
  end
end
restart(_launcher) click to toggle source

call stop on all FSEvent instances this should close pipes and make fsevent_watch'es die

# File lib/puma/plugin/fsevent_cleanup.rb, line 10
def restart(_launcher)
  return unless defined? FSEvent
  ObjectSpace.each_object(FSEvent, &:stop)
end