Sha256: 62c80366fa28df1f59ff49e59790e6f59d20027b1f24616c85405b06fad17cf3

Contents?: true

Size: 505 Bytes

Versions: 5

Compression:

Stored size: 505 Bytes

Contents

module MeiliSearch
  module Rails
    module Configuration
      def configuration
        raise NotConfigured if @_config.blank?

        @_config
      end

      def configuration=(configuration)
        @_config = configuration
      end

      def client
        ::MeiliSearch::Client.new(
          configuration[:meilisearch_host] || 'http://localhost:7700',
          configuration[:meilisearch_api_key],
          configuration.slice(:timeout, :max_retries)
        )
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
meilisearch-rails-0.7.0 lib/meilisearch/rails/configuration.rb
meilisearch-rails-0.6.0 lib/meilisearch/rails/configuration.rb
meilisearch-rails-0.5.2 lib/meilisearch/rails/configuration.rb
meilisearch-rails-0.5.1 lib/meilisearch/rails/configuration.rb
meilisearch-rails-0.5.0 lib/meilisearch/rails/configuration.rb