made http and socks sub-plugins from proxy

This commit is contained in:
HoneyryderChuck 2018-01-03 09:58:36 +02:00
parent c7cd490b73
commit 65565c20c9
3 changed files with 7 additions and 5 deletions

View File

@ -5,11 +5,6 @@ require "forwardable"
module HTTPX
module Plugins
module Proxy
def self.configure(*)
require "httpx/plugins/proxy/http"
require "httpx/plugins/proxy/socks"
end
class Parameters
extend Registry
@ -72,6 +67,11 @@ module HTTPX
end
end
end
def self.configure(klass, *)
klass.plugin(:"proxy/http")
klass.plugin(:"proxy/socks")
end
end
register_plugin :proxy, Proxy
end

View File

@ -116,5 +116,6 @@ module HTTPX
Parameters.register("http", HTTPProxyChannel)
end
end
register_plugin :"proxy/http", Proxy::HTTP
end
end

View File

@ -109,6 +109,7 @@ module HTTPX
end
end
end
register_plugin :"proxy/socks", Proxy::Socks
end
end