Module: RSolr::ClientCert
- Defined in:
- lib/rsolr/client_cert.rb,
lib/rsolr/client_cert/version.rb,
lib/rsolr/client_cert/connection.rb
Defined Under Namespace
Classes: Connection, Error
Constant Summary collapse
- VERSION =
"0.5.2"
Class Method Summary collapse
Class Method Details
.connect(opts) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/rsolr/client_cert.rb', line 8 def self.connect(opts) grouped_opts = opts.group_by { |k,v| k.to_s =~ /^ssl_/ ? :ssl : :solr } solr_opts = Hash[grouped_opts[:solr]] ssl_opts = Hash[grouped_opts[:ssl]] connection = Connection.new ssl_opts client_class = opts.delete(:client_class) || RSolr::Client client_class.new connection, solr_opts end |