Module: Tire
- Extended by:
- DSL
- Defined in:
- lib/tire/http/clients/faraday.rb,
lib/tire.rb,
lib/tire/dsl.rb,
lib/tire/alias.rb,
lib/tire/count.rb,
lib/tire/index.rb,
lib/tire/tasks.rb,
lib/tire/utils.rb,
lib/tire/logger.rb,
lib/tire/search.rb,
lib/tire/version.rb,
lib/tire/http/client.rb,
lib/tire/search/scan.rb,
lib/tire/search/sort.rb,
lib/tire/model/import.rb,
lib/tire/model/naming.rb,
lib/tire/model/search.rb,
lib/tire/multi_search.rb,
lib/tire/results/item.rb,
lib/tire/search/facet.rb,
lib/tire/search/query.rb,
lib/tire/configuration.rb,
lib/tire/http/response.rb,
lib/tire/search/filter.rb,
lib/tire/model/indexing.rb,
lib/tire/model/callbacks.rb,
lib/tire/model/percolate.rb,
lib/tire/search/highlight.rb,
lib/tire/http/clients/curb.rb,
lib/tire/model/persistence.rb,
lib/tire/results/collection.rb,
lib/tire/results/pagination.rb,
lib/tire/search/script_field.rb,
lib/tire/search/queries/match.rb,
lib/tire/model/persistence/finders.rb,
lib/tire/model/persistence/storage.rb,
lib/tire/model/persistence/attributes.rb,
lib/tire/search/queries/custom_filters_score.rb
Overview
A Faraday-based HTTP client, which allows you to choose a HTTP client.
See https://github.com/technoweenie/faraday/tree/master/lib/faraday/adapter
NOTE: Tire will switch to Faraday for the HTTP abstraction layer. This client is a temporary solution.
Example:
require 'typhoeus'
require 'tire/http/clients/faraday'
Tire.configure do |config|
# Unless specified, tire will use Faraday.default_adapter and no middleware
Tire::HTTP::Client::Faraday.faraday_middleware = Proc.new do |builder|
builder.adapter :typhoeus
end
config.client(Tire::HTTP::Client::Faraday)
end
Defined Under Namespace
Modules: DSL, HTTP, Model, Results, Search, Tasks, Utils Classes: Alias, Configuration, Index, Logger
Constant Summary collapse
- VERSION =
"0.6.0"- CHANGELOG =
<<-END IMPORTANT CHANGES LATELY: * Fixed incorrect inflection in the Rake import tasks * Added support for `geo_distance` facets * Added support for the `custom_filters_score` query * Added a custom strategy option to <Model.import> * Allow the `:wrapper` option to be passed to Tire.search consistently * Improved the Mongoid importing strategy * Merge returned `fields` with `_source` if both are returned * Removed the deprecated `text` query * [FIX] Rescue HTTP client specific connection errors in MyModel#create_elasticsearch_index * Added support for passing `version` in Tire::Index#store * Added support for `_version_type` in Tire::Index#bulk * Added ActiveModel::Serializers compatibility END
Class Method Summary collapse
Methods included from DSL
aliases, configure, count, index, multi_search, scan, search
Class Method Details
.warn(message) ⇒ Object
56 57 58 59 |
# File 'lib/tire.rb', line 56 def warn() line = caller.detect { |line| line !~ %r|lib\/tire\/| }.sub(/:in .*/, '') STDERR.puts "", "\e[31m[DEPRECATION WARNING] #{}", "(Called from #{line})", "\e[0m" end |