def plugin(adapter, spec, &block)
      type, name = spec.flatten(1)
      plugin = plugin_registry.send(type).adapter(adapter).fetch(name) { plugin_registry.send(type).fetch(name) }

      if block
        register_plugin(plugin.configure(&block))
      else
        register_plugin(plugin)
      end
    end
def plugin(adapter, spec, &block)
      type, name = spec.flatten(1)
      plugin = plugin_registry.send(type).adapter(adapter).fetch(name) { plugin_registry.send(type).fetch(name) }

      if block
        register_plugin(plugin.configure(&block))
      else
        register_plugin(plugin)
      end
    end
Configures a plugin for a specific adapter to be enabled for all relations

 @example
   config = ROM::Configuration.new(:sql, 'sqlite::memory')

   config.plugin(:sql, relations: :instrumentation) do |p|
     p.notifications = MyNotificationsBackend
   end

   config.plugin(:sql, relations: :pagination)

 @param [Symbol] adapter The adapter identifier
 @param [Hash<Symbol=>Symbol>] spec Component identifier => plugin identifier

 @return [Plugin]

 @api public