Sha256: 1c1d643c5f10e5007769417d7d74e7a5e60d2ab7fea48beadc478d810ab1ffb8

Contents?: true

Size: 1.23 KB

Versions: 17

Compression:

Stored size: 1.23 KB

Contents

module Sunspot
  # The Sunspot::Configuration module provides a factory method for Sunspot
  # configuration objects. Available properties are:
  #
  # Sunspot.config.http_client::
  #   The client to use for HTTP communication with Solr. Available options are
  #   :net_http, which is the default and uses Ruby's built-in pure-Ruby HTTP
  #   library; and :curb, which uses Ruby's libcurl bindings and requires
  #   installation of the 'curb' gem.
  # Sunspot.config.solr.url::
  #   The URL at which to connect to Solr
  #   (default: 'http://localhost:8983/solr')
  # Sunspot.config.pagination.default_per_page::
  #   Solr always paginates its results. This sets Sunspot's default result
  #   count per page if it is not explicitly specified in the query.
  #
  module Configuration
    class <<self
      # Factory method to build configuration instances.
      #
      # ==== Returns
      #
      # LightConfig::Configuration:: new configuration instance with defaults
      #
      def build #:nodoc:
        LightConfig.build do
          http_client :net_http
          solr do
            url 'http://127.0.0.1:8983/solr'
          end
          pagination do
            default_per_page 30
          end
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 6 rubygems

Version Path
Chrononaut-sunspot-client-0.9.4 lib/sunspot/configuration.rb
UnderpantsGnome-sunspot-0.9.1.1 lib/sunspot/configuration.rb
UnderpantsGnome-sunspot-0.9.8.1 lib/sunspot/configuration.rb
kristopher-sunspot-0.9.8 lib/sunspot/configuration.rb
kuahyeow-sunspot-0.9.7 lib/sunspot/configuration.rb
kuahyeow-sunspot-0.9.8 lib/sunspot/configuration.rb
outoftime-sunspot-0.9.0 lib/sunspot/configuration.rb
outoftime-sunspot-0.9.1 lib/sunspot/configuration.rb
outoftime-sunspot-0.9.2 lib/sunspot/configuration.rb
outoftime-sunspot-0.9.3 lib/sunspot/configuration.rb
outoftime-sunspot-0.9.4 lib/sunspot/configuration.rb
outoftime-sunspot-0.9.5 lib/sunspot/configuration.rb
outoftime-sunspot-0.9.6 lib/sunspot/configuration.rb
outoftime-sunspot-0.9.7 lib/sunspot/configuration.rb
outoftime-sunspot-0.9.8 lib/sunspot/configuration.rb
sunspot-0.9.8 lib/sunspot/configuration.rb
sunspot-0.9.7 lib/sunspot/configuration.rb