Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Aug 8, 2012
Commits on Jan 11, 2012
  1. Karel Minarik

    [REVERT][FIX] Fix the URL-incompatible translation of namespaced mode…

    karmi authored
    …ls into `document_type`
    Revert "[ACTIVEMODEL][FIX] Fix the incorrect translation of namespaced models into `document_type`".
    The "proper" translation translates `MyNamespace::MyModel` to `my_namespace/my_model`, which
    allows proper loading of namespaced models, but fucks up the encoded URL, because of something like:
    This reverts commit 89bc663.
    See #189.
Commits on Jan 7, 2012
  1. Karel Minarik

    [TEST] Fixed test failure because of "/" in `document_type` of namesp…

    karmi authored
    …aced model
    TODO: This is related to patch in #189, and actually means namespaced models cannot be used with Tire.
  2. Karel Minarik
  3. Greg Edwards Karel Minarik

    [REFACTOR] Changed that the Search::Search#perform method is lazy loa…

    greglearns authored karmi committed
    …ded (allows chainability)
    DSL#search and Search::Search lazy load data and are chainable, until #results or #response called.
    This allows something like this:
        s ='articles') { query { string 'title:T*' } }
        s.filter :terms, :tags => ['ruby']
        p s.results
  4. Domizio Demichelis Karel Minarik

    [ACTIVEMODEL][FIX] Fix the incorrect translation of namespaced models…

    ddnexus authored karmi committed
    … into `document_type`
    When loading the namespaced models from ES, the exception: "NameError: uninitialized constant" was raised.
    This is due to the fact that ActiveModel does, for reasons unknown, funky shit here: <>
    Closes #189.
  5. Sidharta Surya Kusnanto Karel Minarik

    [ACTIVEMODEL] Added injection of the `paginate` method when missing (…

    chromeragnarok authored karmi committed
    The `paginate` method, needed for the import task, is injected in the class being imported
    when the class implements Kaminari pagination, so the import Rake task works out of the box.
    Closes #191. Also see: #48, #108.
  6. Karel Minarik
  7. Mario Uher Karel Minarik

    [ACTIVEMODEL] Added the `:as` option for model mapping to dynamically…

    haihappen authored karmi committed
    … set property value in serialization
        class Article
          belongs_to :author
          mapping do
            indexes :author, as: proc { }
            indexes :author_email, as: ''
    Ccloses #184, closes #186.
Commits on Jan 6, 2012
  1. Dylan Thacker-Smith Karel Minarik

    [FIX] Fixed incorrect curl format in logger for Index#open

    dylanahsmith authored karmi committed
    Closes #195.
  2. Dylan Thacker-Smith Karel Minarik

    [FIX] Index#retrieve returns nil when the document doesn't exist

    dylanahsmith authored karmi committed
    Previously an exception was raised on document.update(h['fields'])
    since h['field'] returned nil:
        index ="empty")
        puts index.retrieve("doc", 'NOTEXIST').inspect
    Closes #193.
Commits on Dec 23, 2011
  1. Dylan Thacker-Smith Karel Minarik

    [HTTP][FIX] Re-raise the RestClient::RequestTimeout and RestClient::S…

    dylanahsmith authored karmi committed
    …erverBrokeConnection exceptions
    These exceptions should be re-raised so the user can catch it and possibly try the search at another node, etc.
    Closes #170, closes #171
Commits on Dec 18, 2011
  1. itayco Karel Minarik

    [FIX] Fixed an error where facets did not respect the "blocks with ar…

    itayco authored karmi committed
    …guments" DSL variant
    Closes #176.
Commits on Dec 12, 2011
  1. Vojtěch Hýža
  2. Vojtěch Hýža
Commits on Dec 10, 2011
  1. Dylan Thacker-Smith Karel Minarik

    [FIX] Use currently set `Configuration.url` in `Search::Search#perfor…

    dylanahsmith authored karmi committed
    …m` and don't freeze it in initializer
    Makes it easier to re-perform a failed search on another server, eg.:
        search ='articles')
        # build search ...
        servers = ["http://localhost:9200", "http://localhost:9201"]
          Tire::Configuration.url servers[0]
        rescue Errno::ECONNREFUSED => e
          Tire::Configuration.url servers[1]
        # do something with results ...
    Closes #163.
Commits on Dec 1, 2011
  1. Vojtěch Hýža
Commits on Nov 30, 2011
  1. Karel Minarik Vojtěch Hýža

    [PERSISTENCE] Changed that search in persistence returns instances of…

    karmi authored vhyza committed
    … model not Item
  2. Vojtěch Hýža
Commits on Nov 29, 2011
  1. Karel Minarik

    [DOC] README updates

    karmi authored
  2. Karel Minarik

    [ACTIVEMODEL] Added the support for casting model properties as Ruby …

    karmi authored
    In Tire::Persistence, you define a model property to be casted
    as a custom Ruby class instance.
    Currently, the implementation expects your class to take a Hash of attributes
    on initialization. (There are plans to support custom initialization logic.)
    You can cast either single values (see `Author` in the example below),
    or collections of values (see `[Comment]`). The behaviour was inspired
    by the CouchRest-Model gem.
    Also, all strings which conform to the UTC time format are automatically
    converted to Time objects.
    Also, all Hashes are automatically converted to Hashr []
    instances, allowing easy "dot-style" access to nested hash properties.
        class Article
          include Tire::Model::Persistence
          validates_presence_of :title, :author
          property :title,        :analyzer => 'snowball'
          property :published_on, :type => 'date'
          property :tags,         :default => [], :analyzer => 'keyword'
          property :author,       :class => Author
          property :comments,     :class => [Comment]
    See the test suite for more information.
  3. Karel Minarik

    [GEMS] Added Hashr ( as dependency

    karmi authored
    Hashr allows to easily wrap Hashes in object-like manner:
        config ='foo' => { 'bar' => 'bar' })
        # => true      # => { :bar => 'bar' }
    # => true  # => 'bar'
    See <> for more info.
  4. Karel Minarik

    [REFACTORING] Extracted updating item/model instance attributes to de…

    karmi authored
    …dicated method (`__update_attributes`)
  5. Karel Minarik

    [ACTIVEMODEL] Added support for property defaults in Tire::Model::Per…

    karmi authored
    In the new implementation of the `property` method, you can define default values for your model attributes:
        class Article
          include Tire::Model::Persistence
          property :title
          property :tags, :default => []
        Article.create title: 'Test'
        # => 'Test'
        # => []
  6. Karel Minarik

    Release 0.3.12

    karmi authored
  7. Karel Minarik
  8. Karel Minarik

    [REFACTORING] Removed mysterious `store_mapping` method and checks, r…

    karmi authored
    …emoved `id` and `type` from serialized document
    Accidentally closes #147.
Commits on Nov 25, 2011
  1. Karel Minarik

    [FIX] Added proper Github URL to Rails application template to README

    Jakub Dušek authored karmi committed
    For some users, the `rails new` command cannot accept redirects. Closes #154.
Commits on Nov 12, 2011
  1. Karel Minarik
Commits on Nov 11, 2011
  1. Karel Minarik

    Release 0.3.11

    karmi authored
  2. Karel Minarik
Commits on Nov 10, 2011
  1. Karel Minarik

    Release 0.3.10

    karmi authored
  2. Karel Minarik
Commits on Nov 7, 2011
  1. Karel Minarik

    [FIX] Tighten up the Logger interface and make it easier to pass inst…

    karmi authored
    …ances of Logger/Log4r etc.
    Example usage:
        require 'fileutils'
        require 'active_support/buffered_logger'
        mylog = 'buffered-logger.log'
        mylog.instance_eval do
          alias :write :info
        require 'tire'
        Tire.configure { logger mylog }
    Closes #142.
Something went wrong with that request. Please try again.