[TEST] Clean up indices created by integration tests
[BULK] Changed, that Index#bulk_store runs against an index endpoint, not against `/_bulk`

Closes #327, fixes #328.
Added Index#url and simplified the Tire::Index class and tests

Closes #328, fixes #327
Release 0.4.1
[HTTP] Fixed incorrect handling of PUT requests in the Curb client
[FIX] Fixed, that blocks passed to `Tire::Index.new` or `Tire.index` losed the scope

Without this patch, blocks being passed to `Tire::Index.new` losed the scope, because
only `instance_eval` was called.

This was inconsistent with the `Tire::Search.new` behaviour, as documented eg. in
<http://karmi.github.com/tire/#section-48>

Thanks to @ahfeel for reporting.
[ALIASES] Added `Tire::Alias`, interface and DSL to manage aliases as resources

* Added `Alias.all`, `Alias.all("some_index")` and `Alias.find("my_alias")`
* Added rich interface for managing aliases as resources
* Changed Index#add_alias and Index#remove_alias to use Tire::Alias interface
* Changed the `Tire.aliases` method to use `Alias.all`
* Added unit and integration tests

See <http://www.elasticsearch.org/guide/reference/api/admin-indices-aliases.html> for feature overview.

The `Tire::Alias` class provides a rich interface for managing aliases.

To create an alias pointing to multiple indices:

    Tire::Alias.create name: 'my_alias', indices: ['index_1', 'index_2']

You may pass the routing and other configurations:

    a = Tire::Alias.new name:    'index_anne',
                        indices: ['index_2012_04', 'index_2012_03', 'index_2012_02'],
                        routing: 1,
                        filter:  { :terms => { :user => 'anne' } }
    a.save

Of course, you may use the Ruby API directly:

    a = Tire::Alias.new
    a.name('index_anne')
    a.index('index_2012_04')
    a.index('index_2012_03')
    # ...
    a.save

But you may prefer the DSL-ish block syntax:

    Tire::Alias.new name: 'index_anne' do |a|
      a.index 'index_2012_04'
      a.index 'index_2012_03'
      a.filter :terms, username: 'anne'
    end

To update an existing alias, find it by name, update its configuration and save it:

    a = Tire::Alias.find('my_alias')
    a.indices.delete 'index_A'
    a.indices.add    'index_B'
    a.indices.add    'index_C'
    a.save

Or do it with a block, again:

    Tire::Alias.find('articles_aliased') do |a|
      a.indices.remove 'articles_2'
      puts '---', "#{a.name} says: /me as JSON >", a.as_json, '---'
      a.save
    end

To remove indices from alias, you may want to use the `Alias#indices.delete_if` method:

    require 'active_support/core_ext/numeric'
    require 'active_support/core_ext/date/calculations'

    a = Tire::Alias.find('articles_aliased')
    a.indices.delete_if do |i|
      Time.parse( i.gsub(/articles_/, '') ) < 4.weeks.ago rescue false
    end
    a.save

To get all aliases, use the `Tire::Alias.all` method:

    Tire::Alias.all.each do |a|
      puts "#{a.name.rjust(30)} points to: #{a.indices}"
    end

To get aliases for a specific index, pass its name to `Alias.all`:

    Tire::Alias.all('articles').each do |a|
      puts "Alias '#{a.name}': #{a.inspect}."
    end

See the 'sliding window' scenario in the corresponding integration test:

    <https://github.com/karmi/tire/blob/aliases/test/integration/index_aliases_test.rb#L66-118>

Fixes #62, fixes #92, fixes #209.
Release 0.4.2
Include the response code in the log for bulk_store requests.

Closes #217
Added tests for the "Include the response code in the log for bulk_store requests" patch
[#222] Added a prefix query

See: http://www.elasticsearch.org/guide/reference/query-dsl/prefix-query.html

Closes #222
[#244] Added support for "script fields" (return a script evaluation for each hit)

See: http://www.elasticsearch.org/guide/reference/api/search/script-fields.html

Closes #244, closes #363.
Added a Faraday adapter as a Tire client

NOTE: As soon as possible, Tire will try to use Faraday as HTTP abstraction layer.
      This client is a temporary solution.

Closes #337.
Fix incorrect/incomplete Faraday usage instructions

Closes #337.
Added, that boost factor can be specified for indices

Example:

    Tire.search 'index_1' => { boost: 1.5 }, 'index_2' => { boost: 2 } do
      ...
    end

Closes #205, closes #377.
Added that MyModel#all is called in Rake import task

Closes #380, closes #381.
[#352] Added, that accessing Tire::Search#json forces perform

Conflicts:

	lib/tire/search.rb
[#352] Whitespace cleanup in Tire::Results::Collection
[#352] Added MyModel#new_record? for Tire::Persistence

Commit <https://github.com/erickt/tire/commit/40cb9753b25cd943e35ddf5ce52c0384ae98482e> rewritten and cleaned up by @karmi
[#366] Added support for the Update API in Tire::Index

Usage:

    tags = ['a', 'b', 'c']

    Tire.index 'my_index' do
      update 'document_type', 'document_id', {
        :script => "_ctx._source.tags = tags;',
        :params => {:tags => tags}
      }
    end